火车到站时间接口,支持站到站列车信息检索,查询列次、列次类型、出发站、出发站类型、到达站、到达站类型、发车时间、到达时间、历时、里程、价格列表等相关内容。
接口名称:火车到站时间接口
接口平台:开放api
接口地址:http://op.juhe.cn/onebox/train/query_ab
支持格式:json
请求方式:http get
请求示例:http://op.juhe.cn/onebox/train/query_ab.php?key=您的APPKEY&from=%E4%B8%8A%E6%B5%B7&to=%E8%A5%BF%E5%AE%89
火车到站时间接口调用JSON返回示例:
{ "reason": "查询成功", "result": { "list": [ /*列次列表*/ { "train_no": "D311", /*列次*/ "train_type": "动车", /*列车类型*/ "start_station": "苏州", /*出发站*/ "start_station_type": "过", /*出发站类型*/ "end_station": "上海", /*到达站*/ "end_station_type": "终", /*到达站类型*/ "start_time": "08:09", /*发车时间*/ "end_time": "08:58", /*到达时间*/ "run_time": "49分", /*历时*/ "run_distance": "", /*里程*/ "price_list": [ /*价格列表*/ { "price_type": "无座", "price": "24.5" }, { "price_type": "软卧", "price": "189.5" } ] }, { "train_no": "T54", "train_type": "特快", "start_station": "苏州", "start_station_type": "过", "end_station": "上海", "end_station_type": "终", "start_time": "13:37", "end_time": "14:31", "run_time": "54分", "run_distance": "", "price_list": [ { "price_type": "无座", "price": "14.5" }, { "price_type": "硬座", "price": "14.5" }, { "price_type": "硬卧上", "price": "60.5" }, { "price_type": "硬卧中", "price": "25" }, { "price_type": "硬卧下", "price": "68.5" }, { "price_type": "软卧上", "price": "60.5" }, { "price_type": "软卧下", "price": "39" } ] }, { "train_no": "T109", "train_type": "特快", "start_station": "苏州", "start_station_type": "过", "end_station": "上海", "end_station_type": "终", "start_time": "09:52", "end_time": "10:44", "run_time": "52分", "run_distance": "", "price_list": [ { "price_type": "无座", "price": "14.5" }, { "price_type": "硬座", "price": "14.5" }, { "price_type": "高级软卧", "price": "167.5" }, { "price_type": "硬卧上", "price": "60.5" }, { "price_type": "硬卧中", "price": "65.5" }, { "price_type": "硬卧下", "price": "68.5" }, { "price_type": "软卧上", "price": "60.5" }, { "price_type": "软卧下", "price": "96.5" } ] }, { "train_no": "T134", "train_type": "特快", "start_station": "苏州", "start_station_type": "过", "end_station": "上海", "end_station_type": "终", "start_time": "11:57", "end_time": "12:52", "run_time": "55分", "run_distance": "", "price_list": [ { "price_type": "无座", "price": "14.5" }, { "price_type": "硬座", "price": "14.5" }, { "price_type": "硬卧上", "price": "60.5" }, { "price_type": "硬卧中", "price": "65.5" }, { "price_type": "硬卧下", "price": "68.5" }, { "price_type": "软卧上", "price": "60.5" }, { "price_type": "软卧下", "price": "96.5" } ] }, { "train_no": "T140", "train_type": "特快", "start_station": "苏州", "start_station_type": "过", "end_station": "上海", "end_station_type": "终", "start_time": "12:20", "end_time": "13:13", "run_time": "53分", "run_distance": "", "price_list": [ { "price_type": "无座", "price": "14.5" }, { "price_type": "硬座", "price": "14.5" }, { "price_type": "硬卧上", "price": "60.5" }, { "price_type": "硬卧中", "price": "65.5" }, { "price_type": "硬卧下", "price": "68.5" }, { "price_type": "软卧上", "price": "60.5" }, { "price_type": "软卧下", "price": "96.5" } ] } ] }, "error_code": 0 }