Discover/nationalrail.co.uk API
live

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.

Endpoints
6
Updated
3mo ago
Try it

No input parameters required.

api.parse.bot/scraper/63073631-1d9b-4af5-b9a2-ffd95836d0bc/<endpoint>
Ready to send
Fill in the parameters and hit sign in to send to see live response data here.
Use it in your codegrab a free API key at signup
curl -X GET 'https://api.parse.bot/scraper/63073631-1d9b-4af5-b9a2-ffd95836d0bc/get_stations' \
  -H 'X-API-Key: $PARSE_API_KEY'
All endpoints · 6 totalclick to expand

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.

Input

No input parameters required.

Response
{
  "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.

Common use cases
  • Display a live departure board on a travel app using get_live_departures with a station's CRS code
  • Alert commuters to delays or cancellations by polling get_disruptions for active incidents
  • Build a station finder with autocomplete backed by search_stations returning CRS codes and coordinates
  • Show accessibility and facility information for a station using get_station_details fields like stationAccessibility
  • Monitor engineering works to surface weekend line closures before a user books travel
  • Populate a CRS-code lookup table from get_stations for use in journey planning integrations
  • Track per-operator service performance using service_indicators from the disruptions endpoint
Pricing & limitsSee full pricing →
TierPriceCredits/monthRate limit
Free$0/mo1005 req/min
Hobby$30/mo1,00020 req/min
Developer$100/mo5,000250 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.

Frequently asked questions
Does National Rail have an official developer API?+
Yes. National Rail provides the Darwin Data Feeds service for licensed developers, available at https://www.nationalrail.co.uk/developers/. It requires registration and offers push-based STOMP feeds. This Parse API provides REST-based access without requiring a Darwin licence or feed subscription.
What does `get_live_departures` actually return per service?+
Each entry in the 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?+
Not currently. The API covers station metadata, live boards (scheduled/estimated times, platforms, operators), and network disruptions. It does not return fare prices, bookable tickets, or the full intermediate calling-point sequence for a service. You can fork this API on Parse and revise it to add an endpoint that exposes calling points or fare data.
How current is the disruptions data from `get_disruptions`?+
The endpoint reflects the disruptions and engineering works currently published on nationalrail.co.uk. There is no pagination — it returns the full current snapshot in a single call, so freshness depends on how frequently you poll it. Cleared disruptions are included in the cleared_disruptions array alongside active ones.
Can I look up a station's CRS code if I only know part of the name?+
Yes. Pass a partial name or abbreviation as the 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.
Page content last updated . Spec covers 6 endpoints from nationalrail.co.uk.
Related APIs in TravelSee all →
opentable.ca API
Search and discover restaurants on OpenTable, view detailed information like menus and reviews, and check real-time dining availability across metro areas. Find top-rated restaurants in your location and instantly see which tables are open for your preferred date and time.
fandango.com API
Search for movies and retrieve nearby theater listings with showtimes by ZIP code and date, plus showtimes for a specific movie at nearby theaters.
data.lime.bike API
Access real-time availability data for Lime bikes and scooters, including station locations, vehicle status, system alerts, and geofencing zones across multiple cities. Monitor micromobility inventory and service information to find nearby vehicles or plan your trips effectively.
turo.com API
Search for peer-to-peer car rentals across Turo by location and dates to browse available vehicles with pricing, specifications, and real-time availability. Get detailed information on specific cars to compare features and make rental decisions.
reservation.pc.gc.ca API
Access real-time campground availability and reservation data from the Parks Canada booking system. Search locations, retrieve available campsites and cabins, filter by equipment type, and review operating date schedules across the national park network. Includes detailed resource metadata and map-based availability overviews.
bahn.com API
Search German train schedules and stations, find connections between destinations, and compare ticket prices across Deutsche Bahn routes. Get real-time station information and transit association details to plan your train journey efficiently.
united.com API
Search United Airlines flights, check real-time flight status, and view detailed seat maps to plan your perfect trip. Compare fare options and use airport autocomplete to quickly find your departure and arrival cities.
thetrainline.com API
Search UK train stations and find the cheapest fares across date ranges, then generate direct booking links to complete your purchase on Trainline.com. Get real-time journey information to compare prices and book your tickets in seconds.
National Rail API – Live Trains & Station Data · Parse