get-interline-tickets
Search for interline (transfer) train tickets on 12306. Filter by date, stations, departure time, train type, and more to find available transfer options.
Instructions
查询12306中转余票信息。尚且只支持查询前十条。
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"date": "<date>",
"fromStation": "<fromStation>",
"toStation": "<toStation>"
},
"name": "get-interline-tickets"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| date | Yes | 查询日期,格式为 "yyyy-MM-dd"。如果用户提供的是相对日期(如“明天”),请务必先调用 `get-current-date` 接口获取当前日期,并计算出目标日期。 | |
| format | No | 返回结果格式,默认为text,建议使用text。可选标志:[text, json] | text |
| showWZ | No | 是否显示无座车,默认不显示无座车。 | |
| sortFlag | No | 排序方式,默认为空,即不排序。仅支持单一标识。可选标志:[startTime(出发时间从早到晚), arriveTime(抵达时间从早到晚), duration(历时从短到长)] | |
| toStation | Yes | 到达地的中文名或站点的 `station_code`(可通过 `get-station-code-by-names` 或 `get-station-code-of-citys` 接口查询得到) | |
| limitedNum | No | 返回的中转余票数量限制,默认为10。 | |
| fromStation | Yes | 出发地的中文名或站点的 `station_code`(可通过 `get-station-code-by-names` 或 `get-station-code-of-citys` 接口查询得到) | |
| sortReverse | No | 是否逆向排序结果,默认为false。仅在设置了sortFlag时生效。 | |
| middleStation | No | 中转地的中文或站点的 `station_code`(可通过 `get-station-code-by-names` 或 `get-station-code-of-citys` 接口查询得到)。该参数可选。 | |
| latestStartTime | No | 最迟出发时间(0-24),默认为24。 | |
| trainFilterFlags | No | 车次筛选条件,默认为空。从以下标志中选取多个条件组合[G(高铁/城际),D(动车),Z(直达特快),T(特快),K(快速),O(其他),F(复兴号),S(智能动车组)] | |
| earliestStartTime | No | 最早出发时间(0-24),默认为0。 |