travel-query

Queries official 12306 Chinese train and high-speed rail schedules, fares, and ticket availability by route, date, and station code.

9|Updated Jun 11, 2026
One-click install
npx skills add https://github.com/llm011/ethan-agent --skill travel-query
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: travel-query
Source: https://github.com/llm011/ethan-agent/tree/main/ethan/defaults/skills/travel-query
Command: npx skills add https://github.com/llm011/ethan-agent --skill travel-query

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill eliminates the hassle of searching unreliable travel websites by querying official 12306 train data directly for current routes, schedules, durations, and ticket fares.

Core Features & Use Cases

  • Official Train Search: Query 12306 for train and high-speed rail services between Chinese stations.
  • Schedule and Fare Details: Retrieve departure and arrival times, journey duration, seat classes, prices, and ticket availability.
  • Route Comparison: Find the earliest or latest service, inspect a specific train, or compare multiple routes.
  • Station Code Resolution: Convert common Chinese station names into the three-letter codes required by the 12306 API.
  • Use Case: A traveler asking for trains from Beijing South to Shanghai Hongqiao on a specific date can receive a concise comparison of available services, travel times, and seat prices.

Quick Start

Ask the travel-query skill to find available trains from Beijing South to Shanghai Hongqiao on your chosen date and compare their departure times, durations, and second-class fares.

Frequently Asked Questions about travel-query

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I query official 12306 high-speed rail schedules and fares for a specific route?

To query 12306 high-speed rail schedules and fares, provide a valid YYYY-MM-DD date and three-letter station codes for your departure and arrival stations. The skill retrieves official departure times, durations, seat classes, and prices.

Can I find the earliest or latest train between two Chinese stations on a chosen date?

Yes, you can find the earliest or latest train by searching routes between your specified Chinese stations on a specific date. The query compares available services and returns departure and arrival times for selection.

How do I convert common Chinese station names to the three-letter codes required by the 12306 API?

The skill resolves common Chinese station names into the three-letter 12306 station codes required by the API. This conversion is necessary to accurately query train schedules, fares, and ticket availability.

Do I need shell access to retrieve Chinese train ticket availability and route details?

Yes, retrieving Chinese train ticket availability and route details requires shell access for curl commands and Python standard-library JSON parsing. This environment is necessary to fetch and process official 12306 data.

What train details can I compare when looking up routes between Chinese stations?

When looking up train routes between Chinese stations, you can compare departure and arrival times, total journey duration, available seat classes, ticket fares, and current ticket availability across multiple services.

Why does my train schedule query fail when using station names instead of codes?

Train schedule queries fail because the 12306 API requires three-letter station codes rather than common names. You must resolve your Chinese station names into these specific codes before querying routes, schedules, and fares.