UK National Rail Scraper — Live Train Times, Boards & Delays avatar

UK National Rail Scraper — Live Train Times, Boards & Delays

Pricing

Pay per event

Go to Apify Store
UK National Rail Scraper — Live Train Times, Boards & Delays

UK National Rail Scraper — Live Train Times, Boards & Delays

Scrape live UK rail data from National Rail: departure and arrival boards by station, real-time delays, cancellations, platforms, and operator info. Covers GWR, LNER, Avanti, Southern, Thameslink, ScotRail, TfW, Elizabeth line, CrossCountry, Northern, and more.

Pricing

Pay per event

Rating

0.0

(0)

Developer

BowTiedRaccoon

BowTiedRaccoon

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

7 days ago

Last modified

Share

National Rail UK Live Train Board Scraper

Scrape live departure and arrival boards from nationalrail.co.uk. Returns real-time service data — operator, scheduled and actual times, delays, platform assignments, cancellation reasons, and crowding levels — for any UK station by CRS code.

Every UK train operator is covered. GWR, LNER, Avanti West Coast, ScotRail, Southern, Thameslink, Transport for Wales, CrossCountry, Northern, the Elizabeth line — if it runs through a UK station, it appears here.

National Rail UK Scraper Features

  • Extracts live departure and arrival boards by station CRS code (3-letter identifier)
  • Returns real-time delay data — scheduled vs. estimated vs. actual times, delay in minutes
  • Captures cancellation reasons — not just the flag, but the text description when available
  • Covers all UK operators — 20+ train operating companies in a single run
  • Includes platform assignments when announced
  • Returns crowding level per service (Unknown, Level1, Level2, Level3)
  • Supports multiple stations in one run — pass a list of CRS codes, get boards for all of them
  • Pure HTML scraping — no browser required, no JavaScript execution overhead

What Can You Do With UK National Rail Data?

  • Travel app developers — build live board displays, delay notifications, or journey planners on top of real-time NRE data
  • Data researchers — track cancellation rates, delay patterns, and operator performance over time
  • MaaS platforms — integrate UK rail data into multi-modal journey planning
  • Capacity planners — monitor loading levels (crowding indicators) across routes
  • Journalists and analysts — pull operator-level delay and cancellation data for reporting

How It Works

  1. Configure your stations. Provide one or more 3-letter CRS codes — the standard identifier for every UK rail station. King's Cross is KGX, Edinburgh Waverley is EDB, Manchester Piccadilly is MAN.
  2. Choose a board mode. Departure board shows next trains leaving from each station. Arrival board shows incoming services.
  3. Run it. The scraper fetches each station's live board from nationalrail.co.uk and parses the SSR-embedded service data. No waiting on JavaScript rendering.
  4. Get structured JSON. Each service is a flat record with all timing fields, operator info, status, and platform — ready to pipe into a database, dashboard, or API.

National Rail UK Scraper Input

{
"mode": "departure_board",
"stations": ["KGX", "EDB", "MAN"],
"maxItems": 30,
"proxyConfiguration": {
"useApifyProxy": true,
"apifyProxyGroups": ["RESIDENTIAL"],
"countryCode": "GB"
}
}
FieldTypeDefaultDescription
modestringdeparture_boarddeparture_board or arrival_board
stationsarray["KGX", "EDB"]List of 3-letter CRS station codes
maxItemsinteger10Maximum total records to return across all stations
proxyConfigurationobjectUK ResidentialProxy settings — UK residential recommended

Finding CRS codes: Every UK station has a 3-letter CRS code. National Rail publishes the full list at nationalrail.co.uk/stations. Common examples: LDN (London Victoria), EUS (London Euston), BHM (Birmingham New Street), GLC (Glasgow Central), LVP (Liverpool Lime Street).

National Rail UK Scraper Output Fields

Each service record looks like this:

