接口地址:http://route.showapi.com/1998-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、应用级参数(每个接入点有自己的参数,当前接入点的参数见下表): 展开收起
参数名称 类型 默认值 示例值 必须 描述 building String 否 建筑物的POI编号 传入建筑物POI编号之后,则只在该建筑物之内进行搜索 city String 否 查询城市 可选值:城市中文、中文全拼、citycode、adcode 如:北京/beijing/010/110000 填入此参数后,会尽量优先返回此城市数据,但是不一定仅局限此城市结果,若仅需要某个城市数据请调用citylimit参数。 如:在深圳市搜天安门,返回北京天安门结果。 keywords String 昆明 是 查询关键字 规则: 多个关键字用“|”分割 若不指定city,并且搜索的为泛词(例如“美食”)的情况下,返回的内容为城市列表以及此城市内有多少结果符合要求。 page String 否 当前页数 最大翻页数100 types String 汽车租赁 是 查询POI类型 多个类型用“|”分割; 可选值:分类代码 或 汉字(若用汉字,请严格按照附件之中的汉字填写) 分类代码由六位数字组成,一共分为三个部分,前两个数字代表大类;中间两个数字代表中类;最后两个数字代表小类。 若指定了某个大类,则所属的中类、小类都会被显示。 例如:010000为汽车服务(大类) 010100为加油站(中类) 010101为中国石化(小类) 010900为汽车租赁(中类) 010901为汽车租赁还车(小类) 当指定010000,则010100等中类、010101等小类都会被包含。 当指定010900,则010901等小类都会被包含 下载POI分类编码和城市编码表(http://lbs.amap.com/api/webservice/guide/api/search#text) 若不指定city,返回的内容为城市列表以及此城市内有多少结果符合要求。 当您的keywords和types都是空时,默认指定types为120000(商务住宅)&150000(交通设施服务) ...
请求示例:String res=new ShowApiRequest("http://route.showapi.com/1998-1","my_appId","my_appSecret") .addTextPara("building","") .addTextPara("city","") .addTextPara("keywords","昆明") .addTextPara("page","") .addTextPara("types","汽车租赁") .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数据结构): 展开收起
名称 类型 示例值 描述 status String 1 结果状态值,值为0或1 0:请求失败;1:请求成功 count String 20 搜索方案数目(最大值为1000) info String OK 返回状态说明 status为0时,info返回错误原因,否则返回“OK”。详情参阅info状态表 infocode String 10000 详情参阅info状态表 suggestion Object 城市建议列表 当用户输入的词语为泛搜索词的时候,将显示城市列表 - keywords String[] [] 唯一ID - cities String[] [] 城市列表 pois Object[] 搜索POI信息列表 - Object POI信息 - id String B000A60DA1 唯一ID - name String 天安门 名称 - type String 风景名胜;风景名胜;国家级景点 兴趣点类型 顺序为大类、中类、小类 例如:餐饮服务;中餐厅;特色/地方风味餐厅 - typecode String 110202 兴趣点类型编码 例如:050118 - biz_type String tour 行业类型 - address String 东长安街 地址 - location String 116.397477,39.908692 经纬度 - tel String 010-63095630;010-63095745;010-63095718 该POI的电话 - distance String[] [] 离中心点距离 单位:米 必须说明, 此结果仅在周边搜索的时候有值 - biz_ext String[] [] 深度信息 extensions=all的时候显示 - pname String 北京市 poi所在省份名称 若是直辖市的时候,此处直接显示市名,例如北京市 - cityname String 北京市 城市名 若是直辖市的时候,此处直接显示市名,例如北京市 - adname String 东城区 区域名称 区县级别的返回,例如朝阳区 - importance String[] [] - shopid String[] [] - shopinfo String 2 - poiweight String[] [] ...
返回示例:{
"status": "1",
"count": "20",
"info": "OK",
"infocode": "10000",
"suggestion": {
"keywords": [],
"cities": []
},
"pois": [
{
"id": "B000A60DA1",
"name": "天安门",
"type": "风景名胜;风景名胜;国家级景点",
"typecode": "110202",
"biz_type": "tour",
"address": "东长安街",
"location": "116.397477,39.908692",
"tel": "010-63095630;010-63095745;010-63095718",
"distance": [],
"biz_ext": [],
"pname": "北京市",
"cityname": "北京市",
"adname": "东城区",
"importance": [],
"shopid": [],
"shopinfo": "2",
"poiweight": []
},
{
"id": "BV10006499",
"name": "天安门东(地铁站)",
"type": "交通设施服务;地铁站;地铁站",
"typecode": "150500",
"biz_type": [],
"address": "1号线",
"location": "116.401216,39.907780",
"tel": [],
"distance": [],
"biz_ext": [],
"pname": "北京市",
"cityname": "北京市",
"adname": "东城区",
"importance": [],
"shopid": [],
"shopinfo": "2",
"poiweight": []
},
{
"id": "BV10005941",
"name": "天安门西(地铁站)",
"type": "交通设施服务;地铁站;地铁站",
"typecode": "150500",
"biz_type": [],
"address": "1号线",
"location": "116.391278,39.907472",
"tel": [],
"distance": [],
"biz_ext": [],
"pname": "北京市",
"cityname": "北京市",
"adname": "西城区",
"importance": [],
"shopid": [],
"shopinfo": "2",
"poiweight": []
},
{
"id": "B000A83C1S",
"name": "天安门广场",
"type": "风景名胜;公园广场;城市广场",
"typecode": "110105",
"biz_type": "tour",
"address": "东长安街",
"location": "116.397726,39.903767",
"tel": [],
"distance": [],
"biz_ext": [],
"pname": "北京市",
"cityname": "北京市",
"adname": "东城区",
"importance": [],
"shopid": [],
"shopinfo": "2",
"poiweight": []
},
{
"id": "B000A9PIVP",
"name": "天安门华表",
"type": "风景名胜;风景名胜;风景名胜",
"typecode": "110200",
"biz_type": "tour",
"address": "东长安街天安门内",
"location": "116.396911,39.908058",
"tel": [],
"distance": [],
"biz_ext": [],
"pname": "北京市",
"cityname": "北京市",
"adname": "东城区",
"importance": [],
"shopid": [],
"shopinfo": "2",
"poiweight": []
},
{
"id": "B0FFF5I0LC",
"name": "天安门前石狮子",
"type": "风景名胜;风景名胜;风景名胜",
"typecode": "110200",
"biz_type": "tour",
"address": "东长安街天安门内",
"location": "116.397050,39.907908",
"tel": [],
"distance": [],
"biz_ext": [],
"pname": "北京市",
"cityname": "北京市",
"adname": "东城区",
"importance": [],
"shopid": [],
"shopinfo": "2",
"poiweight": []
},
{
"id": "B0FFFDGWE7",
"name": "天安门观礼台",
"type": "风景名胜;风景名胜;风景名胜",
"typecode": "110200",
"biz_type": "tour",
"address": "东长安街天安门内",
"location": "116.396590,39.908363",
"tel": [],
"distance": [],
"biz_ext": [],
"pname": "北京市",
"cityname": "北京市",
"adname": "东城区",
"importance": [],
"shopid": [],
"shopinfo": "2",
"poiweight": []
},
{
"id": "B000A7VMK9",
"name": "端门",
"type": "风景名胜;风景名胜;风景名胜",
"typecode": "110200",
"biz_type": "tour",
"address": "天安门城楼与故宫之间",
"location": "116.397274,39.910404",
"tel": [],
"distance": [],
"biz_ext": [],
"pname": "北京市",
"cityname": "北京市",
"adname": "东城区",
"importance": [],
"shopid": [],
"shopinfo": "2",
"poiweight": []
},
{
"id": "B0FFFRLTUT",
"name": "天安门广场-国旗",
"type": "风景名胜;风景名胜;风景名胜",
"typecode": "110200",
"biz_type": "tour",
"address": "西长安街附近",
"location": "116.397554,39.906928",
"tel": [],
"distance": [],
"biz_ext": [],
"pname": "北京市",
"cityname": "北京市",
"adname": "东城区",
"importance": [],
"shopid": [],
"shopinfo": "2",
"poiweight": []
},
{
"id": "B0FFG8YDKK",
"name": "天安门-城楼",
"type": "风景名胜;风景名胜;国家级景点",
"typecode": "110202",
"biz_type": "tour",
"address": "东长安街天安门",
"location": "116.397573,39.908743",
"tel": [],
"distance": [],
"biz_ext": [],
"pname": "北京市",
"cityname": "北京市",
"adname": "东城区",
"importance": [],
"shopid": [],
"shopinfo": "2",
"poiweight": []
}
]
}
易源数据通过打破资源壁垒,搭建起数据资源的基础设施,将接口纳入统一的接口池,把多个异构数据源合并到同一根管线上,以统一的访问和控制方式,对外提供统一格式的数据。
让开发者可以像搭积木一样通过各种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