pickthetrain

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.

EndpointReturns
/api/v1/cities.jsonEvery city: id, name, country, coordinates, its stations and airports (with typical access minutes)
/api/v1/routes.jsonEvery city pair with a direct cross-border train: trains a day, fastest minutes, families
/api/v1/from/{city}.jsonEvery direct destination from one city
/api/v1/arrivals/{city}.jsonEvery 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}.jsonEvery 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.jsonEvery 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.jsonEvery 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.jsonWhen the timetables were last checked, the window the times cover, and the build date
/api/v1/sources.jsonEvery 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.