Skip to content

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_admins

Query Parameters ​

NameRequiredDefaultRangeDescription
tokenYes——API token; see Authentication
longitudeYes——Longitude of the target location
latitudeYes——Latitude of the target location
langNoAccept-Language, then zh-CNBCP 47 language tagAdministrative 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 ​

JSONPathTypeDescription
$.adminsarray<object>Administrative divisions at province, city, and district level
$.admins[].namestringAdministrative division name
$.admins[].codestringAdministrative division adcode
$.admins[].levelnumberAdministrative level: province 2, city 3, district 4
$.region_codestringISO 3166-1 Alpha-2 region code; mainland China returns CN

Errors ​

See Error Information.