SERVICE & TOOLS

12306 Train Tickets

China Railway 12306 — train ticket query, availability, pricing and schedules

8 available tools

get_station_by_telecode

Query detailed station information by station telecode, including name, pinyin, city, etc. Mainly used to get complete station data when telecode is known, or for special queries and debugging purpose…

get_station_code_by_names

Query station_code and station name by Chinese station name. Mainly used to prepare station_code parameter when user provides specific station name as departure or arrival.

get_station_code_of_citys

Query station code for a city by Chinese city name. This interface is mainly used to prepare station_code parameter when user provides city name as departure or destination

get_stations_code_in_city

Query all train station names and their corresponding station_codes in a city by Chinese city name, result is a list containing multiple station information

get_train_route_stations

Query detailed stopping information for a specific train number within a specified interval, including passing stations, arrival time, departure time and stop duration. Used when user asks about stopp…

get_current_date

Get current date based on Shanghai timezone (Asia/Shanghai, UTC+8), return format is yyyy-MM-dd. Mainly used to parse relative dates mentioned by users (like tomorrow, next Wednesday), providing accur…

get_interline_tickets

Query 12306 transfer ticket availability. Currently only supports querying the first 10 results

get_tickets

Query 12306 ticket availability

get-current-date

获取当前日期,以上海时区(Asia/Shanghai, UTC+8)为准,返回格式为 "yyyy-MM-dd"。主要用于解析用户提到的相对日期(如“明天”、“下周三”),为其他需要日期的接口提供准确的日期输入。

get-interline-tickets

查询12306中转余票信息。尚且只支持查询前十条。

get-station-by-telecode

通过车站的 `station_telecode` 查询车站的详细信息,包括名称、拼音、所属城市等。此接口主要用于在已知 `telecode` 的情况下获取更完整的车站数据,或用于特殊查询及调试目的。一般用户对话流程中较少直接触发。

get-station-code-by-names

通过具体的中文车站名查询其 `station_code` 和车站名。此接口主要用于在用户提供**具体车站名**作为出发地或到达地时,为接口准备 `station_code` 参数。

get-station-code-of-citys

通过中文城市名查询代表该城市的 `station_code`。此接口主要用于在用户提供**城市名**作为出发地或到达地时,为接口准备 `station_code` 参数。

get-stations-code-in-city

通过中文城市名查询该城市 **所有** 火车站的名称及其对应的 `station_code`,结果是一个包含多个车站信息的列表。

get-tickets

查询12306余票信息。

get-train-route-stations

查询特定列车车次在指定区间内的途径车站、到站时间、出发时间及停留时间等详细经停信息。当用户询问某趟具体列车的经停站时使用此接口。