GET /location/chinaregions/export| 参数 | 位置 | 类型 | 必填 | 真实默认值 | 说明 |
|---|---|---|---|---|---|
| appkey | query | string | 否 | 无 | 付费后获取的 APPKEY |
| regionCode | query | string | 否 | 无 | 需要查询的父级区域编码,传递 0 获取全国所有省级别数据;编码格式为 00000000,每两位分别对应省、市、区、镇/街道编码(注意:v2 版本会在国家 6 位行政区划标准代码后添加 00 两位编码以保持接口兼容,v3 版本为 12 位编码格式) |
| version | query | string | 否 | 3 | 当传递参数值为 2 时,调用 v2 版本的接口,regioncode 遵循国家行政区划代码标准,同时可返回新增区划中心点坐标。当传递参数值为 3 时,调用 v3 版本的接口(v1 版本主要为了兼容历史用户调用逻辑,新用户强烈建议调用 v3 接口) |
| keyword | query | string | 否 | 无 | v3 地名或代码字面关键词检索;不执行正则表达式。 |
| level | query | string | 否 | 无 | v3 层级:province/city/area或district/town或street/village或committee,兼容 1–5 及既有中文表达。 |
| parentCode | query | string | 否 | 无 | v3 父码或 2/4/6/9 位前缀;与关键词、层级条件共同筛选。0 表示不限定父码。 |
| page | query | integer | 否 | 1 | v3 检索页码,默认 1;小于 1 按既有行为归一为 1。直接子级查询保留既有不分页行为。 |
| pageSize | query | integer | 否 | 1000 | v3 检索默认 20、最多 100;小于 1 归一为 20。导出默认 1000、最多 1000。 |
text/csv{
"type": "string",
"format": "binary"
}application/vnd.openxmlformats-officedocument.spreadsheetml.sheet{
"type": "string",
"format": "binary"
}application/json{
"type": "object",
"properties": {
"DataStatus": {
"type": "object",
"required": [
"RequestParameter",
"StatusCode",
"StatusDescription",
"ResponseDateTime",
"DataTotalCount"
],
"properties": {
"RequestParameter": {
"type": "string",
"description": "请求参数,一般用于调试"
},
"StatusCode": {
"type": "integer",
"description": "接口返回状态码"
},
"StatusDescription": {
"type": "string",
"description": "接口返回状态说明"
},
"ResponseDateTime": {
"type": "string",
"description": "接口数据返回时间"
},
"DataTotalCount": {
"type": "integer",
"description": "此条件下的总数据量,一般用于分页计算"
}
}
},
"Data": {
"type": "null",
"description": "随版本变化的区域对象数组;旧版四字段,v3 为十九字段。"
}
}
}application/json{
"type": "object",
"properties": {
"DataStatus": {
"type": "object",
"required": [
"RequestParameter",
"StatusCode",
"StatusDescription",
"ResponseDateTime",
"DataTotalCount"
],
"properties": {
"RequestParameter": {
"type": "string",
"description": "请求参数,一般用于调试"
},
"StatusCode": {
"type": "integer",
"description": "接口返回状态码"
},
"StatusDescription": {
"type": "string",
"description": "接口返回状态说明"
},
"ResponseDateTime": {
"type": "string",
"description": "接口数据返回时间"
},
"DataTotalCount": {
"type": "integer",
"description": "此条件下的总数据量,一般用于分页计算"
}
}
},
"Data": {
"type": "null",
"description": "随版本变化的区域对象数组;旧版四字段,v3 为十九字段。"
}
}
}| 业务码 | 含义 | 说明 |
|---|---|---|
| 100 | 成功 | HTTP 200;仍应检查业务状态。 |
| 501 | 参数错误 | HTTP 400 |
| 900 | 依赖失败 | HTTP 500 |