API for agents and developers
Everything on the site is also plain JSON, static and free to use under the ODbL with attribution ("Data: pickthetrain.com, from official open timetables"). No key, no rate limit beyond fair use.
| Endpoint | Returns |
|---|---|
/api/v1/cities.json | Every city: id, name, country, coordinates, its stations and airports (with typical access minutes) |
/api/v1/routes.json | Every city pair with a direct cross-border train: trains a day, fastest minutes, families |
/api/v1/from/{city}.json | Every direct destination from one city |
/api/v1/arrivals/{city}.json | Every direct train arriving in a city from abroad: arrival time (local minutes after midnight), train, family, where it starts and its stops abroad, the days it runs and the exact dates, and at Swiss stations the planned platform for each date (from SBB's timetable; it can change on the day) |
/api/v1/routes/{from}/{to}.json | Every direct train in one direction: departure/arrival (local minutes after midnight), duration, family, train, operator + official site, stations, the days it runs and the exact dates (dates; alt marks a train's other timetable, the same train at other times on those dates), the door-to-door comparison, and the nonstop airlines for the same trip (fly) |
/api/v1/paused.json | Every route whose trains stopped: no direct train in the window, the day the last one ran and its operators. Its page stays at its address, with a note in place of the timetable |
/night-trains/routes.json | Every night train across a border with beds or couchettes that you are on at 3 in the morning (the night trains page): one row per train and timetable on each route, Europe and North America, with its times, the nights it runs as one character per day of the window, the operator's own site, and door to door by plane. Self-describing: fields and about_fields name each column |
/api/v1/meta.json | When the timetables were last checked, the window the times cover, and the build date |
/api/v1/sources.json | Every timetable source: operator, what it covers, licence, the publisher's page, and the date of each file the site uses |
City ids are lowercase slugs, e.g. zurich, st-gallen, frankfurt-oder. Example: /api/v1/routes/zurich/milan.json. Human pages: /trains/{from}-to-{to}/, /from/{city}/ (where you can go), /to/{city}/ (what arrives from abroad) and /from/ (find your station). See also llms.txt and intents.md.