{
"station_name": "London Kings Cross",
"station_crs": "KGX",
"board_type": "departures",
"rid": "202605116741058",
"train_uid": "C41058",
"operator": "London North Eastern Railway",
"operator_code": "GR",
"origin_station": "London Kings Cross",
"origin_crs": "KGX",
"destination_station": "Edinburgh",
"destination_crs": "EDB",
"scheduled_departure": "2026-05-11T09:30:00+01:00",
"estimated_departure": null,
"actual_departure": "2026-05-11T09:29:46+01:00",
"scheduled_arrival": "2026-05-11T13:38:00+01:00",
"estimated_arrival": "2026-05-11T13:38:00+01:00",
"actual_arrival": null,
"delay_minutes": 0,
"platform": "8",
"status": "OnTime",
"cancelled": false,
"cancellation_reason": null,
"stops_count": 3,
"service_category": "ExpressPassengerTrain",
"loading_level": "Unknown",
"scraped_at": "2026-05-11T08:31:00.000Z"
}
FieldTypeDescription
station_namestringName of the queried station
station_crsstring3-letter CRS code of the queried station
board_typestringdepartures or arrivals
ridstringRun ID — unique service identifier for this running
train_uidstringTrain UID (timetable identifier)
operatorstringTrain operating company name
operator_codestring2-letter TOC code (GR, GW, SR, etc.)
origin_stationstringOrigin station name
origin_crsstringOrigin station CRS code
destination_stationstringDestination station name
destination_crsstringDestination station CRS code
scheduled_departurestringScheduled departure (ISO 8601)
estimated_departurestringReal-time estimated departure, null if unavailable
actual_departurestringActual departure time, null if not yet departed
scheduled_arrivalstringScheduled arrival at destination (ISO 8601)
estimated_arrivalstringReal-time estimated arrival, null if unavailable
actual_arrivalstringActual arrival time, null if not yet arrived
delay_minutesnumberDelay in minutes (positive = late), null if no real-time data
platformstringPlatform number or letter, null if not yet announced
statusstringOnTime, Late, Cancelled, Arrived, or Departed
cancelledbooleanTrue if the service is cancelled
cancellation_reasonstringReason text when cancelled, null otherwise
stops_countnumberNumber of intermediate stops
service_categorystringExpressPassengerTrain or PassengerTrain
loading_levelstringCrowding: Unknown, Level1 (quiet), Level2 (busy), Level3 (very busy)
scraped_atstringISO 8601 timestamp when this record was collected

🔍 FAQ

How do I scrape UK train departure boards?

National Rail UK Scraper takes a list of CRS station codes and fetches the live departure or arrival board for each one. Pass stations: ["KGX"] and mode: "departure_board" to get the next departures from London King's Cross. The result is structured JSON — no screen-scraping glue required.

How much does National Rail UK Scraper cost?

The actor charges $0.10 per run start plus $0.0015 per service record returned. A run fetching 20 records from two stations costs roughly $0.13.

Does National Rail UK Scraper need proxies?

Yes. UK residential proxy is required for reliable results from nationalrail.co.uk. The default proxy configuration (RESIDENTIAL, country GB) is pre-filled — leave it as-is unless you're testing at low volume.

What is a CRS code?

CRS stands for Computer Reservation System — it's the 3-letter station identifier used across UK rail. Every station in the National Rail network has one. King's Cross is KGX, Edinburgh Waverley is EDB, Manchester Piccadilly is MAN, Birmingham New Street is BHM. National Rail publishes the full list on their website.

Can I get historical timetable data?

National Rail UK Scraper returns live board data — the next ~10 services from each station at the time of the run. It doesn't cover historical schedules or full 24-hour timetables. For historical data, the OpenTrainTimes API or the Darwin/LDBWS feeds (commercial licensing required) are the appropriate sources.


Need More Features?

Need custom filters, additional stations, or a different data source? File an issue or get in touch.

Why Use National Rail UK Scraper?

  • Zero competition — first UK rail live board scraper on Apify, which covers the entire national network through a single source
  • Clean output — flat JSON records with consistent field names, ISO 8601 timestamps, and explicit null fields so your pipeline doesn't guess
  • All operators — every UK TOC in one place: LNER, GWR, Avanti, ScotRail, TfW, CrossCountry, Northern, Southern, Southeastern, and more