ShowAPI,互联网API入口
立即注册

行政区划(全国省市区县和乡镇)查询 官方自营 会员接口

最新最全的全国省、市、区县、乡镇的分级查询,同时支持县级以上的邮政编码、区号、经纬度的查询。国内数据与国家民政部统计的数据同步更新,其准确性和及时性可以保证。本接口同时收录了港澳台的相关数据,欢迎使用.

累计调用

1234万+
价格: 会员免费

接口说明/ API Explain

最新最全的全国省、市、区县、乡镇的分级查询,同时支持县级以上的邮政编码、区号、经纬度的查询。国内数据与国家民政部统计的数据同步更新,其准确性和及时性可以保证。本接口同时收录了港澳台的相关数据,欢迎使用.

接入点/ API point

接入点说明:
 
相关文档:
接口地址: http://route.showapi.com/1149-2 (注意:接口支持https,更安全,但稍慢一些,你懂的。请根据自己的情况进行选择。)
返回格式: json
请求方式: HTTP协议,支持GET/POST方法。
调用样式及调试工具: 测试工具

查看加密签名方式 请求参数/ Request parameter

非文件上传的POST时,enctype=application/x-www-form-urlencoded。
文件上传的POST时,enctype=multipart/form-data。

1、系统级参数(所有接入点都需要的参数):展开收起
参数名称 类型 示例值 必须 描述
showapi_appid String 100 易源应用id
showapi_sign String 698d51a19d8a121ce581499d7b701668 为了验证用户身份,以及确保参数不被中间人篡改,需要传递调用者的数字签名。
showapi_timestamp String 20141114142239 客户端时间。
格式yyyyMMddHHmmss,如20141114142239
为了在一定程度上防止“重放攻击”,平台只接受在10分钟之内的请求。如果不传或传空串,则系统不再做此字段的检测。
showapi_res_gzip String 1或0 返回值是否用gzip方式压缩。此值为1时将压缩,其他值不压缩。
...
2、应用级参数(每个接入点有自己的参数):
参数名称 类型 默认值 示例值 必须 描述
parentId String
440100000000
上级的ID,该ID可以在"区域查询"接入点中查找

返回参数/ Return parameter

以JSON格式返回结果。

1、系统级参数(所有接入点都会返回的参数): 展开收起
名称 类型 示例值 描述
showapi_res_body String {"city":"昆明","prov":"云南"} 消息体的JSON封装,所有应用级的返回参数将嵌入此对象 。
showapi_res_code int 0
易源返回标志,0为成功,其他为失败。
0成功
-1,系统调用错误
-2,可调用次数或金额为0
-3,读取超时
-4,服务端返回数据解析错误
-5,后端服务器DNS解析错误
-6,服务不存在或未上线
-1000,系统维护
-1002,showapi_appid字段必传
-1003,showapi_sign字段必传
-1004,签名sign验证有误
-1005,showapi_timestamp无效
-1006,app无权限调用接口
-1007,没有订购套餐
-1008,服务商关闭对您的调用权限
-1009,调用频率受限
-1010,找不到您的应用
-1011,子授权app_child_id无效
-1012,子授权已过期或失效
-1013,子授权ip受限
showapi_res_error String 用户输入有误! 错误信息的展示
showapi_res_id String ce135f6739294c63be0c021b76b6fbff 本次请求id
...
2、应用级参数(系统级输出参数showapi_res_body字段中的json数据结构): 展开收起
名称 类型 示例值 描述
ret_code String
0
接口调用是否成功
...

返回示例/ Return example

