12306-train-query

Query 12306 train schedules and seat availability for routes and dates.

119|21|Updated Mar 19, 2026
One-click install
npx skills add https://github.com/stvlynn/dingtalk-wukong-skills --skill 12306-train-query
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: 12306-train-query
Source: https://github.com/stvlynn/dingtalk-wukong-skills/tree/main/12306-train-query
Command: npx skills add https://github.com/stvlynn/dingtalk-wukong-skills --skill 12306-train-query

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

12306火车票查询通常需要在官网上手动操作、对站名进行代码映射、解析票务信息,流程繁琐且易出错。本技能提供一个标准化、可重复的查询流程,以获得准确的班次、时刻、历时和余票状态。

Core Features & Use Cases

  • URL参数直连查询,快速获取车次信息,附带站名到站点代码的映射说明
  • 浏览器操作SOP作为回退方案,解决直接查询被阻塞或不稳定的情形
  • 结果以结构化表格呈现,包含车次、出发/到达时间、历时和余票状态,便于日程规划

Quick Start

直接输入出发地、目的地和日期即可获取符合条件的车次清单与余票信息。

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 for a specific route?

To query 12306 train schedules and seat availability, input your departure location, destination, and date. The skill constructs exact URL parameters for direct queries and uses a browser automation SOP as a fallback to return train numbers, times, and ticket status.

Can I check ticket availability for multi-leg train routes on 12306?

Yes, you can check ticket availability for multi-leg train routes on 12306. The query process covers single-trip and multi-leg routes, returning structured data including departure times, arrival times, durations, and current ticket status.

What should I do when direct URL parameter queries for 12306 are blocked or unstable?

When direct URL parameter queries for 12306 are blocked or unstable, you should use the browser automation SOP fallback. This standardized operational flow handles blocked direct queries and ensures robust result parsing with error handling and retries.

How does station name to code mapping work for 12306 train lookups?

Station name to code mapping translates standard station names into the specific site codes required for 12306 URL parameter construction. This mapping is included in the query process to ensure accurate direct connections for retrieving train schedules.

Is there a standardized process for parsing 12306 ticket status with error handling?

Yes, there is a standardized process for parsing 12306 ticket status with error handling. The skill enforces robust result parsing and includes retry mechanisms to accurately extract train numbers, durations, and seat availability from the retrieved data.

What data do I get back from a 12306 train schedule query?

From a 12306 train schedule query, you get structured results containing train numbers, departure times, arrival times, trip durations, and seat availability status. This structured output is designed to facilitate easy schedule planning.