携程火车票API 搞笑版

携程火车票API

1) 请求地址

https://trains.ctrip.com/pages/booking/getTransferList?departureStation=%2525E9%252587%25258D%2525E5%2525BA%252586&arrivalStation=%2525E5%25258C%252597%2525E4%2525BA%2525AC&departDateStr=2020-08-27

2) 调用方式:HTTP get

3) 接口描述:

  • 接口描述详情

4) 请求参数:

GET参数:

字段名称字段说明类型必填备注
departureStation stringY-
arrivalStation stringY-
departDateStr stringY-

5) 请求返回结果:

{
    "status": 0,
    "message": "Success",
    "data": {
        "transferList": [
            {
                "departStation": "重庆西",
                "arriveStation": "北京西",
                "transferStation": "西安北",
                "transferTakeTime": "38分钟",
                "showPriceText": "¥797起",
                "trainTransferInfos": [
                    {
                        "sequence": 1,
                        "trainNo": "D1961",
                        "trainNumber": "D1961",
                        "departStation": "重庆西",
                        "departStationPy": "chongqingxi",
                        "arriveStation": "西安北",
                        "arriveStationPy": "xianbei",
                        "departDate": "2020-08-27",
                        "departTime": "12:15",
                        "arriveDate": "2020-08-27",
                        "arriveTime": "17:46",
                        "isStartStation": true,
                        "isEndStation": false,
                        "runTime": "5小时31分钟",
                        "preSaleTime": null,
                        "takeDays": 0,
                        "isBookable": true,
                        "seatList": [
                            {
                                "seatName": "二等座",
                                "showSeatName": "二等座",
                                "price": "281.5",
                                "orderPrice": 281.5,
                                "inventory": 99,
                                "inventoryStr": "有票",
                                "isBookable": true,
                                "buttonDisplayName": null,
                                "buttonType": 0
                            },
                            {
                                "seatName": "一等座",
                                "showSeatName": "一等座",
                                "price": "452",
                                "orderPrice": 452,
                                "inventory": 99,
                                "inventoryStr": "有票",
                                "isBookable": true,
                                "buttonDisplayName": null,
                                "buttonType": 0
                            },
                            {
                                "seatName": "特等座",
                                "showSeatName": "特等座",
                                "price": "509",
                                "orderPrice": 509,
                                "inventory": 99,
                                "inventoryStr": "有票",
                                "isBookable": true,
                                "buttonDisplayName": null,
                                "buttonType": 0
                            },
                            {
                                "seatName": "无座",
                                "showSeatName": "无  座",
                                "price": "281.5",
                                "orderPrice": 281.5,
                                "inventory": 0,
                                "inventoryStr": "余<em>0</em>张",
                                "isBookable": false,
                                "buttonDisplayName": null,
                                "buttonType": 0
                            }
                        ],
                        "curSeatIndex": 0
                    },
                    {
                        "sequence": 2,
                        "trainNo": "G90",
                        "trainNumber": "G90",
                        "departStation": "西安北",
                        "departStationPy": "xianbei",
                        "arriveStation": "北京西",
                        "arriveStationPy": "beijingxi",
                        "departDate": "2020-08-27",
                        "departTime": "18:24",
                        "arriveDate": "2020-08-27",
                        "arriveTime": "22:52",
                        "isStartStation": false,
                        "isEndStation": true,
                        "runTime": "4小时28分钟",
                        "preSaleTime": null,
                        "takeDays": 0,
                        "isBookable": true,
                        "seatList": [
                            {
                                "seatName": "二等座",
                                "showSeatName": "二等座",
                                "price": "515.5",
                                "orderPrice": 515.5,
                                "inventory": 99,
                                "inventoryStr": "有票",
                                "isBookable": true,
                                "buttonDisplayName": null,
                                "buttonType": 0
                            },
                            {
                                "seatName": "一等座",
                                "showSeatName": "一等座",
                                "price": "824.5",
                                "orderPrice": 824.5,
                                "inventory": 11,
                                "inventoryStr": "余11张",
                                "isBookable": true,
                                "buttonDisplayName": null,
                                "buttonType": 0
                            },
                            {
                                "seatName": "商务座",
                                "showSeatName": "商务座",
                                "price": "1627.5",
                                "orderPrice": 1627.5,
                                "inventory": 10,
                                "inventoryStr": "余<em>10</em>张",
                                "isBookable": true,
                                "buttonDisplayName": null,
                                "buttonType": 0
                            }
                        ],
                        "curSeatIndex": 0
                    }
                ],
                "totalRuntime": "10小时37分钟",
                "totalRuntimeValue": 637,
                "index": 1,
                "tagList": null
            },
            {
                "departStation": "重庆西",
                "arriveStation": "北京西",
                "transferStation": "西安北",
                "transferTakeTime": "42分钟",
                "showPriceText": "¥924.5起",
                "trainTransferInfos": [
                    {
                        "sequence": 1,
                        "trainNo": "G1710",
                        "trainNumber": "G1710",
                        "departStation": "重庆西",
                        "departStationPy": "chongqingxi",
                        "arriveStation": "西安北",
                        "arriveStationPy": "xianbei",
                        "departDate": "2020-08-27",
                        "departTime": "10:49",
                        "arriveDate": "2020-08-27",
                        "arriveTime": "16:19",
                        "isStartStation": true,
                        "isEndStation": false,
                        "runTime": "5小时30分钟",
                        "preSaleTime": null,
                        "takeDays": 0,
                        "isBookable": true,
                        "seatList": [
                            {
                                "seatName": "二等座",
                                "showSeatName": "二等座",
                                "price": "409",
                                "orderPrice": 409,
                                "inventory": 99,
                                "inventoryStr": "有票",
                                "isBookable": true,
                                "buttonDisplayName": null,
                                "buttonType": 0
                            },
                            {
                                "seatName": "一等座",
                                "showSeatName": "一等座",
                                "price": "654.5",
                                "orderPrice": 654.5,
                                "inventory": 99,
                                "inventoryStr": "有票",
                                "isBookable": true,
                                "buttonDisplayName": null,
                                "buttonType": 0
                            },
                            {
                                "seatName": "商务座",
                                "showSeatName": "商务座",
                                "price": "1227",
                                "orderPrice": 1227,
                                "inventory": 19,
                                "inventoryStr": "余19张",
                                "isBookable": true,
                                "buttonDisplayName": null,
                                "buttonType": 0
                            }
                        ],
                        "curSeatIndex": 0
                    },
                    {
                        "sequence": 2,
                        "trainNo": "G438",
                        "trainNumber": "G438",
                        "departStation": "西安北",
                        "departStationPy": "xianbei",
                        "arriveStation": "北京西",
                        "arriveStationPy": "beijingxi",
                        "departDate": "2020-08-27",
                        "departTime": "17:01",
                        "arriveDate": "2020-08-27",
                        "arriveTime": "21:42",
                        "isStartStation": false,
                        "isEndStation": true,
                        "runTime": "4小时41分钟",
                        "preSaleTime": null,
                        "takeDays": 0,
                        "isBookable": true,
                        "seatList": [
                            {
                                "seatName": "二等座",
                                "showSeatName": "二等座",
                                "price": "515.5",
                                "orderPrice": 515.5,
                                "inventory": 99,
                                "inventoryStr": "有票",
                                "isBookable": true,
                                "buttonDisplayName": null,
                                "buttonType": 0
                            },
                            {
                                "seatName": "一等座",
                                "showSeatName": "一等座",
                                "price": "824.5",
                                "orderPrice": 824.5,
                                "inventory": 3,
                                "inventoryStr": "余<em>3</em>张",
                                "isBookable": true,
                                "buttonDisplayName": null,
                                "buttonType": 0
                            },
                            {
                                "seatName": "商务座",
                                "showSeatName": "商务座",
                                "price": "1627.5",
                                "orderPrice": 1627.5,
                                "inventory": 3,
                                "inventoryStr": "余<em>3</em>张",
                                "isBookable": true,
                                "buttonDisplayName": null,
                                "buttonType": 0
                            }
                        ],
                        "curSeatIndex": 0
                    }
                ],
                "totalRuntime": "10小时53分钟",
                "totalRuntimeValue": 653,
                "index": 2,
                "tagList": null
            }
}

6) 请求返回结果参数说明:

字段名称字段说明类型必填备注
status stringY-
message stringY-
data stringY-
transferList stringY-
departStation stringY-
arriveStation stringY-
transferStation stringY-
transferTakeTime stringY-
showPriceText stringY-
trainTransferInfos stringY-
sequence stringY-
trainNo stringY-
trainNumber stringY-
departStationPy stringY-
arriveStationPy stringY-
departDate stringY-
departTime stringY-
arriveDate stringY-
arriveTime stringY-
isStartStation stringY-
isEndStation stringY-
runTime stringY-
preSaleTime stringY-
takeDays stringY-
isBookable stringY-
seatList stringY-
seatName stringY-
showSeatName stringY-
price stringY-
orderPrice stringY-
inventory stringY-
inventoryStr stringY-
buttonDisplayName stringY-
buttonType stringY-
curSeatIndex stringY-
totalRuntime stringY-
totalRuntimeValue stringY-
index stringY-
tagList stringY-
extendInfo stringY-
departStationList stringY-
endStationList stringY-
departStationFilterMap stringY-
endStationFilterMap stringY-
departCityName stringY-
arriveCityName stringY-
gtMinPrice stringY-
评论 5
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

程序007

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值