{
	"showapi_res_code": 0,
	"showapi_res_error": "",
	"showapi_res_body": {
		"ret_code": 0,
		"flag": true,
		"data": [
			{
				"provinceId": "440000000000",
				"simpleName": "荔湾",
				"lon": "113.2442",
				"areaCode": "020",
				"cityId": "440100000000",
				"remark": "",
				"prePinYin": "L",
				"id": "440103000000",
				"pinYin": "Liwan",
				"parentId": "440100000000",
				"level": 3,
				"areaName": "荔湾区",
				"simplePy": "LW",
				"zipCode": "510000",
				"countyId": "440103000000",
				"lat": "23.12592",
				"wholeName": "中国,广东省,广州市,荔湾区"
			},
			{
				"provinceId": "440000000000",
				"simpleName": "越秀",
				"lon": "113.26683",
				"areaCode": "020",
				"cityId": "440100000000",
				"remark": "",
				"prePinYin": "Y",
				"id": "440104000000",
				"pinYin": "Yuexiu",
				"parentId": "440100000000",
				"level": 3,
				"areaName": "越秀区",
				"simplePy": "YX",
				"zipCode": "510000",
				"countyId": "440104000000",
				"lat": "23.12897",
				"wholeName": "中国,广东省,广州市,越秀区"
			},
			{
				"provinceId": "440000000000",
				"simpleName": "海珠",
				"lon": "113.26197",
				"areaCode": "020",
				"cityId": "440100000000",
				"remark": "",
				"prePinYin": "H",
				"id": "440105000000",
				"pinYin": "Haizhu",
				"parentId": "440100000000",
				"level": 3,
				"areaName": "海珠区",
				"simplePy": "HZ",
				"zipCode": "510000",
				"countyId": "440105000000",
				"lat": "23.10379",
				"wholeName": "中国,广东省,广州市,海珠区"
			},
			{
				"provinceId": "440000000000",
				"simpleName": "天河",
				"lon": "113.36112",
				"areaCode": "020",
				"cityId": "440100000000",
				"remark": "",
				"prePinYin": "T",
				"id": "440106000000",
				"pinYin": "Tianhe",
				"parentId": "440100000000",
				"level": 3,
				"areaName": "天河区",
				"simplePy": "TH",
				"zipCode": "510000",
				"countyId": "440106000000",
				"lat": "23.12467",
				"wholeName": "中国,广东省,广州市,天河区"
			},
			{
				"provinceId": "440000000000",
				"simpleName": "白云",
				"lon": "113.27307",
				"areaCode": "020",
				"cityId": "440100000000",
				"remark": "",
				"prePinYin": "B",
				"id": "440111000000",
				"pinYin": "Baiyun",
				"parentId": "440100000000",
				"level": 3,
				"areaName": "白云区",
				"simplePy": "BY",
				"zipCode": "510000",
				"countyId": "440111000000",
				"lat": "23.15787",
				"wholeName": "中国,广东省,广州市,白云区"
			},
			{
				"provinceId": "440000000000",
				"simpleName": "黄埔",
				"lon": "113.45895",
				"areaCode": "020",
				"cityId": "440100000000",
				"remark": "",
				"prePinYin": "H",
				"id": "440112000000",
				"pinYin": "Huangpu",
				"parentId": "440100000000",
				"level": 3,
				"areaName": "黄埔区",
				"simplePy": "HP",
				"zipCode": "510700",
				"countyId": "440112000000",
				"lat": "23.10642",
				"wholeName": "中国,广东省,广州市,黄埔区"
			},
			{
				"provinceId": "440000000000",
				"simpleName": "番禺",
				"lon": "113.38397",
				"areaCode": "020",
				"cityId": "440100000000",
				"remark": "",
				"prePinYin": "P",
				"id": "440113000000",
				"pinYin": "Panyu",
				"parentId": "440100000000",
				"level": 3,
				"areaName": "番禺区",
				"simplePy": "PY",
				"zipCode": "511400",
				"countyId": "440113000000",
				"lat": "22.93599",
				"wholeName": "中国,广东省,广州市,番禺区"
			},
			{
				"provinceId": "440000000000",
				"simpleName": "花都",
				"lon": "113.22033",
				"areaCode": "020",
				"cityId": "440100000000",
				"remark": "",
				"prePinYin": "H",
				"id": "440114000000",
				"pinYin": "Huadu",
				"parentId": "440100000000",
				"level": 3,
				"areaName": "花都区",
				"simplePy": "HD",
				"zipCode": "510800",
				"countyId": "440114000000",
				"lat": "23.40358",
				"wholeName": "中国,广东省,广州市,花都区"
			},
			{
				"provinceId": "440000000000",
				"simpleName": "从化",
				"lon": "113.587386",
				"areaCode": "020",
				"cityId": "440100000000",
				"remark": "",
				"prePinYin": "C",
				"id": "440117000000",
				"pinYin": "Conghua",
				"parentId": "440100000000",
				"level": 3,
				"areaName": "从化区",
				"simplePy": "CH",
				"zipCode": "510900",
				"countyId": "440117000000",
				"lat": "23.545283",
				"wholeName": "中国,广东省,广州市,从化区"
			},
			{
				"provinceId": "440000000000",
				"simpleName": "增城",
				"lon": "113.829579",
				"areaCode": "020",
				"cityId": "440100000000",
				"remark": "",
				"prePinYin": "Z",
				"id": "440118000000",
				"pinYin": "Zengcheng",
				"parentId": "440100000000",
				"level": 3,
				"areaName": "增城区",
				"simplePy": "ZC",
				"zipCode": "511300",
				"countyId": "440118000000",
				"lat": "23.290497",
				"wholeName": "中国,广东省,广州市,增城区"
			},
			{
				"provinceId": "440000000000",
				"simpleName": "南沙",
				"lon": "113.60845",
				"areaCode": "020",
				"cityId": "440100000000",
				"remark": "国家级新区6",
				"prePinYin": "N",
				"id": "440115000000",
				"pinYin": "Nansha",
				"parentId": "440100000000",
				"level": 3,
				"areaName": "南沙新区",
				"simplePy": "NS",
				"zipCode": "511458",
				"countyId": "440115000000",
				"lat": "22.77144",
				"wholeName": "中国,广东省,广州市,南沙新区"
			}
		]
	}
}