當前所在位置:首頁>數據接口>生活服務>12306火車票查詢訂票

12306火車票查詢訂票 

即日起至7月1日鐵路部門執行調整列車運行圖,全國列車開行密度、運行時速、停靠時刻都將發生變化

數據ID:25

接口狀態:正常

連接應用數:1000

接入服務商:haoservice

/100次 購買套餐

  • API
  • 錯誤碼參照
  • 資費套餐
  • 版本變更
  • 代碼示例
  • 其他相關
接口地址: http://apis.haoservice.com/lifeservice/train/ypcx
支持格式: JSON/XML
請求方式: GET/POST
明文方式請求參數:
名稱 類型 必填 說明
key string API KEY
date String 出發日期,默認今日
from String 出發站(如:上海虹橋)
to String 到達站(如:溫州南)
密文方式請求參數:
名稱 類型 必填 說明
IsEncrypt bool 是否密文傳輸方式
key string API KEY
params string 3des ECB模式 PKCS7填充模式 加密 3des("date=2015-04-27&from=上海&to=溫州","openId前24位")
調用樣例及調試工具:
返回字段:
名稱 類型 說明
ticketpriceString火車票票價信息 A9:商務座,P:商務座,M:一等座 O:二等座,A6:,高級軟臥,A4:軟臥,A3:硬臥,A2:軟座,A1:硬座,WZ:無座的票價
明文JSON返回示例:
{ "error_code":"0", "reason":"Success", "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": "--" ,"ticketprice":{"OT":[],"WZ":"¥226.0","M":"¥335.5","A9":"¥689.0","9":"6890","O":"¥226.0","train_no":"5l000G753722"}}, { "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","ticketprice":{"OT":[],"WZ":"¥226.0","M":"¥335.5","A9":"¥689.0","9":"6890","O":"¥226.0","train_no":"5l000G753722"} }] }
密文JSON返回示例:
hCe2pmNRFnwP3gbrGm9vnobmGI+VZPwJAFJ6xcEkeJGyOQKBipdMSDN1yb3lDI48WoqV7IJHb3tjJABrAc00igyE1dYBYQophG/6anzWjA857/YaMzKj5kfiVxyBavy4a4OudBnMncw=

推薦接口/API

  • 電子眼防拍

    最新電子眼api,電子狗api,通過該接口提前提醒車主電子眼或測速雷達等測速設備的存在,防止因為超速等違規而被罰款和扣分。為普通電子狗、智能電子狗、云電子狗等設備提供即時提醒。

  • 全國天氣查詢

    全國天氣查詢API

  • 全國車輛違章查詢

    支持全國300多個城市的車輛違章查詢

  • 航班查詢[實時動態]

    國內航班動態實時查詢API

  • 手機歸屬地查詢

    通過手機號即可知道用戶所在的地區

  • 影訊API合集

    影片信息、評分、影視票房榜,電影院上映信息等API

聯系客服

010-58436659

浙江6+1今日开奖