Juhe Data Train Ticket Query
Paste the following prompt into your AI chat to install this skill:
Please follow https://skillhub.cn/install/skillhub.md to install @user_c3477421/juhe-train-ticket
About this skill
Problem Addressed
Frontend and automation flows often need stable train data for a route, while scraping passenger-facing sites is brittle. This skill wraps the Juhe Data train query API so you can request schedules between two stations and receive structured fields such as trains, departure and arrival times, duration, fares, remaining seats, and booking status.
How It Works
- Calls
https://apis.juhe.cn/fapigw/train/queryusingGET / POSTwith JSON responses. - Uses
search_type=1for Chinese station names orsearch_type=2for three-letter station codes from the bundled station mapping. - Supports
filtercodes such as G, D, Z, T, K, F, S, and O, plusdeparture_time_rangeby early morning, morning, afternoon, or night. - Returns
train_no,departure_time,arrival_time,duration,prices,num,enable_booking, andtrain_flagsfor comparison or pre-booking UIs.
Boundaries
- Queries are limited to 15 days from the current date; historical dates are not supported.
- Requires a Juhe Data API Key and remains subject to plan-based QPS and daily call limits.
- Remaining-seat
numcan be “有”, a number, or “无”; it is not a final payment confirmation. - For error
281701, check station name format first or retry with the station code.
Use Cases
- When building a trip reminder, query train times for a 15-day window and filter afternoon departures.
- When building a travel comparison page, query G/D trains, duration, second-class fares, and remaining seats.
- When building a customer support tool, convert user route and date inputs into API parameters and return bookable trains.
- When a station name fails, look up the bundled station code, retry with station_code, and log error_code and reason.
Best For
- Backend engineers building trip or support bots who need stable train schedules and fares within 15 days.
- Full-stack developers building travel pages who need to filter G, D, Z, T, and K trains by time range.
- Data engineers building dashboards who need train, remaining-seat num, and train_flags as structured inputs.
- Operations engineers maintaining API gateways who need to handle key permissions, QPS limits, and 281701 retries.
Related Skills
Create a room-by-room plant watering handoff note for a sitter, with water amounts, timing, owner notes, and skip-if-unsure guidance.
A browser-based personal workbench generator that ships desktop or mobile templates with local storage, JSON backup, theming, and optional self-hosted sync.
Vehicle-specific maintenance advisor that estimates fault risk, repair actions, and price ranges with VIN, nameplate, and appearance recognition.
Combines traditional Zhou Gong dream symbols with psychological framing to produce structured interpretations of details, symbols, emotions, and life context.