ShowAPI,自营为主的数据交易市场
立即注册

火车票查询

提供者: 易源官方 免费使用

数据来源于12306。 包括城市列表\列车时刻\票价的查询等。

浏览量:6562

调用量:23631

使用人数:15099

点赞:12

申请使用 查看演示
文档 授权签名(重要) 联系信息 价格一览表 接口演示
接入点列表
站到站查询
车次查询
城市列表
数据结构列表
trainDetails
seatInfo
资源列表
·SDK及代码示例
规则中心
·名词解释
·常见问题

请求URL地址

http://route.showapi.com/909-1
注意:接口支持https,更安全,但稍慢一些,你懂的。请根据自己的情况进行选择。

请求参数

HTTP协议,支持GET/POST方法。
非文件上传的POST时,enctype=application/x-www-form-urlencoded。
文件上传的POST时,enctype=multipart/form-data。
1.系统级参数(所有接入点都需要的参数):+点此展开
2.应用级参数(每个接入点有自己的参数):
参数名称 类型 默认值 示例值 必须 描述
from String 北京 出发城市
to String 武汉 目的地
trainDate String 2016-03-26 出发的日期,格式为:yyyy-MM-dd

返回参数

以JSON格式返回结果。
1.系统级参数(所有接入点都会返回的参数):+点此展开
2.应用级参数(系统级输出参数showapi_res_body字段中的json数据结构):
名称 类型 示例值 描述
flag String true 接口操作是否成功
ret_code String 0 接口调用是否成功 0为成功,其他值为失败
from String 北京 同入参
to String 武汉 同入参
trainDate String 2016-03-26 同入参
msg String 查询成功! 接口操作的提示信息
trains trainDetails 各列车座位和票价信息
- beginCity String 包头 始发站
- endCity String 广州 终点站
- fromCity String 北京西 出发站
- toCity String 武昌 到达站
- fromTime String 05:15 出发时间
- toTime String 22:10 到站时间
- usedTime String 1015 路途上需要的时间,单位是分钟
- num String K599 车次
- ticketInfo String 座位相关的信息
- -hardseat seatInfo 硬座
-- price String 152.5 票价
-- ticketName String 硬座\硬卧 座位的类型(名称),无座\硬座\硬卧\软卧...
-- ticketNum String 94 剩余票的数量
- -hardsleepermid seatInfo 硬卧
-- price String 152.5 票价
-- ticketName String 硬座\硬卧 座位的类型(名称),无座\硬座\硬卧\软卧...
-- ticketNum String 94 剩余票的数量
- -noseat seatInfo 无座
-- price String 152.5 票价
-- ticketName String 硬座\硬卧 座位的类型(名称),无座\硬座\硬卧\软卧...
-- ticketNum String 94 剩余票的数量
- -softsleeperdown seatInfo 软卧
-- price String 152.5 票价
-- ticketName String 硬座\硬卧 座位的类型(名称),无座\硬座\硬卧\软卧...
-- ticketNum String 94 剩余票的数量
- -businessseat String 商务座
- -firstseat String 一等座
- -secondseat String 二等座
  • 请求实例
  • java_sdk
  • 纯java
  • curl
  • php
  • android
  • python
String res=new ShowApiRequest("http://route.showapi.com/909-1","my_appId","my_appSecret")
           .addTextPara("from","北京")
           .addTextPara("to","武汉")
           .addTextPara("trainDate","2016-03-26")
           .post();
