Amap Maps Get V3 Config District
1 credits/call
ae_amap_maps_get_v3_config_district
Look up administrative divisions like provinces, cities, and districts. Retrieve area codes (adcodes) and optional boundary coordinates for mapping regions.
1 credits/call
Pricing
1 credits/call
| Condition | Charge |
|---|---|
| Each call | 1 credits/call |
Parameters
Optional parameters use the platform defaults when omitted.
| Parameter | Type | Required | Description | Default |
|---|---|---|---|---|
page | string | No | 需要第几页数据 最外层的districts最多会返回20个数据,若超过限制,请用page请求下一页数据。例如page=2;page=3。默认page=1 注意:该参数在 schema 中定义为 string,即使含义是数字或数字枚举,也请按字符串传入,例如 "1"、"20",不要传裸数字 1、20。 | 1 |
filter | string | No | 根据区划过滤 按照指定行政区划进行过滤,填入后则只返回该省/直辖市信息 需填入adcode,为了保证数据的正确,强烈建议填入此参数 | — |
offset | string | No | 最外层返回数据个数 注意:该参数在 schema 中定义为 string,即使含义是数字或数字枚举,也请按字符串传入,例如 "1"、"20",不要传裸数字 1、20。 | 20 |
output | enum (JSON | XML) | No | 返回数据格式类型 可选值:JSON,XML | JSON |
callback | string | No | 回调函数 callback值是用户定义的函数名称,此参数只在output=JSON时有效 | — |
keywords | string | No | 查询关键字 规则:只支持单个关键词语搜索关键词支持:行政区名称、citycode、adcode 例如,在subdistrict=2,搜索省份(例如山东),能够显示市(例如济南),区(例如历下区) adcode信息可参考[城市编码表](https://lbs.amap.com/api/webservice/download)获取 | — |
extensions | enum (base | all) | No | 返回结果控制 此项控制行政区信息中返回行政区边界坐标点;可选值:base、all; base:不返回行政区边界坐标点;all:只返回当前查询district的边界值,不返回子节点的边界值;目前不能返回乡镇/街道级别的边界值 | base |
subdistrict | string | No | 子级行政区规则数字 设置显示下级行政区级数(行政区级别包括:国家、省/直辖市、市、区/县、乡镇/街道多级数据) 可选值:0、1、2、3等数字,并以此类推 0:不返回下级行政区;1:返回下一级行政区;2:返回下两级行政区;3:返回下三级行政区;需要在此特殊说明,目前部分城市和省直辖县因为没有区县的概念,故在市级下方直接显示街道。例如:广东-东莞、海南-文昌市 注意:该参数在 schema 中定义为 string,即使含义是数字或数字枚举,也请按字符串传入,例如 "1"、"20",不要传裸数字 1、20。 | 1 |
Invocation example
Copy the request and explore its response example.
POST
/agent-api/v1/tool/executeX-Api-KeyRequest coderequest.sh
curl --request POST \
--url 'https://agentearth.ai/agent-api/v1/tool/execute?tool_name=ae_amap_maps_get_v3_config_district' \
--header "X-Api-Key: $AGENTEARTH_API_KEY" \
--header 'Content-Type: application/json' \
--data-raw '{
"params": {
"extensions": "base",
"keywords": "广东省",
"output": "JSON",
"subdistrict": "1"
}
}'Response exampleresponse.json
{
"count": "1",
"districts": [
{
"adcode": "440000",
"center": "113.266887,23.133306",
"citycode": [],
"districts": [
{
"adcode": "440500",
"center": "116.681956,23.354152",
"citycode": "0754",
"districts": [],
"level": "city",
"name": "汕头市"
}
],
"level": "province",
"name": "广东省"
}
],
"info": "OK",
"infocode": "10000",
"status": "1",
"suggestion": {
"cities": [],
"keywords": []
}
}This example shows part of the response. Copied content is valid JSON.

