最新最全的全国省、市、区县、乡镇的分级查询,同时支持县级以上的邮政编码、区号、经纬度的查询。国内数据与国家民政部统计的数据同步更新,其准确性和及时性可以保证。本接口同时收录了港澳台的相关数据,欢迎使用.
接口地址: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 是 为了验证用户身份,以及确保参数不被中间人篡改,需要传递调用者的数字签名。 可选,在url后带上appid和secret即可 showapi_timestamp String 20141114142239 否 客户端时间。
格式yyyyMMddHHmmss,如20141114142239
为了在一定程度上防止“重放攻击”,平台只接受在10分钟之内的请求。如果不传或传空串,则系统不再做此字段的检测。showapi_res_gzip String 1或0 否 返回值是否用gzip方式压缩。此值为1时将压缩,其他值不压缩。 ... 2、应用级参数(每个接入点有自己的参数,当前接入点的参数见下表):
参数名称 类型 默认值 示例值 必须 描述 parentId String 440100000000 是 上级的ID,该ID可以在"区域查询"接入点中查找
请求示例:String res=new ShowApiRequest("http://route.showapi.com/1149-2","my_appId","my_appSecret") .addTextPara("parentId","440100000000") .post(); System.out.println(res);
三、返回参数/ 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,服务不存在或未上线
-7, API创建者的网关资源不足
-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受限
-1014,token权限无效
showapi_res_error String 用户输入有误! 错误信息的展示 showapi_res_id String ce135f6739294c63be0c021b76b6fbff 本次请求id ... 2、应用级参数(系统级输出参数showapi_res_body字段中的json数据结构): 展开收起
名称 类型 示例值 描述 ret_code String 0 接口调用是否成功 data Object[] 子区域列表 - provinceId String 440000000000 省级编码 - simpleName String 荔湾 区域名简称 - areaCode String 020 区号 - cityId String 440100000000 市级编码 - remark String 备注 - pinYin String Liwan 区域名称的全拼 - prePinYin String L 拼音首字母 - parentId String 440100000000 上级编码 - level String 3 区域级别 1 省级 2市级 3区县 - areaName String 荔湾区 区域名称 - lat String 纬度 - lon String 经度 - simplePy String Lw 简拼 - zipCode String 510000 邮编 - countyId String 440103000000 区县编码 ...
返回示例:{
"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": "中国,广东省,广州市,南沙新区"
}
]
}
}
接口地址:http://route.showapi.com/1149-1 (注意:接口支持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 是 为了验证用户身份,以及确保参数不被中间人篡改,需要传递调用者的数字签名。 可选,在url后带上appid和secret即可 showapi_timestamp String 20141114142239 否 客户端时间。
格式yyyyMMddHHmmss,如20141114142239
为了在一定程度上防止“重放攻击”,平台只接受在10分钟之内的请求。如果不传或传空串,则系统不再做此字段的检测。showapi_res_gzip String 1或0 否 返回值是否用gzip方式压缩。此值为1时将压缩,其他值不压缩。 ... 2、应用级参数(每个接入点有自己的参数,当前接入点的参数见下表): 展开收起
参数名称 类型 默认值 示例值 必须 描述 level String 2否 区域级别areaName String 州否 区域名称page String 1 1否 当前页数,分页时用maxSize String 20 5否 每页获取的最大数据条数,最大值为20...
请求示例:String res=new ShowApiRequest("http://route.showapi.com/1149-1","my_appId","my_appSecret") .addTextPara("level","2") .addTextPara("areaName","州") .addTextPara("page","1") .addTextPara("maxSize","5") .post(); System.out.println(res);
三、返回参数/ 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,服务不存在或未上线
-7, API创建者的网关资源不足
-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受限
-1014,token权限无效
showapi_res_error String 用户输入有误! 错误信息的展示 showapi_res_id String ce135f6739294c63be0c021b76b6fbff 本次请求id ... 2、应用级参数(系统级输出参数showapi_res_body字段中的json数据结构): 展开收起
名称 类型 示例值 描述 ret_code Number 0 接口调用是否成功,0为成功,其他值为失败...
返回示例:{
"showapi_res_code": 0,
"showapi_res_error": "",
"showapi_res_body": {
"ret_code": 0,
"flag": true,
"page":1,
"maxSize":5,
"data": [
{
"provinceId": "330000000000",
"simpleName": "衢州",
"lon": "118.87263",
"areaCode": "0570",
"cityId": "330800000000",
"remark": "",
"prePinYin": "Q",
"id": "330800000000",
"pinYin": "Quzhou",
"parentId": "330000000000",
"level": 2,
"areaName": "衢州市",
"simplePy": "QZ",
"zipCode": "324000",
"countyId": "0",
"lat": "28.941708",
"wholeName": "中国,浙江省,衢州市"
},
{
"provinceId": "340000000000",
"simpleName": "滁州",
"lon": "118.316264",
"areaCode": "0550",
"cityId": "341100000000",
"remark": "",
"prePinYin": "C",
"id": "341100000000",
"pinYin": "Chuzhou",
"parentId": "340000000000",
"level": 2,
"areaName": "滁州市",
"simplePy": "CZ",
"zipCode": "239000",
"countyId": "0",
"lat": "32.303627",
"wholeName": "中国,安徽省,滁州市"
},
{
"provinceId": "340000000000",
"simpleName": "宿州",
"lon": "116.984084",
"areaCode": "0557",
"cityId": "341300000000",
"remark": "",
"prePinYin": "S",
"id": "341300000000",
"pinYin": "Suzhou",
"parentId": "340000000000",
"level": 2,
"areaName": "宿州市",
"simplePy": "SZ",
"zipCode": "234000",
"countyId": "0",
"lat": "33.633891",
"wholeName": "中国,安徽省,宿州市"
},
{
"provinceId": "340000000000",
"simpleName": "亳州",
"lon": "115.782939",
"areaCode": "0558",
"cityId": "341600000000",
"remark": "",
"prePinYin": "B",
"id": "341600000000",
"pinYin": "Bozhou",
"parentId": "340000000000",
"level": 2,
"areaName": "亳州市",
"simplePy": "BZ",
"zipCode": "236000",
"countyId": "0",
"lat": "33.869338",
"wholeName": "中国,安徽省,亳州市"
},
{
"provinceId": "340000000000",
"simpleName": "池州",
"lon": "117.489157",
"areaCode": "0566",
"cityId": "341700000000",
"remark": "",
"prePinYin": "C",
"id": "341700000000",
"pinYin": "Chizhou",
"parentId": "340000000000",
"level": 2,
"areaName": "池州市",
"simplePy": "CZ",
"zipCode": "247100",
"countyId": "0",
"lat": "30.656037",
"wholeName": "中国,安徽省,池州市"
}
]
}
}
易源数据通过打破资源壁垒,搭建起数据资源的基础设施,将接口纳入统一的接口池,把多个异构数据源合并到同一根管线上,以统一的访问和控制方式,对外提供统一格式的数据。
让开发者可以像搭积木一样通过各种API操纵资源。
截至2017年12月,平台已经拥有API接口230个,日调用量2000万,覆盖全网10万+真实消费者,为超过3000+的企业用户提供全域数据服务。
电话: 4009988033
微博: http://www.weibo.com/showapi
邮箱: services@showapi.com
QQ: 3007663665
微信: show_api
企业和程序员可以通过进制数据封装的API或SDK极速接入其他数据资源,同时进制数据提供数据交易等服务。通过进制数据,不仅开发成本极大降低,而且可以获得其他丰富的数据服务:数据交易,数据分析,区块链Token管理等服务。
电话:173-6457-5198
QQ① 群:792473404
客服 QQ:1643296538
微信客服:binstds
扫描二维码添加客服微信
周一至周五 9:00 - 21:00(其中周三为 9:00 - 18:00)
周六 9:00 - 12:00(节假日除外)
进制数据团队
2020.01.01