12306实时余票查询接口
12306实时余票查询接口代码文档及返回示例分享,可查询实时火车票余票,包括车次、车
次始发站、车次终点站、出发时间、到达时间、车次类型、总历时时间等等。
接口名称:12306实时余票查询接口
接口平台:聚合数据
接口地址:/train/yp
支持格式:JSO/XML
请求方式:HTTP GET/POST
请求示例:/train/yp?key=申请的
KEY&dtype=json&from=%E4%B8%8A%E6%B5%B7%E8%99%B9%E6%A1%A5&to=%E6%
B8%A9%E5%B7%9E&date=2014-06-28&tt=
接口备注:火车余票查询
12306实时余票查询接口调用代码JSO返回示例:
{
"reason": "查询成功",
"result": [
{
"train_no": "D2287", /*车次*/
"start_station_name": "上海虹桥", /*车次始发站*/
"end_station_name": "深圳北", /*车次终点站*/
"from_station_name": "上海虹桥", /*出发站*/
"to_station_name": "温州南", /*到达站*/
"start_time": "06:25", /*出发时间*/
"arrive_time": "10:53", /*到达时间*/
"train_class_name": "动车", /*车次类型*/
"day_difference": "0", /*历时天数*/
"lishi": "04:28", /*总历时时间*/
"gr_num": "--", /*高级软卧:-- 说明无该席位*/
"qt_num": "--", /*其他*/
"rw_num": "--", /*软卧*/
"rz_num": "--", /*软座*/
"tz_num": "--", /*特等座*/
"wz_num": "无", /*无座*/
"yw_num": "--", /*硬卧*/
"yz_num": "--", /*硬座*/
"ze_num": "无", /*二等座*/
"zy_num": "无", /*一等座*/
"swz_num": "--" /*商务座*/
},
{
"train_no": "D3203",
"start_station_name": "上海虹桥",
"end_station_name": "厦门北",
"from_station_name": "上海虹桥",
"to_station_name": "温州南",
"start_time": "06:30",
"arrive_time": "11:09",
"train_class_name": "动车",
"day_difference": "0",
"lishi": "04:39",
"gr_num": "--",
"qt_num": "--",
"rw_num": "--",
"rz_num": "--",
"tz_num": "--",
"wz_num": "无",
"yw_num": "--",
"yz_num": "--",
"ze_num": "无",
"zy_num": "无",
"swz_num": "--"
},
{
"train_no": "G7501",
"start_station_name": "上海虹桥",
"end_station_name": "苍南",
"from_station_name": "上海虹桥",
"to_station_name": "温州南",
"start_time": "07:00",
"arrive_time": "11:00",
"train_class_name": "",
"day_difference": "0",
"lishi": "04:00",
"gr_num": "--",
"qt_num": "--",
"rw_num": "--",
"rz_num": "--",
"tz_num": "--",
"wz_num": "165",
"yw_num": "--",
"yz_num": "--",
"ze_num": "无",
"zy_num": "无",
"swz_num": "15"
}
],
"error_code": 0
}
本文发布于:2023-05-26 12:20:12,感谢您对本站的认可!
本文链接:https://www.wtabcd.cn/falv/fa/87/116543.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
留言与评论(共有 0 条评论) |