Stations
/api/trainline/stations
Find stations and cities by name
Scrappa's Trainline API returns structured JSON from Trainline, the rail and coach ticket platform for the UK and Europe. Find stations, search journeys by origin, destination, date, time and passengers, and read every fare with its class, carrier, availability and conditions. Open the stops and live status of a train, the named ticket products with refund and exchange terms, price predictions, PlusBus add-ons, a cheapest-fare calendar and the railcard catalogue. Scrappa is an independent service and is not affiliated with or endorsed by Trainline.
Try it now
Use the first endpoint in this API family with a Scrappa API key. Every account includes 500 free monthly credits, so you can validate the response shape before buying credits.
curl -X GET "https://scrappa.co/api/trainline/journeys?origin=urn:trainline:generic:loc:EUS1444gb&destination=urn:trainline:generic:loc:MAN2968gb&date=2026-11-03&time=09:00&adults=1" \
-H "Accept: application/json" \
-H "X-API-KEY: YOUR_API_KEY"
{
"success": true,
"data": {
"origin": "urn:trainline:generic:loc:EUS1444gb",
"destination": "urn:trainline:generic:loc:MAN2968gb",
"journey_type": "single",
"currency": "GBP",
"search_id": "1ab6ab81-b316-4f2e-ba21-df3055a8e3cc",
"journey_count": 3,
"journeys": [
{
"id": "785924f2-9819-4468-9ca7-eee4855546bd",
"departure_time": "2026-11-03T09:13:00+00:00",
"arrival_time": "2026-11-03T11:19:00+00:00",
"duration_minutes": 126,
"changes": 0,
"carriers": [{"code": "urn:trainline:atoc:carrier:VT", "name": "Avanti West Coast"}],
"cheapest_total_price": {"amount": 43.5, "currency": "GBP"}
}
]
},
"meta": {
"endpoint_family": "journeys",
"billable": true
}
}
Structured data for real applications. Here are some ideas.
Track the price of a route per day and per ticket product, with class, availability and conditions.
Add station search, journey results and train details to your own travel app.
Read the lowest fare for every day of a route and pick the best day to travel.
Read the stops, platforms and live status of a train for customer messages.
Compare carriers, travel times, changes and prices on UK and European corridors.
Trainline scraper API
The Trainline API is built for fare monitoring, travel search and mobility research. Find station ids, search journeys for a date and passengers, then open one journey for its stops, its ticket products and its price tiers.
Find station ids by name and pass them as origin and destination.
Read legs, platforms, carriers, changes and duration of each journey.
Compare fares per travel class with availability and conditions.
Read the cheapest fare of every day for a route.
Search UK rail, European rail and coach journeys with GBP or EUR prices.
Search a station or city by name and take the id of the result. Pass it as origin or destination to the journey endpoints.
Open Trainline Stations API docsSearch a route for a date, a time and passengers. Each journey lists its legs and every offer with class, availability, conditions and price.
Open Trainline Journeys API docsRead the cheapest one-way fare for each day of a window, then search the best day for the full list of journeys.
Open Trainline Fare Calendar API docsEverything you need in one API.
/api/trainline/stations
Find stations and cities by name
/api/trainline/stations/nearby
List stations used together with a station
/api/trainline/journeys
Search journeys with fares per class and carrier
/api/trainline/journeys/page
Read the next or previous page of a search
/api/trainline/journeys/return
Read the way back of a continental search
/api/trainline/journeys/calling-points
Read stops, platforms and live status of a leg
/api/trainline/journeys/ticket-options
Read ticket products with refund and exchange terms
/api/trainline/journeys/price-prediction
Read the advance fare tiers of a journey
/api/trainline/journeys/local-transport
Read PlusBus and travelcard add-ons
/api/trainline/fares/calendar
Read the cheapest fare for each day
/api/trainline/fares/calendar/times
Read the cheapest fare and departures for each day
/api/trainline/fares/calendar/return
Read the return leg fare for each outward and return day pair
/api/trainline/fares/best
Read the lowest fares on popular routes
/api/trainline/cards
List the UK railcards
/api/trainline/cards/discounts
List discount cards of European carriers
See how Scrappa compares to the official API.
| Feature | Scrappa | ScrapingBee / ScraperAPI |
|---|---|---|
| Trainline journey data as JSON | Build your own parser | |
| Fares per class with conditions | ||
| Cheapest-fare calendar | ||
| Price per 1k requests | From $0.20 | Varies by credits per request |
| Unified API key | Yes (80+ APIs) | Scraping only |
| Free tier | 500 credits/month | Trial credits |
No. Scrappa is an independent service and is not affiliated with or endorsed by Trainline. The Trainline API returns structured JSON from public Trainline pages. It does not book tickets and needs no Trainline account.
Every Scrappa account includes 500 free credits each month. After that, each request costs one credit, which works out to $0.20 to $0.50 per 1,000 requests depending on your plan.
No. Only successful answers with data are billed. An upstream failure, an unknown id and an empty list are not billed.
No. total_price is the price for all passengers of the search. per_passenger_price on each fare is the price of one passenger.
The booking horizon is about 178 days. Searches and calendars beyond it answer a validation error.