按国家/地区获取城市目录
curl --request GET \
--url https://api.qbank.cl/platform/v1/aml/catalogs/cities \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.qbank.cl/platform/v1/aml/catalogs/cities"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.qbank.cl/platform/v1/aml/catalogs/cities', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.qbank.cl/platform/v1/aml/catalogs/cities",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.qbank.cl/platform/v1/aml/catalogs/cities"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.qbank.cl/platform/v1/aml/catalogs/cities")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.qbank.cl/platform/v1/aml/catalogs/cities")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"country": "US",
"states": {
"US-FL": [
"Miami",
"Orlando"
]
},
"country_cities": [],
"meta": {
"state_count": 51,
"city_count": 3200
}
}{
"error": "invalid_country",
"message": "country is required (ISO 3166-1 alpha-2)"
}{
"error": "unauthorized",
"message": "invalid or missing credentials"
}{
"error": "account_required",
"message": "this endpoint requires an account credential"
}{
"error": "country_not_found",
"message": "unknown country code"
}按国家/地区获取城市目录
返回指定 ISO 3166-1 alpha-2 国家/地区的城市,按行政区划分组: states 的键与 GET /v1/aml/catalogs 中 country_subdivisions 的 ISO 3166-2 代码相同,country_cities 列出无法映射到行政区划的城市 (也应一并提供)。这两个字段永远不会是 null。没有覆盖的国家/地区返回 200 和空列表 —— 此时回退到自由文本的城市字段。静态数据,响应带 Cache-Control: public, max-age=86400,可以缓存一天。每个国家只需调用一次, 然后在客户端按州/省筛选。
GET
/
v1
/
aml
/
catalogs
/
cities
按国家/地区获取城市目录
curl --request GET \
--url https://api.qbank.cl/platform/v1/aml/catalogs/cities \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.qbank.cl/platform/v1/aml/catalogs/cities"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.qbank.cl/platform/v1/aml/catalogs/cities', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.qbank.cl/platform/v1/aml/catalogs/cities",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.qbank.cl/platform/v1/aml/catalogs/cities"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.qbank.cl/platform/v1/aml/catalogs/cities")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.qbank.cl/platform/v1/aml/catalogs/cities")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"country": "US",
"states": {
"US-FL": [
"Miami",
"Orlando"
]
},
"country_cities": [],
"meta": {
"state_count": 51,
"city_count": 3200
}
}{
"error": "invalid_country",
"message": "country is required (ISO 3166-1 alpha-2)"
}{
"error": "unauthorized",
"message": "invalid or missing credentials"
}{
"error": "account_required",
"message": "this endpoint requires an account credential"
}{
"error": "country_not_found",
"message": "unknown country code"
}授权
会话 JWT(来自注册/登录)或 API key(pk_...)。
也接受 X-API-Key: <token> 作为替代请求头。
查询参数
ISO 3166-1 alpha-2 国家/地区代码(例如 US)。
Pattern:
^[A-Z]{2}$最后修改于 2026年8月22日
⌘I