D黑奴背锅 文档中心
公共 OpenAPI地点
GET/openapi/v1/get_location_search

查询中国行政区和国家数据,支持名称、编码、中文、英文和国家代码。

Authorization

bearerAuth
AuthorizationBearer <token>

In: header

Query Parameters

q*string

搜索关键词,如 深圳、辽宁朝阳、Afghanistan、AF。

Response Body

application/json

curl -X GET "https://example.com/openapi/v1/get_location_search?q=string"
{  "code": 0,  "message": "地点查询成功",  "data": {    "query": "深圳",    "type": "chinese",    "items": [      {        "type": "city",        "code": "440300",        "name": "深圳市",        "full_name": "广东省深圳市",        "province": "广东省",        "city": "深圳市"      }    ]  },  "time": 1779502528}