System.out.println(res);

                  public static void main(String path[]) throws Exception {
									URL u=new URL("http://route.showapi.com/909-1?showapi_appid=myappid&from=&to=&trainDate=&showapi_sign=mysecret");
									InputStream in=u.openStream();
									ByteArrayOutputStream out=new ByteArrayOutputStream();
									try {
										byte buf[]=new byte[1024];
										int read = 0;
										while ((read = in.read(buf)) > 0) {
											out.write(buf, 0, read);
										}
									}  finally {
										if (in != null) {
											in.close();
										}
									}
									byte b[]=out.toByteArray( );
									System.out.println(new String(b,"utf-8"));
							}
						 
						
						//字段值为中文、空格、特殊符号的地方需要做urlencode,编码为utf-8。用js的方式就是:
						//encodeURIComponent('中文')
						//比如"中文"转换后就是%25E4%25B8%25AD%25E6%2596%2587
            curl   "http://route.showapi.com/909-1?showapi_appid=123&showapi_sign=use_my_sign&from=北京&to=武汉&trainDate=2016-03-26&"
						
						 //md5签名方式--非简单签名
               			<?php
							header("Content-Type:text/html;charset=UTF-8");
							date_default_timezone_set("PRC");
							$showapi_appid = 'xxxxxx';  //替换此值,在官网的"我的应用"中找到相关值
							$showapi_secret = 'xxxxxxxxx';  //替换此值,在官网的"我的应用"中找到相关值 
							$paramArr = array(
							     'showapi_appid'=> $showapi_appid,
								 'from'=> "",
								 'to'=> "",
								 'trainDate'=> ""
							     //添加其他参数
							);
							
							//创建参数(包括签名的处理)
							function createParam ($paramArr,$showapi_secret) {
							     $paraStr = "";
							     $signStr = "";
							     ksort($paramArr);
							     foreach ($paramArr as $key => $val) {
							         if ($key != '' && $val != '') {
							             $signStr .= $key.$val;
							             $paraStr .= $key.'='.urlencode($val).'&';
							         }
							     }
							     $signStr .= $showapi_secret;//排好序的参数加上secret,进行md5
							     $sign = strtolower(md5($signStr));
							     $paraStr .= 'showapi_sign='.$sign;//将md5后的值作为参数,便于服务器的效验
							     echo "排好序的参数:".$signStr."
\r\n"; return $paraStr; } $param = createParam($paramArr,$showapi_secret); $url = 'http://route.showapi.com/909-1?'.$param; echo "请求的url:".$url."
\r\n"; $result = file_get_contents($url); echo "返回的json数据:
\r\n"; print $result.'
\r\n'; $result = json_decode($result); echo "
\r\n取出showapi_res_code的值:
\r\n"; print_r($result->showapi_res_code); echo "
\r\n"; ?>
						//以下代码为纯java实现,并未依赖第三方框架,具体传入参数请参看接口描述详情页.
						protected Handler mHandler =  new Handler();
						protected void onCreate(Bundle savedInstanceState) {
								super.onCreate(savedInstanceState);
								setContentView(R.layout.activity_main);
								final TextView txt = (TextView) this.findViewById(R.id.textView1);
								Button myBtn = (Button) this.findViewById(R.id.button1);
								myBtn.setOnClickListener(new OnClickListener() {
									public void onClick(View v) {
										new Thread(){
											//在新线程中发送网络请求
											public void run() {
												String appid="xxx";//要替换成自己的
												String secret="xxxxxxx";//要替换成自己的
												final String res=new ShowApiRequest( "http://route.showapi.com/909-1", appid, secret)
                    .addTextPara("from", "")
                                .addTextPara("to", "")
                                .addTextPara("trainDate", "")
            .post();
												
												System.out.println(res);
												//把返回内容通过handler对象更新到界面
												mHandler.post(new Thread(){
													public void run() {
														txt.setText(res+"  "+new Date());
													}
												});
											}
										}.start();
										
										
									}
								});
						}

						
#python3.5
from urllib import    request, parse
import json

print('send data....')
showapi_appid="xxxxxxxxxx"  #替换此值
showapi_sign="xxxxxxxxxx"   #替换此值
url="http://route.showapi.com/909-1"
send_data = parse.urlencode([
    ('showapi_appid', showapi_appid)
    ,('showapi_sign', showapi_sign)
                    ,('from', "")
                    ,('to', "")
                    ,('trainDate', "")
    
  ])

req = request.Request(url)
try:
       response = request.urlopen(req, data=send_data.encode('utf-8'), timeout = 10) # 10秒超时反馈
except Exception as e:
    print(e)
result = response.read().decode('utf-8')
result_json = json.loads(result)
print ('result_json data is:', result_json)

						

返回实例

{
	"showapi_res_code": 0,
	"showapi_res_error": "",
	"showapi_res_body": {
		
    "flag": true,
    "from": "北京",
    "msg": "查询成功!",
    "ret_code": "0",
    "to": "武汉",
    "trainDate": "2016-03-18",
    "trains": [
        {
            "num": "K599",
            "fromTime": "05:15",
            "toTime": "22:10",
            "usedTime": 1015,
            "fromCity": "北京西",
            "toCity": "武昌",
            "beginCity": "包头",
            "endCity": "广州",
            "ticketInfo": {
                "hardseat": {
                    "price": 152.5,
                    "ticketName": "硬座",
                    "ticketNum": "0"
                },
                "hardsleepermid": {
                    "price": 279.5,
                    "ticketName": "硬卧",
                    "ticketNum": "5"
                },
                "noseat": {
                    "price": 152.5,
                    "ticketName": "无座",
                    "ticketNum": "205"
                },
                "softsleeperdown": {
                    "price": 427.5,
                    "ticketName": "软卧",
                    "ticketNum": "9"
                }
            }
        },
        {
            "num": "G507",
            "fromTime": "06:53",
            "toTime": "12:24",
            "usedTime": 331,
            "fromCity": "北京西",
            "toCity": "汉口",
            "beginCity": "北京西",
            "endCity": "汉口",
            "ticketInfo": {
                "businessseat": {
                    "price": 1640.5,
                    "ticketName": "商务座",
                    "ticketNum": "17"
                },
                "firstseat": {
                    "price": 827.5,
                    "ticketName": "一等座",
                    "ticketNum": "106"
                },
                "secondseat": {
                    "price": 519.5,
                    "ticketName": "二等座",
                    "ticketNum": "809"
                }
            }
        },
        {
            "num": "G401",
            "fromTime": "07:05",
            "toTime": "12:29",
            "usedTime": 324,
            "fromCity": "北京西",
            "toCity": "武汉",
            "beginCity": "北京西",
            "endCity": "贵阳北",
            "ticketInfo": {
                "businessseat": {
                    "price": 1642.5,
                    "ticketName": "商务座",
                    "ticketNum": "3"
                },
                "firstseat": {
                    "price": 832.5,
                    "ticketName": "一等座",
                    "ticketNum": "11"
                },
                "secondseat": {
                    "price": 520.5,
                    "ticketName": "二等座",
                    "ticketNum": "281"
                }
            }
        },
        {
            "num": "G501",
            "fromTime": "07:10",
            "toTime": "12:34",
            "usedTime": 324,
            "fromCity": "北京西",
            "toCity": "武汉",
            "beginCity": "北京西",
            "endCity": "长沙南",
            "ticketInfo": {
                "businessseat": {
                    "price": 1642.5,
                    "ticketName": "商务座",
                    "ticketNum": "26"
                },
                "firstseat": {
                    "price": 832.5,
                    "ticketName": "一等座",
                    "ticketNum": "138"
                },
                "secondseat": {
                    "price": 520.5,
                    "ticketName": "二等座",
                    "ticketNum": "675"
                }
            }
        },
        {
            "num": "G529",
            "fromTime": "07:33",
            "toTime": "12:53",
            "usedTime": 320,
            "fromCity": "北京西",
            "toCity": "武汉",
            "beginCity": "北京西",
            "endCity": "南宁东",
            "ticketInfo": {
                "businessseat": {
                    "price": 1642.5,
                    "ticketName": "商务座",
                    "ticketNum": "22"
                },
                "firstseat": {
                    "price": 832.5,
                    "ticketName": "一等座",
                    "ticketNum": "102"
                },
                "secondseat": {
                    "price": 520.5,
                    "ticketName": "二等座",
                    "ticketNum": "632"
                }
            }
        },
        {
            "num": "G71",
            "fromTime": "07:40",
            "toTime": "13:05",
            "usedTime": 325,
            "fromCity": "北京西",
            "toCity": "武汉",
            "beginCity": "北京西",
            "endCity": "深圳北",
            "ticketInfo": {
                "businessseat": {
                    "price": 1642.5,
                    "ticketName": "商务座",
                    "ticketNum": "21"
                },
                "firstseat": {
                    "price": 832.5,
                    "ticketName": "一等座",
                    "ticketNum": "89"
                },
                "secondseat": {
                    "price": 520.5,
                    "ticketName": "二等座",
                    "ticketNum": "283"
                }
            }
        },
        {
            "num": "K21",
            "fromTime": "08:08",
            "toTime": "01:27",
            "usedTime": 1039,
            "fromCity": "北京西",
            "toCity": "武昌",
            "beginCity": "北京西",
            "endCity": "桂林北",
            "ticketInfo": {
                "hardseat": {
                    "price": 152.5,
                    "ticketName": "硬座",
                    "ticketNum": "116"
                },
                "hardsleepermid": {
                    "price": 279.5,
                    "ticketName": "硬卧",
                    "ticketNum": "248"
                },
                "noseat": {
                    "price": 152.5,
                    "ticketName": "无座",
                    "ticketNum": "175"
                },
                "softsleeperdown": {
                    "price": 427.5,
                    "ticketName": "软卧",
                    "ticketNum": "4"
                }
            }
        },
        {
            "num": "G307",
            "fromTime": "08:30",
            "toTime": "13:47",
            "usedTime": 317,
            "fromCity": "北京西",
            "toCity": "汉口",
            "beginCity": "北京西",
            "endCity": "成都东",
            "ticketInfo": {
                "businessseat": {
                    "price": 1640.5,
                    "ticketName": "商务座",
                    "ticketNum": "8"
                },
                "firstseat": {
                    "price": 827.5,
                    "ticketName": "一等座",
                    "ticketNum": "1"
                },
                "secondseat": {
                    "price": 519.5,
                    "ticketName": "二等座",
                    "ticketNum": "371"
                }
            }
        },
        {
            "num": "Z149",
            "fromTime": "08:45",
            "toTime": "19:45",
            "usedTime": 660,
            "fromCity": "北京西",
            "toCity": "武昌",
            "beginCity": "北京西",
            "endCity": "贵阳",
            "ticketInfo": {
                "hardseat": {
                    "price": 152.5,
                    "ticketName": "硬座",
                    "ticketNum": "144"
                },
                "hardsleepermid": {
                    "price": 279.5,
                    "ticketName": "硬卧",
                    "ticketNum": "313"
                },
                "noseat": {
                    "price": 152.5,
                    "ticketName": "无座",
                    "ticketNum": "38"
                },
                "softsleeperdown": {
                    "price": 427.5,
                    "ticketName": "软卧",
                    "ticketNum": "8"
                }
            }
        },
        {
            "num": "K967",
            "fromTime": "08:46",
            "toTime": "01:02",
            "usedTime": 976,
            "fromCity": "北京",
            "toCity": "武昌",
            "beginCity": "北京",
            "endCity": "张家界",
            "ticketInfo": {
                "hardseat": {
                    "price": 152.5,
                    "ticketName": "硬座",
                    "ticketNum": "132"
                },
                "hardsleepermid": {
                    "price": 279.5,
                    "ticketName": "硬卧",
                    "ticketNum": "256"
                },
                "noseat": {
                    "price": 152.5,
                    "ticketName": "无座",
                    "ticketNum": "161"
                },
                "softsleeperdown": {
                    "price": 449.5,
                    "ticketName": "软卧",
                    "ticketNum": "2"
                }
            }
        },
        {
            "num": "G81",
            "fromTime": "08:55",
            "toTime": "13:16",
            "usedTime": 261,
            "fromCity": "北京西",
            "toCity": "武汉",
            "beginCity": "北京西",
            "endCity": "贵阳北",
            "ticketInfo": {
                "businessseat": {
                    "price": 1642.5,
                    "ticketName": "商务座",
                    "ticketNum": "11"
                },
                "firstseat": {
                    "price": 832.5,
                    "ticketName": "一等座",
                    "ticketNum": "110"
                },
                "secondseat": {
                    "price": 520.5,
                    "ticketName": "二等座",
                    "ticketNum": "469"
                }
            }
        },
        {
            "num": "Z53",
            "fromTime": "08:55",
            "toTime": "19:52",
            "usedTime": 657,
            "fromCity": "北京西",
            "toCity": "武昌",
            "beginCity": "北京西",
            "endCity": "昆明",
            "ticketInfo": {
                "hardseat": {
                    "price": 152.5,
                    "ticketName": "硬座",
                    "ticketNum": "52"
                },
                "hardsleepermid": {
                    "price": 279.5,
                    "ticketName": "硬卧",
                    "ticketNum": "202"
                },
                "noseat": {
                    "price": 152.5,
                    "ticketName": "无座",
                    "ticketNum": "68"
                },
                "softsleeperdown": {
                    "price": 427.5,
                    "ticketName": "软卧",
                    "ticketNum": "20"
                }
            }
        },
        {
            "num": "G83",
            "fromTime": "09:00",
            "toTime": "13:21",
            "usedTime": 261,
            "fromCity": "北京西",
            "toCity": "武汉",
            "beginCity": "北京西",
            "endCity": "长沙南",
            "ticketInfo": {
                "businessseat": {
                    "price": 1642.5,
                    "ticketName": "商务座",
                    "ticketNum": "8"
                },
                "firstseat": {
                    "price": 832.5,
                    "ticketName": "一等座",
                    "ticketNum": "1"
                },
                "secondseat": {
                    "price": 520.5,
                    "ticketName": "二等座",
                    "ticketNum": "446"
                }
            }
        },
        {
            "num": "G421",
            "fromTime": "09:07",
            "toTime": "14:36",
            "usedTime": 329,
            "fromCity": "北京西",
            "toCity": "武汉",
            "beginCity": "北京西",
            "endCity": "南宁东",
            "ticketInfo": {
                "businessseat": {
                    "price": 1642.5,
                    "ticketName": "商务座",
                    "ticketNum": "4"
                },
                "firstseat": {
                    "price": 832.5,
                    "ticketName": "一等座",
                    "ticketNum": "10"
                },
                "secondseat": {
                    "price": 520.5,
                    "ticketName": "二等座",
                    "ticketNum": "757"
                }
            }
        },
        {
            "num": "G511",
            "fromTime": "09:27",
            "toTime": "14:55",
            "usedTime": 328,
            "fromCity": "北京西",
            "toCity": "武汉",
            "beginCity": "北京西",
            "endCity": "武汉",
            "ticketInfo": {
                "firstseat": {
                    "price": 832.5,
                    "ticketName": "一等座",
                    "ticketNum": "74"
                },
                "secondseat": {
                    "price": 520.5,
                    "ticketName": "二等座",
                    "ticketNum": "217"
                },
                "specialseat": {
                    "price": 990.5,
                    "ticketName": "特等座",
                    "ticketNum": "12"
                }
            }
        },
        {
            "num": "G309",
            "fromTime": "09:32",
            "toTime": "15:16",
            "usedTime": 344,
            "fromCity": "北京西",
            "toCity": "汉口",
            "beginCity": "北京西",
            "endCity": "重庆北",
            "ticketInfo": {
                "businessseat": {
                    "price": 1640.5,
                    "ticketName": "商务座",
                    "ticketNum": "3"
                },
                "firstseat": {
                    "price": 827.5,
                    "ticketName": "一等座",
                    "ticketNum": "3"
                },
                "secondseat": {
                    "price": 519.5,
                    "ticketName": "二等座",
                    "ticketNum": "675"
                }
            }
        },
        {
            "num": "G79",
            "fromTime": "10:00",
            "toTime": "14:17",
            "usedTime": 257,
            "fromCity": "北京西",
            "toCity": "武汉",
            "beginCity": "北京西",
            "endCity": "深圳北",
            "ticketInfo": {
                "businessseat": {
                    "price": 1642.5,
                    "ticketName": "商务座",
                    "ticketNum": "1"
                },
                "firstseat": {
                    "price": 832.5,
                    "ticketName": "一等座",
                    "ticketNum": "38"
                },
                "secondseat": {
                    "price": 520.5,
                    "ticketName": "二等座",
                    "ticketNum": "0"
                }
            }
        },
        {
            "num": "G65",
            "fromTime": "10:33",
            "toTime": "15:52",
            "usedTime": 319,
            "fromCity": "北京西",
            "toCity": "武汉",
            "beginCity": "北京西",
            "endCity": "广州南",
            "ticketInfo": {
                "businessseat": {
                    "price": 1642.5,
                    "ticketName": "商务座",
                    "ticketNum": "21"
                },
                "firstseat": {
                    "price": 832.5,
                    "ticketName": "一等座",
                    "ticketNum": "101"
                },
                "secondseat": {
                    "price": 520.5,
                    "ticketName": "二等座",
                    "ticketNum": "443"
                }
            }
        },
        {
            "num": "G487",
            "fromTime": "10:45",
            "toTime": "15:25",
            "usedTime": 280,
            "fromCity": "北京西",
            "toCity": "武汉",
            "beginCity": "北京西",
            "endCity": "南昌西",
            "ticketInfo": {
                "businessseat": {
                    "price": 1642.5,
                    "ticketName": "商务座",
                    "ticketNum": "10"
                },
                "firstseat": {
                    "price": 832.5,
                    "ticketName": "一等座",
                    "ticketNum": "0"
                },
                "secondseat": {
                    "price": 520.5,
                    "ticketName": "二等座",
                    "ticketNum": "578"
                }
            }
        },
        {
            "num": "G557",
            "fromTime": "11:07",
            "toTime": "17:50",
            "usedTime": 403,
            "fromCity": "北京西",
            "toCity": "武汉",
            "beginCity": "北京西",
            "endCity": "武汉",
            "ticketInfo": {
                "businessseat": {
                    "price": 1642.5,
                    "ticketName": "商务座",
                    "ticketNum": "4"
                },
                "firstseat": {
                    "price": 832.5,
                    "ticketName": "一等座",
                    "ticketNum": "24"
                },
                "secondseat": {
                    "price": 520.5,
                    "ticketName": "二等座",
                    "ticketNum": "456"
                }
            }
        },
        {
            "num": "Z49",
            "fromTime": "11:32",
            "toTime": "21:52",
            "usedTime": 620,
            "fromCity": "北京西",
            "toCity": "汉口",
            "beginCity": "北京西",
            "endCity": "成都",
            "ticketInfo": {
                "hardseat": {
                    "price": 152.5,
                    "ticketName": "硬座",
                    "ticketNum": "0"
                },
                "hardsleepermid": {
                    "price": 279.5,
                    "ticketName": "硬卧",
                    "ticketNum": "0"
                },
                "noseat": {
                    "price": 152.5,
                    "ticketName": "无座",
                    "ticketNum": "62"
                },
                "softsleeperdown": {
                    "price": 427.5,
                    "ticketName": "软卧",
                    "ticketNum": "0"
                }
            }
        },
        {
            "num": "Z35",
            "fromTime": "11:40",
            "toTime": "22:02",
            "usedTime": 622,
            "fromCity": "北京西",
            "toCity": "武昌",
            "beginCity": "北京西",
            "endCity": "广州",
            "ticketInfo": {
                "advancedsoftsleeper": {
                    "price": 789.5,
                    "ticketName": "高级软卧",
                    "ticketNum": "2"
                },
                "hardseat": {
                    "price": 152.5,
                    "ticketName": "硬座",
                    "ticketNum": "140"
                },
                "hardsleepermid": {
                    "price": 279.5,
                    "ticketName": "硬卧",
                    "ticketNum": "43"
                },
                "noseat": {
                    "price": 152.5,
                    "ticketName": "无座",
                    "ticketNum": "178"
                },
                "softsleeperdown": {
                    "price": 427.5,
                    "ticketName": "软卧",
                    "ticketNum": "4"
                }
            }
        },
        {
            "num": "G403",
            "fromTime": "11:43",
            "toTime": "17:11",
            "usedTime": 328,
            "fromCity": "北京西",
            "toCity": "武汉",
            "beginCity": "北京西",
            "endCity": "贵阳北",
            "ticketInfo": {
                "businessseat": {
                    "price": 1642.5,
                    "ticketName": "商务座",
                    "ticketNum": "0"
                },
                "firstseat": {
                    "price": 832.5,
                    "ticketName": "一等座",
                    "ticketNum": "3"
                },
                "secondseat": {
                    "price": 520.5,
                    "ticketName": "二等座",
                    "ticketNum": "136"
                }
            }
        },
        {
            "num": "G67",
            "fromTime": "12:13",
            "toTime": "17:59",
            "usedTime": 346,
            "fromCity": "北京西",
            "toCity": "武汉",
            "beginCity": "北京西",
            "endCity": "广州南",
            "ticketInfo": {
                "businessseat": {
                    "price": 1642.5,
                    "ticketName": "商务座",
                    "ticketNum": "24"
                },
                "firstseat": {
                    "price": 832.5,
                    "ticketName": "一等座",
                    "ticketNum": "117"
                },
                "secondseat": {
                    "price": 520.5,
                    "ticketName": "二等座",
                    "ticketNum": "420"
                }
            }
        },
        {
            "num": "T145",
            "fromTime": "12:32",
            "toTime": "01:21",
            "usedTime": 769,
            "fromCity": "北京",
            "toCity": "武昌",
            "beginCity": "北京",
            "endCity": "南昌",
            "ticketInfo": {
                "hardseat": {
                    "price": 152.5,
                    "ticketName": "硬座",
                    "ticketNum": "240"
                },
                "hardsleepermid": {
                    "price": 279.5,
                    "ticketName": "硬卧",
                    "ticketNum": "104"
                },
                "noseat": {
                    "price": 152.5,
                    "ticketName": "无座",
                    "ticketNum": "94"
                },
                "softsleeperdown": {
                    "price": 449.5,
                    "ticketName": "软卧",
                    "ticketNum": "0"
                }
            }
        },
        {
            "num": "G491",
            "fromTime": "12:34",
            "toTime": "18:26",
            "usedTime": 352,
            "fromCity": "北京西",
            "toCity": "武汉",
            "beginCity": "北京西",
            "endCity": "南昌西",
            "ticketInfo": {
                "businessseat": {
                    "price": 1642.5,
                    "ticketName": "商务座",
                    "ticketNum": "0"
                },
                "firstseat": {
                    "price": 832.5,
                    "ticketName": "一等座",
                    "ticketNum": "81"
                },
                "secondseat": {
                    "price": 520.5,
                    "ticketName": "二等座",
                    "ticketNum": "142"
                },
                "specialseat": {
                    "price": 990.5,
                    "ticketName": "特等座",
                    "ticketNum": "7"
                }
            }
        },
        {
            "num": "G555",
            "fromTime": "12:51",
            "toTime": "17:34",
            "usedTime": 283,
            "fromCity": "北京西",
            "toCity": "汉口",
            "beginCity": "北京西",
            "endCity": "宜昌东",
            "ticketInfo": {
                "businessseat": {
                    "price": 1640.5,
                    "ticketName": "商务座",
                    "ticketNum": "0"
                },
                "firstseat": {
                    "price": 827.5,
                    "ticketName": "一等座",
                    "ticketNum": "14"
                },
                "secondseat": {
                    "price": 519.5,
                    "ticketName": "二等座",
                    "ticketNum": "3"
                }
            }
        },
        {
            "num": "Z97",
            "fromTime": "13:00",
            "toTime": "23:16",
            "usedTime": 616,
            "fromCity": "北京西",
            "toCity": "武昌",
            "beginCity": "北京西",
            "endCity": "广州东",
            "ticketInfo": {
                "advancedsoftsleeper": {
                    "price": 789.5,
                    "ticketName": "高级软卧",
                    "ticketNum": "6"
                },
                "hardseat": {
                    "price": 152.5,
                    "ticketName": "硬座",
                    "ticketNum": "96"
                },
                "hardsleepermid": {
                    "price": 279.5,
                    "ticketName": "硬卧",
                    "ticketNum": "179"
                },
                "noseat": {
                    "price": 152.5,
                    "ticketName": "无座",
                    "ticketNum": "96"
                },
                "softsleeperdown": {
                    "price": 427.5,
                    "ticketName": "软卧",
                    "ticketNum": "55"
                }
            }
        },
        {
            "num": "G69",
            "fromTime": "13:05",
            "toTime": "18:12",
            "usedTime": 307,
            "fromCity": "北京西",
            "toCity": "武汉",
            "beginCity": "北京西",
            "endCity": "广州南",
            "ticketInfo": {
                "businessseat": {
                    "price": 1642.5,
                    "ticketName": "商务座",
                    "ticketNum": "12"
                },
                "firstseat": {
                    "price": 832.5,
                    "ticketName": "一等座",
                    "ticketNum": "100"
                },
                "secondseat": {
                    "price": 520.5,
                    "ticketName": "二等座",
                    "ticketNum": "257"
                }
            }
        },
        {
            "num": "Z161",
            "fromTime": "13:06",
            "toTime": "23:43",
            "usedTime": 637,
            "fromCity": "北京西",
            "toCity": "武昌",
            "beginCity": "北京西",
            "endCity": "昆明",
            "ticketInfo": {
                "hardseat": {
                    "price": 152.5,
                    "ticketName": "硬座",
                    "ticketNum": "249"
                },
                "hardsleepermid": {
                    "price": 279.5,
                    "ticketName": "硬卧",
                    "ticketNum": "238"
                },
                "noseat": {
                    "price": 152.5,
                    "ticketName": "无座",
                    "ticketNum": "121"
                },
                "softsleeperdown": {
                    "price": 427.5,
                    "ticketName": "软卧",
                    "ticketNum": "1"
                }
            }
        },
        {
            "num": "G519",
            "fromTime": "14:05",
            "toTime": "19:28",
            "usedTime": 323,
            "fromCity": "北京西",
            "toCity": "武汉",
            "beginCity": "北京西",
            "endCity": "武汉",
            "ticketInfo": {
                "businessseat": {
                    "price": 1642.5,
                    "ticketName": "商务座",
                    "ticketNum": "4"
                },
                "firstseat": {
                    "price": 832.5,
                    "ticketName": "一等座",
                    "ticketNum": "32"
                },
                "secondseat": {
                    "price": 520.5,
                    "ticketName": "二等座",
                    "ticketNum": "629"
                }
            }
        },
        {
            "num": "T167",
            "fromTime": "14:12",
            "toTime": "02:46",
            "usedTime": 754,
            "fromCity": "北京西",
            "toCity": "武昌",
            "beginCity": "北京西",
            "endCity": "南昌",
            "ticketInfo": {
                "hardseat": {
                    "price": 152.5,
                    "ticketName": "硬座",
                    "ticketNum": "250"
                },
                "hardsleepermid": {
                    "price": 279.5,
                    "ticketName": "硬卧",
                    "ticketNum": "0"
                },
                "noseat": {
                    "price": 152.5,
                    "ticketName": "无座",
                    "ticketNum": "85"
                },
                "softsleeperdown": {
                    "price": 427.5,
                    "ticketName": "软卧",
                    "ticketNum": "0"
                }
            }
        },
        {
            "num": "G503",
            "fromTime": "14:38",
            "toTime": "19:47",
            "usedTime": 309,
            "fromCity": "北京西",
            "toCity": "武汉",
            "beginCity": "北京西",
            "endCity": "长沙南",
            "ticketInfo": {
                "businessseat": {
                    "price": 1642.5,
                    "ticketName": "商务座",
                    "ticketNum": "0"
                },
                "firstseat": {
                    "price": 832.5,
                    "ticketName": "一等座",
                    "ticketNum": "1"
                },
                "secondseat": {
                    "price": 520.5,
                    "ticketName": "二等座",
                    "ticketNum": "354"
                }
            }
        },
        {
            "num": "G587",
            "fromTime": "14:55",
            "toTime": "20:43",
            "usedTime": 348,
            "fromCity": "北京西",
            "toCity": "武汉",
            "beginCity": "北京西",
            "endCity": "武汉",
            "ticketInfo": {
                "businessseat": {
                    "price": 1642.5,
                    "ticketName": "商务座",
                    "ticketNum": "18"
                },
                "firstseat": {
                    "price": 832.5,
                    "ticketName": "一等座",
                    "ticketNum": "86"
                },
                "secondseat": {
                    "price": 520.5,
                    "ticketName": "二等座",
                    "ticketNum": "794"
                }
            }
        },
        {
            "num": "Z13",
            "fromTime": "15:00",
            "toTime": "01:41",
            "usedTime": 641,
            "fromCity": "北京",
            "toCity": "武昌",
            "beginCity": "沈阳北",
            "endCity": "广州东",
            "ticketInfo": {
                "hardseat": {
                    "price": 152.5,
                    "ticketName": "硬座",
                    "ticketNum": "232"
                },
                "hardsleepermid": {
                    "price": 279.5,
                    "ticketName": "硬卧",
                    "ticketNum": "0"
                },
                "noseat": {
                    "price": 152.5,
                    "ticketName": "无座",
                    "ticketNum": "109"
                },
                "softsleeperdown": {
                    "price": 449.5,
                    "ticketName": "软卧",
                    "ticketNum": "0"
                }
            }
        },
        {
            "num": "G521",
            "fromTime": "15:23",
            "toTime": "21:38",
            "usedTime": 375,
            "fromCity": "北京西",
            "toCity": "汉口",
            "beginCity": "北京西",
            "endCity": "汉口",
            "ticketInfo": {
                "businessseat": {
                    "price": 1640.5,
                    "ticketName": "商务座",
                    "ticketNum": "8"
                },
                "firstseat": {
                    "price": 827.5,
                    "ticketName": "一等座",
                    "ticketNum": "90"
                },
                "secondseat": {
                    "price": 519.5,
                    "ticketName": "二等座",
                    "ticketNum": "732"
                }
            }
        },
        {
            "num": "T1",
            "fromTime": "15:25",
            "toTime": "03:46",
            "usedTime": 741,
            "fromCity": "北京",
            "toCity": "武昌",
            "beginCity": "北京",
            "endCity": "长沙",
            "ticketInfo": {
                "hardseat": {
                    "price": 152.5,
                    "ticketName": "硬座",
                    "ticketNum": "315"
                },
                "hardsleepermid": {
                    "price": 279.5,
                    "ticketName": "硬卧",
                    "ticketNum": "254"
                },
                "noseat": {
                    "price": 152.5,
                    "ticketName": "无座",
                    "ticketNum": "144"
                }
            }
        },
        {
            "num": "G505",
            "fromTime": "15:40",
            "toTime": "20:56",
            "usedTime": 316,
            "fromCity": "北京西",
            "toCity": "武汉",
            "beginCity": "北京西",
            "endCity": "长沙南",
            "ticketInfo": {
                "businessseat": {
                    "price": 1642.5,
                    "ticketName": "商务座",
                    "ticketNum": "1"
                },
                "firstseat": {
                    "price": 832.5,
                    "ticketName": "一等座",
                    "ticketNum": "2"
                },
                "secondseat": {
                    "price": 520.5,
                    "ticketName": "二等座",
                    "ticketNum": "237"
                }
            }
        },
        {
            "num": "Z5",
            "fromTime": "16:09",
            "toTime": "02:34",
            "usedTime": 625,
            "fromCity": "北京西",
            "toCity": "武昌",
            "beginCity": "北京西",
            "endCity": "南宁",
            "ticketInfo": {
                "hardsleepermid": {
                    "price": 279.5,
                    "ticketName": "硬卧",
                    "ticketNum": "0"
                },
                "softsleeperdown": {
                    "price": 427.5,
                    "ticketName": "软卧",
                    "ticketNum": "6"
                }
            }
        },
        {
            "num": "Z77",
            "fromTime": "16:15",
            "toTime": "02:40",
            "usedTime": 625,
            "fromCity": "北京西",
            "toCity": "武昌",
            "beginCity": "北京西",
            "endCity": "贵阳",
            "ticketInfo": {
                "hardseat": {
                    "price": 152.5,
                    "ticketName": "硬座",
                    "ticketNum": "218"
                },
                "hardsleepermid": {
                    "price": 279.5,
                    "ticketName": "硬卧",
                    "ticketNum": "295"
                },
                "noseat": {
                    "price": 152.5,
                    "ticketName": "无座",
                    "ticketNum": "107"
                },
                "softsleeperdown": {
                    "price": 427.5,
                    "ticketName": "软卧",
                    "ticketNum": "47"
                }
            }
        },
        {
            "num": "G573",
            "fromTime": "16:18",
            "toTime": "21:29",
            "usedTime": 311,
            "fromCity": "北京西",
            "toCity": "武汉",
            "beginCity": "北京西",
            "endCity": "武汉",
            "ticketInfo": {
                "businessseat": {
                    "price": 1642.5,
                    "ticketName": "商务座",
                    "ticketNum": "2"
                },
                "firstseat": {
                    "price": 832.5,
                    "ticketName": "一等座",
                    "ticketNum": "10"
                },
                "secondseat": {
                    "price": 520.5,
                    "ticketName": "二等座",
                    "ticketNum": "358"
                }
            }
        },
        {
            "num": "G585",
            "fromTime": "16:23",
            "toTime": "22:07",
            "usedTime": 344,
            "fromCity": "北京西",
            "toCity": "武汉",
            "beginCity": "北京西",
            "endCity": "武汉",
            "ticketInfo": {
                "businessseat": {
                    "price": 1642.5,
                    "ticketName": "商务座",
                    "ticketNum": "18"
                },
                "firstseat": {
                    "price": 832.5,
                    "ticketName": "一等座",
                    "ticketNum": "102"
                },
                "secondseat": {
                    "price": 520.5,
                    "ticketName": "二等座",
                    "ticketNum": "841"
                }
            }
        },
        {
            "num": "G523",
            "fromTime": "16:30",
            "toTime": "21:47",
            "usedTime": 317,
            "fromCity": "北京西",
            "toCity": "武汉",
            "beginCity": "北京西",
            "endCity": "武汉",
            "ticketInfo": {
                "businessseat": {
                    "price": 1642.5,
                    "ticketName": "商务座",
                    "ticketNum": "6"
                },
                "firstseat": {
                    "price": 832.5,
                    "ticketName": "一等座",
                    "ticketNum": "87"
                },
                "secondseat": {
                    "price": 520.5,
                    "ticketName": "二等座",
                    "ticketNum": "743"
                }
            }
        },
        {
            "num": "G525",
            "fromTime": "17:14",
            "toTime": "22:54",
            "usedTime": 340,
            "fromCity": "北京西",
            "toCity": "汉口",
            "beginCity": "北京西",
            "endCity": "汉口",
            "ticketInfo": {
                "businessseat": {
                    "price": 1640.5,
                    "ticketName": "商务座",
                    "ticketNum": "10"
                },
                "firstseat": {
                    "price": 827.5,
                    "ticketName": "一等座",
                    "ticketNum": "79"
                },
                "secondseat": {
                    "price": 519.5,
                    "ticketName": "二等座",
                    "ticketNum": "744"
                }
            }
        },
        {
            "num": "Z3",
            "fromTime": "17:43",
            "toTime": "04:15",
            "usedTime": 632,
            "fromCity": "北京西",
            "toCity": "汉口",
            "beginCity": "北京西",
            "endCity": "宜昌东",
            "ticketInfo": {
                "hardseat": {
                    "price": 152.5,
                    "ticketName": "硬座",
                    "ticketNum": "381"
                },
                "hardsleepermid": {
                    "price": 279.5,
                    "ticketName": "硬卧",
                    "ticketNum": "0"
                },
                "noseat": {
                    "price": 152.5,
                    "ticketName": "无座",
                    "ticketNum": "431"
                },
                "softsleeperdown": {
                    "price": 427.5,
                    "ticketName": "软卧",
                    "ticketNum": "0"
                }
            }
        },
        {
            "num": "Z285",
            "fromTime": "17:50",
            "toTime": "04:16",
            "usedTime": 626,
            "fromCity": "北京西",
            "toCity": "武昌",
            "beginCity": "北京西",
            "endCity": "南宁",
            "ticketInfo": {
                "hardseat": {
                    "price": 152.5,
                    "ticketName": "硬座",
                    "ticketNum": "114"
                },
                "hardsleepermid": {
                    "price": 279.5,
                    "ticketName": "硬卧",
                    "ticketNum": "0"
                },
                "noseat": {
                    "price": 152.5,
                    "ticketName": "无座",
                    "ticketNum": "183"
                },
                "softsleeperdown": {
                    "price": 427.5,
                    "ticketName": "软卧",
                    "ticketNum": "3"
                }
            }
        },
        {
            "num": "Z95",
            "fromTime": "18:02",
            "toTime": "04:33",
            "usedTime": 631,
            "fromCity": "北京西",
            "toCity": "汉口",
            "beginCity": "北京西",
            "endCity": "重庆北",
            "ticketInfo": {
                "hardseat": {
                    "price": 152.5,
                    "ticketName": "硬座",
                    "ticketNum": "68"
                },
                "hardsleepermid": {
                    "price": 279.5,
                    "ticketName": "硬卧",
                    "ticketNum": "175"
                },
                "noseat": {
                    "price": 152.5,
                    "ticketName": "无座",
                    "ticketNum": "216"
                },
                "softsleeperdown": {
                    "price": 427.5,
                    "ticketName": "软卧",
                    "ticketNum": "16"
                }
            }
        },
        {
            "num": "K157",
            "fromTime": "18:12",
            "toTime": "09:06",
            "usedTime": 894,
            "fromCity": "北京西",
            "toCity": "武昌",
            "beginCity": "北京西",
            "endCity": "湛江",
            "ticketInfo": {
                "hardseat": {
                    "price": 152.5,
                    "ticketName": "硬座",
                    "ticketNum": "72"
                },
                "hardsleepermid": {
                    "price": 279.5,
                    "ticketName": "硬卧",
                    "ticketNum": "0"
                },
                "noseat": {
                    "price": 152.5,
                    "ticketName": "无座",
                    "ticketNum": "113"
                },
                "softsleeperdown": {
                    "price": 427.5,
                    "ticketName": "软卧",
                    "ticketNum": "0"
                }
            }
        },
        {
            "num": "G527",
            "fromTime": "18:12",
            "toTime": "23:40",
            "usedTime": 328,
            "fromCity": "北京西",
            "toCity": "武汉",
            "beginCity": "北京西",
            "endCity": "武汉",
            "ticketInfo": {
                "businessseat": {
                    "price": 1642.5,
                    "ticketName": "商务座",
                    "ticketNum": "4"
                },
                "firstseat": {
                    "price": 832.5,
                    "ticketName": "一等座",
                    "ticketNum": "80"
                },
                "secondseat": {
                    "price": 520.5,
                    "ticketName": "二等座",
                    "ticketNum": "619"
                }
            }
        },
        {
            "num": "K471",
            "fromTime": "21:13",
            "toTime": "10:55",
            "usedTime": 822,
            "fromCity": "北京西",
            "toCity": "武昌",
            "beginCity": "北京西",
            "endCity": "昆明",
            "ticketInfo": {
                "hardseat": {
                    "price": 152.5,
                    "ticketName": "硬座",
                    "ticketNum": "248"
                },
                "hardsleepermid": {
                    "price": 279.5,
                    "ticketName": "硬卧",
                    "ticketNum": "0"
                },
                "noseat": {
                    "price": 152.5,
                    "ticketName": "无座",
                    "ticketNum": "214"
                },
                "softsleeperdown": {
                    "price": 427.5,
                    "ticketName": "软卧",
                    "ticketNum": "0"
                }
            }
        },
        {
            "num": "T289",
            "fromTime": "22:10",
            "toTime": "10:24",
            "usedTime": 734,
            "fromCity": "北京西",
            "toCity": "武昌",
            "beginCity": "北京西",
            "endCity": "南宁",
            "ticketInfo": {
                "advancedsoftsleeper": {
                    "price": 789.5,
                    "ticketName": "高级软卧",
                    "ticketNum": "3"
                },
                "hardseat": {
                    "price": 152.5,
                    "ticketName": "硬座",
                    "ticketNum": "206"
                },
                "hardsleepermid": {
                    "price": 279.5,
                    "ticketName": "硬卧",
                    "ticketNum": "66"
                },
                "noseat": {
                    "price": 152.5,
                    "ticketName": "无座",
                    "ticketNum": "140"
                },
                "softsleeperdown": {
                    "price": 427.5,
                    "ticketName": "软卧",
                    "ticketNum": "0"
                }
            }
        },
        {
            "num": "Z37",
            "fromTime": "20:47",
            "toTime": "07:06",
            "usedTime": 619,
            "fromCity": "北京西",
            "toCity": "武昌",
            "beginCity": "北京西",
            "endCity": "武昌",
            "ticketInfo": {
                "advancedsoftsleeper": {
                    "price": 789.5,
                    "ticketName": "高级软卧",
                    "ticketNum": "0"
                },
                "hardsleepermid": {
                    "price": 279.5,
                    "ticketName": "硬卧",
                    "ticketNum": "0"
                },
                "softsleeperdown": {
                    "price": 427.5,
                    "ticketName": "软卧",
                    "ticketNum": "0"
                }
            }
        },
        {
            "num": "Z207",
            "fromTime": "21:02",
            "toTime": "08:06",
            "usedTime": 664,
            "fromCity": "北京",
            "toCity": "武昌",
            "beginCity": "天津",
            "endCity": "长沙",
            "ticketInfo": {
                "softsleeperdown": {
                    "price": 427.5,
                    "ticketName": "软卧",
                    "ticketNum": "0"
                }
            }
        }
    ]
	}
}




请求地址 请求参数 返回参数 请求示例 返回示例
接入点列表
站到站查询
车次查询
城市列表
  • 包月套餐(站到站查询)

一次性礼包

0时间:1年

  • 50次调用
  • 不限调用频率
  • 手机认证 要求
  •  
领取

[火车票]站点到站点查询168包月

168 时间:包月(30天)

  • 20000次每天
  • 5次/秒调用频率
订购套餐