每次请求API接口:0.00000 元
接口地址:https://api.178v.cn/api/gtdc/api.php
返回格式:application/json
请求方式:GET/POST
请求示例:https://api.178v.cn/api/gtdc/api.php?apikey=你开通的apikey&from=出发地&to=终点地&time=查询时间(2024-01-28),不填则为当日时间
| 名称 | 必填 | 类型 | 说明 |
|---|---|---|---|
| apikey | 是 | string | 你开通的apikey |
| from | 是 | string | 出发地 |
| to | 是 | string | 终点地 |
| time | 否 | string | 查询时间(2024-01-28),不填则为当日时间 |
| 名称 | 类型 | 说明 |
|---|---|---|
| code | int | 状态码 |
| msg | string | 状态信息 |
| from | string | 出发地 |
| to | string | 终点地 |
| time | string | 查询时间 |
| count | string | 获取数量 |
| data | string | 返回内容 |
| traintype | string | 车辆类型 |
| trainnumber | string | 车辆代码 |
| departstation | string | 出发点 |
| arrivestation | string | 终点站 |
| departtime | string | 出发时间 |
| arrivetime | string | 到达时间 |
| runtime | string | 过程时间 |
| ticket_info | string | 车辆车票信息 |
| seatname | string | 座次等级 |
| bookable | string | 车票状态 |
| seatprice | string | 车票价格 |
| seatinventory | string | 剩余车票数量 |
{
"code": 200,
"msg": "查询成功",
"from": "北京",
"to": "上海",
"time": "2024-11-30",
"count": 11,
"data": [
{
"traintype": "高铁",
"trainumber": "G157",
"departstation": "北京南",
"arrivestation": "上海虹桥",
"departtime": "16:53",
"arrivetime": "23:13",
"runtime": "6小时20分钟",
"ticket_info": [
{
"seatname": "二等座",
"bookable": "有车票",
"seatprice": 553,
"seatinventory": 99
},
{
"seatname": "一等座",
"bookable": "有车票",
"seatprice": 930,
"seatinventory": 99
},
{
"seatname": "商务座",
"bookable": "有车票",
"seatprice": 1873,
"seatinventory": 18
}
]
},
{
"traintype": "高铁",
"trainumber": "G21",
"departstation": "北京南",
"arrivestation": "上海虹桥",
"departtime": "17:00",
"arrivetime": "21:18",
"runtime": "4小时18分钟",
"ticket_info": [
{
"seatname": "二等座",
"bookable": "有车票",
"seatprice": 598,
"seatinventory": 99
},
{
"seatname": "一等座",
"bookable": "有车票",
"seatprice": 1006,
"seatinventory": 99
},
{
"seatname": "优选一等座",
"bookable": "有车票",
"seatprice": 1383,
"seatinventory": 6
},
{
"seatname": "商务座",
"bookable": "有车票",
"seatprice": 2158,
"seatinventory": 6
}
]
},
{
"traintype": "高铁",
"trainumber": "G159",
"departstation": "北京南",
"arrivestation": "上海虹桥",
"departtime": "17:19",
"arrivetime": "23:18",
"runtime": "5小时59分钟",
"ticket_info": [
{
"seatname": "二等座",
"bookable": "有车票",
"seatprice": 526,
"seatinventory": 99
},
{
"seatname": "一等座",
"bookable": "有车票",
"seatprice": 884,
"seatinventory": 15
},
{
"seatname": "商务座",
"bookable": "有车票",
"seatprice": 1748,
"seatinventory": 6
}
]
},
{
"traintype": "高铁",
"trainumber": "G161",
"departstation": "北京南",
"arrivestation": "上海虹桥",
"departtime": "17:33",
"arrivetime": "23:37",
"runtime": "6小时4分钟",
"ticket_info": [
{
"seatname": "二等座",
"bookable": "有车票",
"seatprice": 526,
"seatinventory": 99
},
{
"seatname": "一等座",
"bookable": "有车票",
"seatprice": 884,
"seatinventory": 99
},
{
"seatname": "商务座",
"bookable": "有车票",
"seatprice": 1748,
"seatinventory": 14
}
]
},
{
"traintype": "高铁",
"trainumber": "G23",
"departstation": "北京南",
"arrivestation": "上海",
"departtime": "18:00",
"arrivetime": "22:43",
"runtime": "4小时43分钟",
"ticket_info": [
{
"seatname": "二等座",
"bookable": "有车票",
"seatprice": 581,
"seatinventory": 99
},
{
"seatname": "一等座",
"bookable": "有车票",
"seatprice": 977,
"seatinventory": 99
},
{
"seatname": "商务座",
"bookable": "有车票",
"seatprice": 1889,
"seatinventory": 9
}
]
},
{
"traintype": "高铁",
"trainumber": "G25",
"departstation": "北京南",
"arrivestation": "上海虹桥",
"departtime": "18:04",
"arrivetime": "22:58",
"runtime": "4小时54分钟",
"ticket_info": [
{
"seatname": "二等座",
"bookable": "有车票",
"seatprice": 576,
"seatinventory": 99
},
{
"seatname": "一等座",
"bookable": "有车票",
"seatprice": 969,
"seatinventory": 99
},
{
"seatname": "优选一等座",
"bookable": "有车票",
"seatprice": 1332,
"seatinventory": 99
},
{
"seatname": "商务座",
"bookable": "有车票",
"seatprice": 1873,
"seatinventory": 20
}
]
},
{
"traintype": "高铁",
"trainumber": "G27",
"departstation": "北京南",
"arrivestation": "上海",
"departtime": "19:00",
"arrivetime": "23:29",
"runtime": "4小时29分钟",
"ticket_info": [
{
"seatname": "二等座",
"bookable": "有车票",
"seatprice": 557,
"seatinventory": 99
},
{
"seatname": "一等座",
"bookable": "有车票",
"seatprice": 937,
"seatinventory": 99
},
{
"seatname": "优选一等座",
"bookable": "有车票",
"seatprice": 1287,
"seatinventory": 20
},
{
"seatname": "商务座",
"bookable": "有车票",
"seatprice": 1889,
"seatinventory": 10
}
]
},
{
"traintype": "动车",
"trainumber": "D7",
"departstation": "北京",
"arrivestation": "上海",
"departtime": "19:22",
"arrivetime": "07:25",
"runtime": "12小时3分钟",
"ticket_info": [
{
"seatname": "二等座",
"bookable": "有车票",
"seatprice": 293,
"seatinventory": 99
},
{
"seatname": "二等卧",
"bookable": "有车票",
"seatprice": 514,
"seatinventory": 99
},
{
"seatname": "一等卧",
"bookable": "有车票",
"seatprice": 631,
"seatinventory": 99
},
{
"seatname": "无座",
"bookable": "有车票",
"seatprice": 293,
"seatinventory": 99
}
]
},
{
"traintype": "动车",
"trainumber": "D9",
"departstation": "北京南",
"arrivestation": "上海",
"departtime": "19:36",
"arrivetime": "07:46",
"runtime": "12小时10分钟",
"ticket_info": [
{
"seatname": "二等座",
"bookable": "有车票",
"seatprice": 314,
"seatinventory": 99
},
{
"seatname": "二等卧",
"bookable": "有车票",
"seatprice": 550,
"seatinventory": 99
},
{
"seatname": "一等卧",
"bookable": "有车票",
"seatprice": 627,
"seatinventory": 99
}
]
},
{
"traintype": "普通",
"trainumber": "T109",
"departstation": "北京",
"arrivestation": "上海",
"departtime": "20:03",
"arrivetime": "11:02",
"runtime": "14小时59分钟",
"ticket_info": [
{
"seatname": "硬座",
"bookable": "暂无车票",
"seatprice": 177.5,
"seatinventory": 0
},
{
"seatname": "硬卧",
"bookable": "暂无车票",
"seatprice": 325.5,
"seatinventory": 0
},
{
"seatname": "软卧",
"bookable": "有车票",
"seatprice": 497.5,
"seatinventory": 9
},
{
"seatname": "无座",
"bookable": "有车票",
"seatprice": 177.5,
"seatinventory": 99
}
]
},
{
"traintype": "动车",
"trainumber": "D5",
"departstation": "北京",
"arrivestation": "上海",
"departtime": "21:21",
"arrivetime": "09:27",
"runtime": "12小时6分钟",
"ticket_info": [
{
"seatname": "二等座",
"bookable": "暂无车票",
"seatprice": 316,
"seatinventory": 0
},
{
"seatname": "二等卧",
"bookable": "有车票",
"seatprice": 553,
"seatinventory": 99
},
{
"seatname": "一等卧",
"bookable": "有车票",
"seatprice": 680,
"seatinventory": 99
},
{
"seatname": "无座",
"bookable": "有车票",
"seatprice": 316,
"seatinventory": 99
}
]
}
],
}
| 错误码 | 说明 |
|---|---|
| 100 | 您的apikey值为空! |
| 101 | 您的apikey值不存在! |
| 102 | 当前来源地址不在白名单内! |
| 103 | 当前接口为实名认证后可用,请您先进行实名! |
| 104 | 当前接口为企业认证后可用,请您先进行企业认证! |
| 105 | 当前接口未通过审核或已停止运营! |
| 106 | 您的余额不足,请及时充值! |
| 107 | 您当前的接口免费期限已过期,请及时开通! |
| 108 | 您的点数包已过期,请及时续费! |
| 109 | 您的点数包已用完,请及时充值! |
| 110 | 您的账号已被封禁,不可使用任何接口! |