1 credit per call14 endpoints
Trainline API
Get Trainline data as JSON with one API key: cards, cards discounts, fares best, fares calendar. 1,000 free credits a month.
Trainline
GET/v1/trainline/cards
curl "https://api.perceptlayer.com/v1/trainline/cards" \
-H "X-API-Key: $API_KEY"cURL1 credit per successful call
Run this call below or from your dashboard to see a live response.
Playground
Run this API
curl "https://api.perceptlayer.com/v1/trainline/cards" \
-H "X-API-Key: $API_KEY"Trainline · 14 endpoints
Endpoints
Every endpoint takes the same key. Open one for its parameters and an example request.
| Endpoint | Required parameters | Cost |
|---|---|---|
GET/v1/trainline/cards | none | 1 credit |
GET/v1/trainline/cards-discounts | none | 1 credit |
GET/v1/trainline/fares-best | none | 1 credit |
GET/v1/trainline/fares-calendar | origindestinationdate_fromdate_to+1 optional | 1 credit |
GET/v1/trainline/fares-calendar-times | origindestinationdate_fromdate_to+1 optional | 1 credit |
GET/v1/trainline/journeys | origindestinationdate+9 optional | 1 credit |
GET/v1/trainline/journeys-calling-points | timetable_idcarrierdeparture_timeorigindestination | 1 credit |
GET/v1/trainline/journeys-local-transport | search_id+2 optional | 1 credit |
GET/v1/trainline/journeys-page | search_id+4 optional | 1 credit |
GET/v1/trainline/journeys-price-prediction | search_idjourney_id+1 optional | 1 credit |
GET/v1/trainline/journeys-return | search_idjourney_id+3 optional | 1 credit |
GET/v1/trainline/journeys-ticket-options | search_idoutward_journey_id+2 optional | 1 credit |
GET/v1/trainline/stations | query+2 optional | 1 credit |
GET/v1/trainline/stations-nearby | station_id+2 optional | 1 credit |
Overview
About the Trainline API
Get Trainline data as JSON with one API key: cards, cards discounts, fares best, fares calendar. 1,000 free credits a month.
TravelJSONRESTMCP
More travel APIs
Try the Trainline API with 1,000 free credits
No credit card. Failed calls are never billed.