Administrative Division Lookup
Returns province, city, and district administrative divisions for coordinates in mainland China.
Usage Notes
- This API only provides approximate lookup within mainland China. Results may contain some inaccuracies.
- Each request consumes one API call from your quota.
Request
http
GET https://singer.caiyunhub.com/v3/cartography/reverse_adminsQuery Parameters
| Name | Required | Default | Range | Description |
|---|---|---|---|---|
token | Yes | — | — | API token; see Authentication |
longitude | Yes | — | — | Longitude of the target location |
latitude | Yes | — | — | Latitude of the target location |
lang | No | Accept-Language, then zh-CN | BCP 47 language tag | Administrative name language; the query parameter takes precedence over the header |
If a name is unavailable in the requested language, an available name from the data is returned.
Request Example
bash
curl "https://singer.caiyunhub.com/v3/cartography/reverse_admins?longitude=116.36585&latitude=39.9126&lang=en-US&token={token}"json
{
"admins": [
{
"name": "Beijing",
"code": "110000",
"level": 2
},
{
"name": "Beijing",
"code": "110100",
"level": 3
},
{
"name": "Xicheng",
"code": "110102",
"level": 4
}
],
"region_code": "CN"
}Response Fields
| JSONPath | Type | Description |
|---|---|---|
$.admins | array<object> | Administrative divisions at province, city, and district level |
$.admins[].name | string | Administrative division name |
$.admins[].code | string | Administrative division adcode |
$.admins[].level | number | Administrative level: province 2, city 3, district 4 |
$.region_code | string | ISO 3166-1 Alpha-2 region code; mainland China returns CN |
Errors
See Error Information.