nationalrail.co.uk APInationalrail.co.uk ↗
Access UK National Rail data via 6 endpoints: live departures/arrivals, station details, CRS codes, disruptions, and engineering works.
No input parameters required.
curl -X GET 'https://api.parse.bot/scraper/63073631-1d9b-4af5-b9a2-ffd95836d0bc/get_stations' \ -H 'X-API-Key: $PARSE_API_KEY'
Retrieve the full list of UK rail stations and their CRS codes. Returns all stations including National Rail, London Underground, and Docklands Light Railway classifications.
No input parameters required.
{
"type": "object",
"fields": {
"data": "array of station objects each containing crsCode, name, classification, and state flags",
"status": "string indicating success"
},
"sample": {
"data": [
{
"name": "London Euston",
"crsCode": "EUS",
"kbState": 2,
"ojpState": 1,
"dlrLuState": 1,
"darwinState": 4,
"classification": "LONDON"
}
],
"status": "success"
}
}About the nationalrail.co.uk API
The National Rail API exposes 6 endpoints covering live UK train departure and arrival boards, full station metadata, and real-time network disruptions. Call get_live_departures with a 3-letter CRS code to retrieve scheduled and estimated times, platform numbers, operators, and service status for any staffed station. Station endpoints return CRS codes, coordinates, accessibility details, and facility data drawn directly from the nationalrail.co.uk estate.
Station Data
get_stations returns the full list of UK rail stations as an array of objects, each with a crsCode, name, classification (National Rail, London Underground, or Docklands Light Railway), and state flags. Use search_stations with a query parameter — partial name or CRS abbreviation — to get autocomplete-style matches with coordinates. For deeper detail, get_station_details accepts a URL slug (e.g. london-euston) and returns structured data including address, location, stationOperator, stationAccessibility, ticket buying options, transport links, and platform-level facilities.
Live Departure and Arrival Boards
get_live_departures and get_live_arrivals both accept a crs parameter and return a board object with a generatedAt timestamp and a services array. Each service entry includes scheduled and estimated times, the calling destination or origin station, the operator, platform number, and a service status string. These boards reflect the same real-time data presented on nationalrail.co.uk, making them suitable for journey monitoring and alerting tools.
Disruptions and Engineering Works
get_disruptions requires no parameters and returns four top-level arrays: disruptions (active incidents), cleared_disruptions (recently resolved incidents), engineering_works (planned possessions and line closures), and service_indicators (per-operator performance summaries). This gives a network-wide picture of current and upcoming service impacts without needing to poll individual station boards.
- Display a live departure board on a travel app using
get_live_departureswith a station's CRS code - Alert commuters to delays or cancellations by polling
get_disruptionsfor active incidents - Build a station finder with autocomplete backed by
search_stationsreturning CRS codes and coordinates - Show accessibility and facility information for a station using
get_station_detailsfields likestationAccessibility - Monitor engineering works to surface weekend line closures before a user books travel
- Populate a CRS-code lookup table from
get_stationsfor use in journey planning integrations - Track per-operator service performance using
service_indicatorsfrom the disruptions endpoint
| Tier | Price | Credits/month | Rate limit |
|---|---|---|---|
| Free | $0/mo | 100 | 5 req/min |
| Hobby | $30/mo | 1,000 | 20 req/min |
| Developer | $100/mo | 5,000 | 250 req/min |
One credit = one API call regardless of which marketplace API you call. Exceeding the rate limit returns a 429 response. Authenticate with the X-API-Key header.
Does National Rail have an official developer API?+
What does `get_live_departures` actually return per service?+
services array includes the scheduled departure time, estimated departure time (or 'On time'), the destination station name, the operating company, platform number where allocated, and a status string. The board also carries a generatedAt timestamp so you know exactly how fresh the data is.Does the API cover journey planning — fare prices, ticket booking, or specific calling points?+
How current is the disruptions data from `get_disruptions`?+
cleared_disruptions array alongside active ones.Can I look up a station's CRS code if I only know part of the name?+
query parameter to search_stations. The response includes a payload with matched stations, each carrying its crsCode and coordinates. This is the same autocomplete data used by the nationalrail.co.uk search box.