12306-train-query

Query 12306 train schedules and parse train numbers, times, and seat availability.

11|12|Updated Feb 28, 2026
One-click install
npx skills add https://github.com/mofa-org/mofa-skills --skill 12306-train-query-mofa-org
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: 12306-train-query
Source: https://github.com/mofa-org/mofa-skills/tree/main/_unpublished/12306-train-query
Command: npx skills add https://github.com/mofa-org/mofa-skills --skill 12306-train-query-mofa-org

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill standardizes and speeds up 12306 train schedule inquiries by providing verified browser SOP-driven workflows and URL-based direct-query strategies to ensure accurate results for users querying train times, seat availability, and connections.

Core Features & Use Cases

  • URL-based direct query: Constructs a precise 12306 URL and parses structured results to return train numbers, departure/arrival times, durations, and seat availability.
  • Fallback form-based workflow: If direct URL querying fails, switches to a browser-driven form interaction on the official site to retrieve data.
  • Cross-route support: Handles short and long-distance trips across multiple regions, with robust station code resolution and date formatting.
  • Error handling & validation: Validates inputs (stations, dates), detects no-result scenarios, and provides guided recovery steps.

Quick Start

Query the next available trains from origin to destination on a specific date and receive train times and seat availability.

Frequently Asked Questions about 12306-train-query

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

FAQPage Schema
How do I query 12306 train schedules and seat availability?

12306 train queries are automated by constructing direct URLs and parsing structured results. This delivers train numbers, departure and arrival times, trip durations, and current seat availability for your specified route and date.

What happens if the 12306 direct URL query fails to return results?

When direct URL querying fails, a fallback form-based workflow is triggered. It switches to browser-driven form interaction on the official 12306 site to retrieve train schedules and seat availability reliably.

Can I use this to check long-distance train connections across different regions?

Yes, the skill handles both standard and long-distance routes across multiple regions. It resolves specific station codes and formats dates to ensure accurate cross-region train schedule and connection inquiries.

Does the 12306 query tool validate station inputs and dates?

Yes, station names and dates are strictly validated before executing the 12306 query. The skill detects no-result scenarios and provides guided recovery steps to ensure successful train schedule retrieval.

What is the best way to automate 12306 ticket availability checks?

Automating 12306 ticket availability is best achieved through verified browser SOP-driven workflows and direct URL strategies. This standardizes data extraction to return accurate train times, connections, and seat availability.