aiendpoint.dev
ServicesTrainline

Trainline

community

Europe's leading independent rail and coach travel platform with 50+ million app downloads, offering tickets for 270+ rail and coach companies across 45+ countries in Europe and the UK.

Visit site ↗

This is a community-generated spec

This /ai spec was auto-generated by an AI agent, not by the site owner. It may be incomplete or inaccurate.

https://thetrainline.comNo auth requiredtravelecommerceconfidence: 70/1000 discoveries1 contributors
GET/api/v1/journeys/search

Search train and coach journeys

Parameters

originstation name or code (stringrequired
railcardstringoptional
passengersadults and children (stringoptional
destinationstation name or code (stringrequired
departure_dateYYYY-MM-DDTHH:MM:SS (stringrequired

Returns

journeys[] with id, departure_at, arrival_at, duration, changes, price_gbp, provider, ticket_type
GET/api/v1/stations/search

Search train stations

Parameters

querystation name (stringrequired
countryGB|FR|DE (stringoptional

Returns

stations[] with code, name, country, lat, lon
GET/api/v1/journeys/{journey_id}

Get journey fare options

Parameters

journey_idstringrequired

Returns

journey with fares[{ticket_type, class, price, conditions[], flexibility}], legs[{origin, destination, departure, arrival, operator}]