接口:获取城市列表
接口地址:http://api.wxbus163.cn/z_busapi/BusApi.php
返回格式:json
请求方式:POST/GET
请求示例:http://api.wxbus163.cn/z_busapi/BusApi.php?optype=city&uname=158xxxxxxxx
请求参数说明:
名称 | 必填 | 类型 | 说明 | |
---|---|---|---|---|
optype | 是 | string | 固定值:city | |
uname | 是 | string | 笑园API账号(用户名) |
返回参数说明:
名称 | 类型 | 说明 | |
---|---|---|---|
return_code | string | ok正常,error出错 | |
error_code | string | 错误代码,0正常 | |
returl_list | array | 返回城市列表 | |
├ cityid | string | 城市ID | |
├ cityname | string | 城市名称 |
返回示例:
{"return_code":"ok","error_code":"0","returl_list":[{"cityid":"132","city":"\u963f\u52d2\u6cf0\u5730\u533a\u963f\u52d2\u6cf0\u5e02"},{"cityid":"76","city":"\u5b89\u9633\u5e02"},....]}
接口:搜索公交路线
接口地址:http://api.wxbus163.cn/z_busapi/BusApi.php
返回格式:json
请求方式:POST/GET
请求示例:http://api.wxbus163.cn/z_busapi/BusApi.php?optype=luxian&uname=158xxxxxxxx&cityid=85&keywords=3&keySecret=xxxxxxxxxxxxx
请求参数说明:
名称 | 必填 | 类型 | 说明 | |
---|---|---|---|---|
optype | 是 | string | 固定值:luxian | |
uname | 是 | string | 笑园API账号(用户名) | |
cityid | 是 | int | 城市ID(城市API获得) | |
keywords | 是 | string | 公交搜索 如:3(搜索3路公交) | |
keySecret | 是 | string | 签名 MD5(uname+key+optype) 为32位小写 |
签名keySecret使用md5加密 MD5(uname+key+optype),其中key值可在会员中心获取,获取KEY值
返回参数说明:
名称 | 类型 | 说明 | |
---|---|---|---|
return_code | string | ok正常,error出错 | |
error_code | string | 错误代码,0正常 | |
returl_list | array | 搜索公交结果 | |
├ bus_stastan | string | 起始站 | |
├ bus_endstan | string | 终点站 | |
├ bus_linestrid | string | 路线ID | |
├ bus_linenum | string | 路线编号 | |
├ bus_staname | string | 路线名称 |
返回示例:
{"return_code":"ok","error_code":"0","returl_list":[{"bus_endstan":"\u4e1c\u5c71\u603b\u7ad9\uff08\u9f9f\u5c97\uff09","bus_linestrid":"MDIwLTAwMDMwLTE=","bus_linenum":"00030","bus_staname":"3"},...]}
接口:公交实时位置
接口地址:http://api.wxbus163.cn/z_busapi/BusApi.php
返回格式:json
请求方式:POST/GET
请求示例:http://api.wxbus163.cn/z_busapi/BusApi.php?optype=rtbus&uname=158xxxxxxxx&cityid=85&bus_linestrid=MDIwLTAwMDMwLTE=&bus_linenum=00030&bus_staname=3&keySecret=xxxxxxxxxxxx
请求参数说明:
名称 | 必填 | 类型 | 说明 | |
---|---|---|---|---|
optype | 是 | string | 固定值:rtbus | |
uname | 是 | string | 笑园API账号(用户名) | |
cityid | 是 | int | 城市ID(城市API获得) | |
bus_linestrid | 是 | string | 路线ID(路线API获得) | |
bus_linenum | 是 | string | 路线编号(路线API获得) | |
bus_staname | 是 | string | 路线名称(路线API获得) | |
keySecret | 是 | string | 签名 MD5(uname+key+optype) 为32位小写 |
签名keySecret使用md5加密 MD5(uname+key+optype),其中key值可在会员中心获取,获取KEY值
返回参数说明:
名称 | 类型 | 说明 | |
---|---|---|---|
return_code | string | ok正常,error出错 | |
error_code | string | 错误代码,0正常 | |
returl_list | array | 返回结果集 | |
lineinfo | array | 路线信息 | |
├ bus_staname | string | 路线名称 | |
├ sta_sta | string | 起始站 | |
├ end_sta | string | 终点站 | |
├ fir_time | string | 首班车时间 | |
├ end_time | string | 末班车时间 | |
├ bus_money | string | 票价 | |
├ other_lineid | string | 反向路线ID(用于查询反向实时路线信息) | |
stations | array | 站点信息 | |
├ bus_staname | string | 站点名称 | |
├ lng_lat | string | 站点经纬度 | |
buses | array | 公交位置 | |
├ lating | string | 纬度 | |
├ longing | string | 经度 | |
├ distance | int | 距离(米) | |
├ dis_stat | int | 距第几个站点(如:2,距离第2个站还有distance米,distance是0为已到站!) |
返回示例:
{"return_code":"ok","error_code":"0","returl_list":{"lineinfo":{"bus_staname":"3","sta_sta":"\u5982\u610f\u574a\u603b\u7ad9","end_sta":"\u4e1c\u5c71\u603b\u7ad9\uff08\u9f9f\u5c97\uff09","fir_time":"06:00","end_time":"23:00","bus_money":"2\u5143","stationnum":17,"other_lineid":"MDIwLTAwMDMwLTA="},"stations":....]}}
接口:发车时刻表
接口地址:http://api.wxbus163.cn/z_busapi/BusApi.php
返回格式:json
请求方式:POST/GET
请求示例:http://api.wxbus163.cn/z_busapi/BusApi.php?optype=btimept&uname=158xxxxxxxx&cityid=85&bus_staname=3&keySecret=216e6xxxxxxxxxxxx14f21
请求参数说明:
名称 | 必填 | 类型 | 说明 | |
---|---|---|---|---|
optype | 是 | string | 固定值:btimept | |
uname | 是 | string | 笑园API账号(用户名) | |
cityid | 是 | int | 城市ID(城市API获得) | |
bus_staname | 是 | string | 路线名称 | |
keySecret | 是 | string | 签名 MD5(uname+key+optype) 为32位小写 |
签名keySecret使用md5加密 MD5(uname+key+optype),其中key值可在会员中心获取,获取KEY值
返回参数说明:
名称 | 类型 | 说明 | |
---|---|---|---|
return_code | string | ok正常,error出错 | |
error_code | string | 错误代码,0正常 | |
returl_list | string | 发车时刻结果 |
返回示例:
无
接口:附近公交站(查询附近站点以及站点路线)
接口地址:http://api.wxbus163.cn/z_busapi/BusApi.php
返回格式:json
请求方式:POST/GET
请求示例:http://api.wxbus163.cn/z_busapi/BusApi.php?optype=ptnear&uname=158xxxxxxxx&keySecret=a7f2bbea1********55923a&xylat=40.040589&xylng=116.273543
请求参数说明:
名称 | 必填 | 类型 | 说明 | |
---|---|---|---|---|
optype | 是 | string | 固定值:ptnear | |
uname | 是 | string | 笑园API账号(用户名) | |
xylat | 是 | float | 用户位置(纬度) | |
xylng | 是 | float | 用户位置(经度) | |
keySecret | 是 | string | 签名 MD5(uname+key+optype) 为32位小写 |
签名keySecret使用md5加密 MD5(uname+key+optype),其中key值可在会员中心获取,获取KEY值
返回参数说明:
名称 | 类型 | 说明 | |
---|---|---|---|
return_code | string | ok正常,error出错 | |
error_code | string | 错误代码,0正常 | |
returl_list | array | 搜索公交结果 | |
├ title | string | 站点名称 | |
├ lat | string | 纬度 | |
├ lng | string | 经度 | |
├ xydistance | float | 距离/米 | |
├ buslist | array | 路线列表(路线名称-用于公交路线接口查询路线信息) |
返回示例:
{"status":1,"list":[{"title":"\u767e\u5ea6\u79d1\u6280\u56ed","buslist":["\u8f6f\u4ef6\u56ed\u901a\u52e4\u73af\u7ebf(\u4e00\u4e8c\u671f)","\u8f6f\u4ef6\u56ed\u4e8c\u671f\u901a\u52e4\u8f66"],"lat":40.045,"lng":116.275628},...]}
接口:换乘-地点搜索(起始地址和目的地搜索)
接口地址:http://api.wxbus163.cn/z_busapi/BusApi.php
返回格式:json
请求方式:POST/GET
请求示例:http://api.wxbus163.cn/z_busapi/BusApi.php?optype=tfrone&uname=158xxxxxxxx&keySecret=a56be854666bd333673321de4369e8db&cityname=广州&keywords=白云机场
请求参数说明:
名称 | 必填 | 类型 | 说明 | |
---|---|---|---|---|
optype | 是 | string | 固定值:tfrone | |
uname | 是 | string | 笑园API账号(用户名) | |
cityname | 是 | string | 城市名称 | |
keywords | 是 | string | 搜索关键词(搜索起始地址和目的地) | |
keySecret | 是 | string | 签名 MD5(uname+key+optype) 为32位小写 |
签名keySecret使用md5加密 MD5(uname+key+optype),其中key值可在会员中心获取,获取KEY值
返回参数说明:
名称 | 类型 | 说明 | |
---|---|---|---|
return_code | string | ok正常,error出错 | |
error_code | string | 错误代码,0正常 | |
returl_list | array | 返回结果 | |
├ xyname | string | 地址名称 | |
├ xyaddress | string | 城市 | |
├ imlgn | string | 地址标识 |
返回示例:
暂无
接口:换乘-路线规划
接口地址:http://api.wxbus163.cn/z_busapi/BusApi.php
返回格式:json
请求方式:POST/GET
请求示例:http://api.wxbus163.cn/z_busapi/BusApi.php?optype=tfrtwo&uname=158xxxxxxxx&keySecret=b65586b3aa94c016f43658730dbd5555&stasta=广州图书馆&staimlgn=MKEzLjc1MjYwLiwyMy4wUDPxMTI=&endsta=广州动物园&endimlgn=MTKdLjczNTA5KAwyMy4wYHGyMTc=
请求参数说明:
名称 | 必填 | 类型 | 说明 | |
---|---|---|---|---|
optype | 是 | string | 固定值:tfrtwo | |
uname | 是 | string | 笑园API账号(用户名) | |
stasta | 是 | string | 起始地址 | |
staimlgn | 是 | string | 起始地址标识(由地点搜索接口获得) | |
endsta | 是 | string | 目的地地址 | |
endimlgn | 是 | string | 目的地标识(由地点搜索接口获得) | |
keySecret | 是 | string | 签名 MD5(uname+key+optype) 为32位小写 |
签名keySecret使用md5加密 MD5(uname+key+optype),其中key值可在会员中心获取,获取KEY值
返回参数说明:
名称 | 类型 | 说明 | |
---|---|---|---|
return_code | string | ok正常,error出错 | |
error_code | string | 错误代码,0正常 | |
sta_station | string | 起始地址 | |
end_station | string | 目的地地址 | |
returl_list | array | 返回结果 | |
├ xcdist | string | 全程距离 | |
├ xcprice | string | 价格 | |
├ xydurtime | string | 时间 | |
├ xywalkdist | string | 步行距离 | |
├ xytitle | array | 线路 | |
lineinfo | array | 站点详情信息 | |
├ stype | int | 类型:1上车点,2换乘或步行,3途经点,4下车点 |
返回示例:
暂无
接口:附近公共厕所
接口地址:http://api.wxbus163.cn/z_busapi/BusApi.php
返回格式:json
请求方式:POST/GET
请求示例:http://api.wxbus163.cn/z_busapi/BusApi.php?optype=toilet&uname=158xxxxxxxx&keySecret=bfa55v48ef8e3de8e97f32c2234d25ff&xylat=40.040589&xylng=116.273543
请求参数说明:
名称 | 必填 | 类型 | 说明 | |
---|---|---|---|---|
optype | 是 | string | 固定值:toilet | |
uname | 是 | string | 笑园API账号(用户名) | |
xylat | 是 | string | 用户所在纬度 | |
xylng | 是 | string | 用户所在经度 | |
keySecret | 是 | string | 签名 MD5(uname+key+optype) 为32位小写 |
签名keySecret使用md5加密 MD5(uname+key+optype),其中key值可在会员中心获取,获取KEY值
返回参数说明:
名称 | 类型 | 说明 | |
---|---|---|---|
return_code | string | ok正常,error出错 | |
error_code | string | 错误代码,0正常 | |
returl_list | array | 返回结果 | |
├ title | string | 名称 | |
├ address | string | 详细地址 | |
├ xydistance | string | 距离(米) | |
├ lat | string | 纬度(用于地图导航) | |
├ lng | string | 经度(用于地图导航) |
返回示例:
暂无
接口:附近地铁站
接口地址:http://api.wxbus163.cn/z_busapi/BusApi.php
返回格式:json
请求方式:POST/GET
请求示例:http://api.wxbus163.cn/z_busapi/BusApi.php?optype=subway&uname=158xxxxxxxx&keySecret=bfa55v48ef8e3de8e97f32c2234d25ff&xylat=40.040589&xylng=116.273543
请求参数说明:
名称 | 必填 | 类型 | 说明 | |
---|---|---|---|---|
optype | 是 | string | 固定值:subway | |
uname | 是 | string | 笑园API账号(用户名) | |
xylat | 是 | string | 用户所在纬度 | |
xylng | 是 | string | 用户所在经度 | |
keySecret | 是 | string | 签名 MD5(uname+key+optype) 为32位小写 |
签名keySecret使用md5加密 MD5(uname+key+optype),其中key值可在会员中心获取,获取KEY值
返回参数说明:
名称 | 类型 | 说明 | |
---|---|---|---|
return_code | string | ok正常,error出错 | |
error_code | string | 错误代码,0正常 | |
returl_list | array | 返回结果 | |
├ title | string | 站点名称 | |
├ address | string | 地铁线路 | |
├ xydistance | string | 距离(米) | |
├ lat | string | 纬度(用于地图导航) | |
├ lng | string | 经度(用于地图导航) |
返回示例:
暂无
常用错误代码说明:
002:账号已到期 003:暂无相关结果,或关键词有误 004:路线信息有误 005:站点信息有误 007:签名有误(注:需md5的32位加密)