Trainline Scraper — European Train Routes & Prices avatar

Trainline Scraper — European Train Routes & Prices

Pricing

Pay per event

Go to Apify Store
Trainline Scraper — European Train Routes & Prices

Trainline Scraper — European Train Routes & Prices

Scrape train routes, schedules, operators, and prices from Trainline (thetrainline.com). Covers European rail travel across 40+ countries.

Pricing

Pay per event

Rating

0.0

(0)

Developer

Studio Amba

Studio Amba

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

13 hours ago

Last modified

Categories

Share

Trainline Scraper

Scrapes train timetable and route information from Trainline (thetrainline.com). Returns departure/arrival times, duration, price, operator, and number of changes for European rail routes.

Input

FieldTypeDescription
startUrlsArrayTrain times page URLs, e.g. https://www.thetrainline.com/en/train-times/london-to-paris
maxResultsIntegerMax routes to return (default: 100)
proxyConfigurationObjectProxy settings

Default: scrapes London to Paris route.

Output

{
"origin": "London",
"destination": "Paris",
"departureTime": "07:01",
"arrivalTime": "10:17",
"duration": "2h 16m",
"price": 49.00,
"currency": "EUR",
"operator": "Eurostar",
"changes": 0,
"url": "https://www.thetrainline.com/en/train-times/london-to-paris",
"scrapedAt": "2026-03-16T10:00:00.000Z"
}

Data sources

The scraper tries three extraction strategies in order:

  1. JSON-LD ItemList with TrainTrip items
  2. HTML timetable rows (departure time, arrival time, duration columns)
  3. Embedded __NEXT_DATA__ JSON with journey objects

It also discovers links to related routes on the page and can follow them.

Limitations

  • Trainline's results pages are heavily JavaScript-rendered. The HTTP scraper captures the static timetable data from /train-times/ pages, but real-time search results may require a browser-based approach.
  • Route names are parsed from the URL slug (e.g. /london-to-paris).