AI Agent Hub
Back to skills
Railway 12306 Train Ticket Query icon

Railway 12306 Train Ticket Query

Life Service Updated 2026.08.29

Paste the following prompt into your AI chat to install this skill:

Please follow https://skillhub.cn/install/skillhub.md to install @user_b95ee7e5/train-ticket-query-new.

About this skill

The Problem

Train ticket lookups often stall on practical details: whether G and D services are separated, whether seat availability is current, whether dates are easy to enter, and whether each result includes a booking entry point. This skill targets that query workflow. It connects 12306 official data through a FliggyAI proxy, so natural-language input can return train numbers, fares, timetables, seat availability, and booking links.

How It Works

  • Data path: user input → Python script → Tencent Cloud SCF proxy → FliggyAI → 12306 official data.
  • Core coverage: supports G/D/C/Z/T/K train types and distinguishes G-series high-speed rail, D-series trains, and conventional services.
  • Query scope: returns origin/destination cities, fares, timetables, and seat availability such as business, first class, second class, hard sleeper, and soft sleeper.
  • Input handling: accepts natural-language dates like “tomorrow”, “the day after tomorrow”, and “next Friday”.
  • Result format: each train includes a booking link for the purchase flow.

Boundaries

  • It does not buy tickets, inspect purchased tickets, or process refunds.
  • Seat availability depends on the 12306 API and may fall back to fare reference data if unavailable.
  • Use Chinese city names where possible, and refresh to retrieve the latest availability.

Use Cases

  • When planning a business trip, query tomorrow’s Shanghai–Beijing G-trains and D-trains, fares, timetables, and second-class seat availability to choose a bookable option.
  • When arranging client travel, query Beijing–Chengdu morning D-trains, sleeper availability, and collect booking links for review before sending the itinerary to the client.
  • When rebooking a route, query Guangzhou–Changsha the day after tomorrow, compare departure times, and check whether seats remain for a fallback option.
  • When reviewing travel budget, query city-pair K- or D-trains on a fixed date, compare fares, and attach booking links for approval.

Best For

  • Traveling professionals who need to confirm G- or D-train seat availability and departure times for tomorrow or the day after.
  • Administrative assistants arranging group travel who need to compare morning or evening trains, seat-class availability, and booking links.
  • Finance or project managers building travel budgets who need dated train options and fares for cost reference.
  • Engineers changing routes on short notice who need to check whether a city pair still has bookable seats.