ThinkChat2.0新版上线,更智能更精彩,支持会话、画图、阅读、搜索等,送10W Token,即刻开启你的AI之旅 广告
``` 请求地址:http://op.juhe.cn/trainTickets/ticketsAvailable 请求参数:dtype=&train_date=2017-11-09&from_station=BJP&to_station=SHH&key=84ac11bf14594fd4450741f02f42e95a 请求方式:GET ``` ~~~[api] get:http://op.juhe.cn/trainTickets/ticketsAvailable string:dtype#返回的格式,json或xml,默认json *key=84ac11bf14594fd4450741f02f42e95a#您申请到的APPKEY *train_date=2018-01-22#发车日期,如:2015-07-01(务必按照此格式) *from_station=SXH#出发站简码,如:VNP(北京南) *to_station=SHH#到达站简码,如:AOH(上海虹桥) <<< demo /*如有问题,请先阅读 http://code.juhe.cn/docs/201 */ { "reason": "成功的返回", "result": { "list": [ /*有省略*/ { "end_station_name": "上海虹桥", /*终到站名*/ "swz_price": 1748, /*商务座票价*/ "swz_num": "15", /*商务座余票数量*/ "to_station_name": "上海虹桥", /*到达车站名*/ "ydz_num": "54", /*一等座余票数量*/ "yz_num": "--", /*硬座的余票数量*/ "rw_num": "--", /*软卧(下)余票数量*/ "arrive_days": "0", /*列车从出发站到达目的站的运行天数 0:当日到达1,: 次日到达,2:三日到达,3:四日到达,依此类推*/ "rz_num": "--", /*软座的余票数量*/ "access_byidcard": "1", /*是否可凭二代身份证直接进出站*/ "yz_price": 0, /*硬座票价*/ "sale_date_time": "1230", /*车票开售时间*/ "from_station_code": "VNP", /*出发车站简码*/ "rz_price": 0, /*软座的票价*/ "gjrw_num": "--", /*高级软卧余票数量*/ "to_station_code": "AOH", /*到达车站简码*/ "ydz_price": 933, /*一等座票价*/ "wz_price": 0, /*无座票价*/ "tdz_price": 0, /*特等座票价*/ "run_time": "05:37", /*历时(出发站到目的站)*/ "yw_num": "--", /*硬卧的余票数量*/ "edz_price": 553, /*二等座票价*/ "qtxb_price": 0, /*其他席别对应的票价*/ "can_buy_now": "Y", /*当前是否可以接受预定*/ "rw_price": 0, /*软卧(下)票价*/ "train_type": "G", /*列车类型*/ "yw_price": 0, /*硬卧票价(因为硬卧上中下铺价格不同,这个价格一般是均价),请务必阅读 http://code.juhe.cn/docs/201 中第15条*/ "note": "", /*备注*/ "train_no": "240000G1010A", /*列车号*/ "train_code": "G101", /*车次*/ "from_station_name": "北京南", /*出发车站名*/ "run_time_minute": "337", /*历时分钟合计*/ "arrive_time": "12:37", /*到达时刻*/ "start_station_name": "北京南", /*始发站名*/ "start_time": "07:00", /*出发时刻*/ "edz_num": "900", /*二等座的余票数量*/ "wz_num": "--", /*无座的余票数量*/ "qtxb_num": "--", /*其他席别余票数量*/ "train_start_date": "20150711", /*列车从始发站出发的日期*/ "gjrw_price": 0, /*高级软卧票价*/ "tdz_num": "--" /*特等座的余票数量*/ }, { "end_station_name": "上海虹桥", "swz_price": 1748, "swz_num": "15", "to_station_name": "上海虹桥", "ydz_num": "53", "yz_num": "--", "rw_num": "--", "arrive_days": "0", "rz_num": "--", "access_byidcard": "1", "yz_price": 0, "sale_date_time": "1230", "from_station_code": "VNP", "rz_price": 0, "gjrw_num": "--", "to_station_code": "AOH", "ydz_price": 933, "wz_price": 0, "tdz_price": 0, "run_time": "05:45", "yw_num": "--", "distance": 0, "edz_price": 553, "qtxb_price": 0, "can_buy_now": "Y", "rw_price": 0, "train_type": "G", "yw_price": 0, "note": "", "train_no": "240000G1050D", "train_code": "G105", "from_station_name": "北京南", "run_time_minute": "345", "arrive_time": "13:21", "start_station_name": "北京南", "start_time": "07:36", "edz_num": "878", "wz_num": "--", "qtxb_num": "--", "train_start_date": "20150711", "gjrw_price": 0, "tdz_num": "--" }, ] }, "error_code": 0 } <<< success { "reason":"成功的返回", "result":{ "list":[ { "rwx_price":0, "end_station_name":"上海虹桥", "swz_price":1748, "swz_num":"0", "to_station_name":"上海虹桥", "ydz_num":"0", "yz_num":"--", "rw_num":"--", "arrive_days":"0", "rz_num":"--", "access_byidcard":"1", "yz_price":0, "ywz_price":0, "sale_date_time":"1230", "dw_price":0, "from_station_code":"VNP", "rz_price":0, "gjrw_num":"--", "to_station_code":"AOH", "ydz_price":933, "wz_price":0, "tdz_price":0, "run_time":"04:28", "dwx_price":0, "yw_num":"--", "distance":0, "edz_price":553, "qtxb_price":0, "can_buy_now":"Y", "yw_price":0, "train_type":"G", "rw_price":0, "train_code":"G17", "train_no":"2400000G1709", "from_station_name":"北京南", "run_time_minute":"268", "ywx_price":0, "dw_num":"--", "gjrws_price":0, "arrive_time":"19:28", "start_station_name":"北京南", "start_time":"15:00", "wz_num":"--", "edz_num":"1", "qtxb_num":"--", "train_start_date":"20171109", "gjrw_price":0, "tdz_num":"--" }, { "rwx_price":0, "end_station_name":"上海虹桥", "swz_price":1748, "swz_num":"10", "to_station_name":"上海虹桥", "ydz_num":"117", "yz_num":"--", "rw_num":"--", "arrive_days":"0", "rz_num":"--", "access_byidcard":"1", "yz_price":0, "ywz_price":0, "sale_date_time":"1230", "dw_price":0, "from_station_code":"VNP", "rz_price":0, "gjrw_num":"--", "to_station_code":"AOH", "ydz_price":933, "wz_price":0, "tdz_price":0, "run_time":"06:04", "dwx_price":0, "yw_num":"--", "distance":0, "edz_price":553, "qtxb_price":0, "can_buy_now":"Y", "yw_price":0, "train_type":"G", "rw_price":0, "train_code":"G147", "train_no":"240000G1470B", "from_station_name":"北京南", "run_time_minute":"364", "ywx_price":0, "dw_num":"--", "gjrws_price":0, "arrive_time":"21:50", "start_station_name":"北京南", "start_time":"15:46", "wz_num":"--", "edz_num":"0", "qtxb_num":"--", "train_start_date":"20171109", "gjrw_price":0, "tdz_num":"--" }, { "rwx_price":0, "end_station_name":"上海虹桥", "swz_price":1748, "swz_num":"0", "to_station_name":"上海虹桥", "ydz_num":"0", "yz_num":"--", "rw_num":"--", "arrive_days":"0", "rz_num":"--", "access_byidcard":"1", "yz_price":0, "ywz_price":0, "sale_date_time":"1230", "dw_price":0, "from_station_code":"VNP", "rz_price":0, "gjrw_num":"--", "to_station_code":"AOH", "ydz_price":933, "wz_price":0, "tdz_price":0, "run_time":"05:13", "dwx_price":0, "yw_num":"--", "distance":0, "edz_price":553, "qtxb_price":0, "can_buy_now":"N", "yw_price":0, "train_type":"G", "rw_price":0, "train_code":"G21", "train_no":"2400000G2108", "from_station_name":"北京南", "run_time_minute":"313", "ywx_price":0, "dw_num":"--", "gjrws_price":0, "arrive_time":"21:13", "start_station_name":"北京南", "start_time":"16:00", "wz_num":"--", "edz_num":"0", "qtxb_num":"--", "train_start_date":"20171109", "gjrw_price":0, "tdz_num":"--" }, { "rwx_price":0, "end_station_name":"上海虹桥", "swz_price":1748, "swz_num":"13", "to_station_name":"上海虹桥", "ydz_num":"143", "yz_num":"--", "rw_num":"--", "arrive_days":"0", "rz_num":"--", "access_byidcard":"1", "yz_price":0, "ywz_price":0, "sale_date_time":"1230", "dw_price":0, "from_station_code":"VNP", "rz_price":0, "gjrw_num":"--", "to_station_code":"AOH", "ydz_price":933, "wz_price":0, "tdz_price":0, "run_time":"05:57", "dwx_price":0, "yw_num":"--", "distance":0, "edz_price":553, "qtxb_price":0, "can_buy_now":"Y", "yw_price":0, "train_type":"G", "rw_price":0, "train_code":"G149", "train_no":"240000G1490E", "from_station_name":"北京南", "run_time_minute":"357", "ywx_price":0, "dw_num":"--", "gjrws_price":0, "arrive_time":"22:22", "start_station_name":"北京南", "start_time":"16:25", "wz_num":"--", "edz_num":"110", "qtxb_num":"--", "train_start_date":"20171109", "gjrw_price":0, "tdz_num":"--" }, { "rwx_price":0, "end_station_name":"上海虹桥", "swz_price":1748, "swz_num":"0", "to_station_name":"上海虹桥", "ydz_num":"131", "yz_num":"--", "rw_num":"--", "arrive_days":"0", "rz_num":"--", "access_byidcard":"1", "yz_price":0, "ywz_price":0, "sale_date_time":"1230", "dw_price":0, "from_station_code":"VNP", "rz_price":0, "gjrw_num":"--", "to_station_code":"AOH", "ydz_price":933, "wz_price":0, "tdz_price":0, "run_time":"05:39", "dwx_price":0, "yw_num":"--", "distance":0, "edz_price":553, "qtxb_price":0, "can_buy_now":"Y", "yw_price":0, "train_type":"G", "rw_price":0, "train_code":"G23", "train_no":"2400000G2300", "from_station_name":"北京南", "run_time_minute":"339", "ywx_price":0, "dw_num":"--", "gjrws_price":0, "arrive_time":"22:39", "start_station_name":"北京南", "start_time":"17:00", "wz_num":"--", "edz_num":"0", "qtxb_num":"--", "train_start_date":"20171109", "gjrw_price":0, "tdz_num":"--" }, { "rwx_price":0, "end_station_name":"上海虹桥", "swz_price":1748, "swz_num":"10", "to_station_name":"上海虹桥", "ydz_num":"180", "yz_num":"--", "rw_num":"--", "arrive_days":"0", "rz_num":"--", "access_byidcard":"1", "yz_price":0, "ywz_price":0, "sale_date_time":"1230", "dw_price":0, "from_station_code":"VNP", "rz_price":0, "gjrw_num":"--", "to_station_code":"AOH", "ydz_price":933, "wz_price":0, "tdz_price":0, "run_time":"05:34", "dwx_price":0, "yw_num":"--", "distance":0, "edz_price":553, "qtxb_price":0, "can_buy_now":"Y", "yw_price":0, "train_type":"G", "rw_price":0, "train_code":"G153", "train_no":"240000G1530E", "from_station_name":"北京南", "run_time_minute":"334", "ywx_price":0, "dw_num":"--", "gjrws_price":0, "arrive_time":"22:49", "start_station_name":"北京南", "start_time":"17:15", "wz_num":"--", "edz_num":"103", "qtxb_num":"--", "train_start_date":"20171109", "gjrw_price":0, "tdz_num":"--" }, { "rwx_price":0, "end_station_name":"上海虹桥", "swz_price":1748, "swz_num":"5", "to_station_name":"上海虹桥", "ydz_num":"196", "yz_num":"--", "rw_num":"--", "arrive_days":"0", "rz_num":"--", "access_byidcard":"1", "yz_price":0, "ywz_price":0, "sale_date_time":"1230", "dw_price":0, "from_station_code":"VNP", "rz_price":0, "gjrw_num":"--", "to_station_code":"AOH", "ydz_price":933, "wz_price":0, "tdz_price":0, "run_time":"05:47", "dwx_price":0, "yw_num":"--", "distance":0, "edz_price":553, "qtxb_price":0, "can_buy_now":"Y", "yw_price":0, "train_type":"G", "rw_price":0, "train_code":"G157", "train_no":"240000G1570K", "from_station_name":"北京南", "run_time_minute":"347", "ywx_price":0, "dw_num":"--", "gjrws_price":0, "arrive_time":"23:30", "start_station_name":"北京南", "start_time":"17:43", "wz_num":"--", "edz_num":"120", "qtxb_num":"--", "train_start_date":"20171109", "gjrw_price":0, "tdz_num":"--" }, { "rwx_price":0, "end_station_name":"上海虹桥", "swz_price":1748, "swz_num":"1", "to_station_name":"上海虹桥", "ydz_num":"0", "yz_num":"--", "rw_num":"--", "arrive_days":"0", "rz_num":"--", "access_byidcard":"1", "yz_price":0, "ywz_price":0, "sale_date_time":"1230", "dw_price":0, "from_station_code":"VNP", "rz_price":0, "gjrw_num":"--", "to_station_code":"AOH", "ydz_price":933, "wz_price":0, "tdz_price":0, "run_time":"04:24", "dwx_price":0, "yw_num":"--", "distance":0, "edz_price":553, "qtxb_price":0, "can_buy_now":"Y", "yw_price":0, "train_type":"G", "rw_price":0, "train_code":"G7", "train_no":"24000000G704", "from_station_name":"北京南", "run_time_minute":"264", "ywx_price":0, "dw_num":"--", "gjrws_price":0, "arrive_time":"23:24", "start_station_name":"北京南", "start_time":"19:00", "wz_num":"--", "edz_num":"0", "qtxb_num":"--", "train_start_date":"20171109", "gjrw_price":0, "tdz_num":"--" }, { "rwx_price":0, "end_station_name":"上海虹桥", "swz_price":1748, "swz_num":"0", "to_station_name":"上海虹桥", "ydz_num":"0", "yz_num":"--", "rw_num":"--", "arrive_days":"0", "rz_num":"--", "access_byidcard":"1", "yz_price":0, "ywz_price":0, "sale_date_time":"1230", "dw_price":0, "from_station_code":"VNP", "rz_price":0, "gjrw_num":"--", "to_station_code":"AOH", "ydz_price":933, "wz_price":0, "tdz_price":0, "run_time":"04:34", "dwx_price":0, "yw_num":"--", "distance":0, "edz_price":553, "qtxb_price":0, "can_buy_now":"Y", "yw_price":0, "train_type":"G", "rw_price":0, "train_code":"G9", "train_no":"24000000G900", "from_station_name":"北京南", "run_time_minute":"274", "ywx_price":0, "dw_num":"--", "gjrws_price":0, "arrive_time":"23:39", "start_station_name":"北京南", "start_time":"19:05", "wz_num":"--", "edz_num":"1", "qtxb_num":"--", "train_start_date":"20171109", "gjrw_price":0, "tdz_num":"--" }, { "rwx_price":497.5, "end_station_name":"上海", "swz_price":0, "swz_num":"--", "to_station_name":"上海", "ydz_num":"--", "yz_num":"0", "rw_num":"0", "arrive_days":"1", "rz_num":"--", "access_byidcard":"0", "yz_price":177.5, "ywz_price":315.5, "sale_date_time":"1000", "dw_price":0, "from_station_code":"BJP", "rz_price":0, "gjrw_num":"0", "to_station_code":"SHH", "ydz_price":0, "wz_price":177.5, "tdz_price":0, "run_time":"15:13", "dwx_price":0, "yw_num":"0", "distance":0, "edz_price":0, "qtxb_price":0, "can_buy_now":"Y", "yw_price":304.5, "train_type":"T", "rw_price":476.5, "train_code":"T109", "train_no":"240000T1090Y", "from_station_name":"北京", "run_time_minute":"913", "ywx_price":325.5, "dw_num":"--", "gjrws_price":879.5, "arrive_time":"10:43", "start_station_name":"北京", "start_time":"19:30", "wz_num":"110", "edz_num":"--", "qtxb_num":"--", "train_start_date":"20171109", "gjrw_price":919.5, "tdz_num":"--" }, { "rwx_price":730, "end_station_name":"上海", "swz_price":0, "swz_num":"--", "to_station_name":"上海", "ydz_num":"--", "yz_num":"--", "rw_num":"194", "arrive_days":"1", "rz_num":"--", "access_byidcard":"0", "yz_price":0, "ywz_price":0, "sale_date_time":"0900", "dw_price":0, "from_station_code":"VNP", "rz_price":0, "gjrw_num":"--", "to_station_code":"SHH", "ydz_price":0, "wz_price":336, "tdz_price":0, "run_time":"12:07", "dwx_price":0, "yw_num":"--", "distance":0, "edz_price":336, "qtxb_price":0, "can_buy_now":"Y", "yw_price":0, "train_type":"D", "rw_price":650, "train_code":"D313", "train_no":"240000D3130S", "from_station_name":"北京南", "run_time_minute":"727", "ywx_price":0, "dw_num":"--", "gjrws_price":0, "arrive_time":"07:41", "start_station_name":"北京南", "start_time":"19:34", "wz_num":"0", "edz_num":"0", "qtxb_num":"--", "train_start_date":"20171109", "gjrw_price":0, "tdz_num":"--" }, { "rwx_price":730, "end_station_name":"上海", "swz_price":0, "swz_num":"--", "to_station_name":"上海", "ydz_num":"--", "yz_num":"--", "rw_num":"198", "arrive_days":"1", "rz_num":"--", "access_byidcard":"0", "yz_price":0, "ywz_price":0, "sale_date_time":"0900", "dw_price":0, "from_station_code":"VNP", "rz_price":0, "gjrw_num":"--", "to_station_code":"SHH", "ydz_price":0, "wz_price":0, "tdz_price":0, "run_time":"11:52", "dwx_price":0, "yw_num":"--", "distance":0, "edz_price":0, "qtxb_price":0, "can_buy_now":"Y", "yw_price":0, "train_type":"D", "rw_price":650, "train_code":"D311", "train_no":"240000D3110I", "from_station_name":"北京南", "run_time_minute":"712", "ywx_price":0, "dw_num":"--", "gjrws_price":0, "arrive_time":"09:08", "start_station_name":"北京南", "start_time":"21:16", "wz_num":"--", "edz_num":"--", "qtxb_num":"--", "train_start_date":"20171109", "gjrw_price":0, "tdz_num":"--" }, { "rwx_price":730, "end_station_name":"上海", "swz_price":0, "swz_num":"--", "to_station_name":"上海", "ydz_num":"--", "yz_num":"--", "rw_num":"148", "arrive_days":"1", "rz_num":"--", "access_byidcard":"0", "yz_price":0, "ywz_price":0, "sale_date_time":"0900", "dw_price":0, "from_station_code":"VNP", "rz_price":0, "gjrw_num":"--", "to_station_code":"SHH", "ydz_price":0, "wz_price":336, "tdz_price":0, "run_time":"11:50", "dwx_price":0, "yw_num":"--", "distance":0, "edz_price":336, "qtxb_price":0, "can_buy_now":"Y", "yw_price":0, "train_type":"D", "rw_price":650, "train_code":"D321", "train_no":"240000D3210C", "from_station_name":"北京南", "run_time_minute":"710", "ywx_price":0, "dw_num":"--", "gjrws_price":0, "arrive_time":"09:13", "start_station_name":"北京南", "start_time":"21:23", "wz_num":"0", "edz_num":"0", "qtxb_num":"--", "train_start_date":"20171109", "gjrw_price":0, "tdz_num":"--" } ] }, "error_code":0 } <<< error error1:2047-11-09 日期太久了 { "reason":"请检查from_station参数,正确示例:SHH", "result":null, "error_code":217301 } error2: { "reason":"没有符合条件的车次信息", "result":null, "error_code":217300 } error3: { "reason":"请检查to_station参数,正确示例:SHH", "result":null, "error_code":217301 } ~~~