How I Automated China High-Speed Rail Ticket Booking (And What I Learned)
How I Automated China High-Speed Rail Ticket Booking (And What I Learned) I needed to book a high-speed rail ticket from Beijing to Shanghai for a friend visiting from abroad. The official app (12306) is the only legal way to buy tickets, but the foreigner verification process is opaque and slow. So I did what any ops engineer would do: automate the research, document the edge cases, and build a…
Automating China High-Speed Rail Ticket Booking: Lessons Learned
The author needed to book a high-speed rail ticket for a friend visiting from abroad. The official app (12306) is the only legal method for purchasing tickets, but the foreigner verification process is slow and not well understood. To resolve this, the author automated the research, documented edge cases, and created a checklist.
Three key steps to automate China high-speed rail ticket booking are outlined:
1. Registration (The Bottleneck)
- Register on the 12306 app, entering the foreigner's passport information
- Expect a 1-7 day verification delay
- Do not register on the day of travel
- Register as soon as travel dates are known
2. Booking (The Quick Part)
- Search the desired route
- Select train and seat class
- Pay using Alipay, WeChat Pay, or a linked international card
- The booking window allows up to 15 days in advance
3. Day of Travel
- Arrive 30-45 minutes early
- Verify passport information at the gate
- Find the correct train platform
- Common mistakes include not knowing which station to go to, missing the train due to incorrect station, and understanding refund rules
The author's key takeaways after booking 12+ tickets across 6 routes include:
- Registering for a 12306 account at least 7 days before travel to account for verification delays
- Booking up to 15 days in advance to secure preferred seat classes
- Checking the correct station, especially in cities with multiple stations
- Arriving early to avoid delays caused by verification delays
- Understanding refund policies if plans change last minute
The author concludes that once the 12306 account is set up, the actual booking process takes only about 7 minutes, with the majority of time spent on preparation. The automation mindset involves identifying bottlenecks, buffering for worst-case scenarios, documenting edge cases, and building checklists to streamline the travel planning process.
Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.