Mind the Gates API

The level crossing API:
live status for every UK crossing.

Open or closed right now, the next half hour of closures, and the trains behind them, for every listed level crossing in Great Britain and Northern Ireland, as machine-readable JSON. One GET, no keys, free to start.

Read the docs See it live Talk to us
1,655 crossings, Great Britain and Northern Ireland Refreshed every 20 seconds Confirmed by live signalling where the railway publishes it Machine-readable: JSON, OpenAPI, CORS

The level crossing status API, running right now

Fetching /api/v1/crossing/thatcham from this page.
Thatcham
Loading
Show the JSON this came from
...

Rendered by a few lines of JavaScript on this page from the live response. Every time is a median estimate, which is why it has a ~. "Near me" asks your browser for a location; it is used once, here, and not sent anywhere else.

A handful of crossings on a map, live

Fetching the crossings nearest the map centre, then each one's status.
Open Closed May be open No forecast Hover a crossing for its next train. Click for its page.

Two calls: /api/v1/near for the eight crossings nearest the map centre, then /api/v1/crossing/{slug} for each. The next train comes from the trains list in that response, with its live delay. Drag the map anywhere in the UK and load again. Statuses refresh every 30 seconds while you watch.

What the level crossing API gives you

The state, now

Open, closed, or unknown, with an estimate of when it changes. Where the railway's own signalling data proves the barriers are down, the response says so and names the source.

"status": {
  "state": "closed",
  "confirmed": true,
  "confirmed_source": "signalling",
  "until": "2026-10-09T09:31:00+01:00"
}

The next half hour

A timeline of forecast open and closed windows with timestamps, so your app can show what is coming and update offline between fetches. Flags say when a closure is conditional or already starting.

"timeline": [
  {"state": "open",
   "start": "…T09:12", "end": "…T09:25"},
  {"state": "closed",
   "start": "…T09:25", "end": "…T09:31",
   "conditional": false}
]

The trains behind it

Each closure's train: headcode, where it is from and going, which way it crosses, and its live delay. Late trains move the forecast with them.

"trains": [
  {"at": "…T09:20", "headcode": "1K42",
   "origin": "Bedwyn",
   "destination": "London Paddington",
   "direction": "up", "live": true,
   "delay_sec": 60}
]

Every crossing

The full catalogue with coordinates, a ranked name search, the nearest crossings to any point, and today's busiest crossings by predicted time closed.

GET /api/v1/crossings
GET /api/v1/search?q=thatcham
GET /api/v1/near?lat=51.39&lon=-1.24
GET /api/v1/busiest

Who builds on live level crossing status

Sat-nav and routing

Warn a driver a barrier is about to drop, or route round a crossing that closes forty times a day.

Fleets and deliveries

Better arrival estimates on routes that cross the railway, and fewer drivers idling at a known closure.

Councils and communities

How long a crossing is really closed each day, as a number you can put in front of a meeting.

Dashboards and widgets

A home screen, a smart display, a sign in a shop window: one fetch every twenty seconds is all it takes.

Researchers and journalists

Live data by the crossing, and the Railway Atlas datasets beside it for the history.

AI agents

An MCP server with the same facts as tools, and a markdown twin of every crossing page. No scraping needed.

How it works

  1. Find the crossing. Search by name, pick from the catalogue, or ask for the nearest to a point.
    GET https://mindthegates.uk/api/v1/near?lat=51.39&lon=-1.24
  2. Fetch its status. One GET, JSON back, with cache headers that tell you when to ask again.
    GET https://mindthegates.uk/api/v1/crossing/thatcham
  3. Show it honestly. Put a ~ on every time, show the safety line the response carries, and link back to the crossing's page. The docs explain each field.

Where the level crossing data comes from

Great Britain runs on Network Rail's open data: the national timetable, the live train movement feed, and the signalling feeds that let us confirm a closure as it happens at the crossings that publish them. Northern Ireland runs on Translink's published timetable and live departure boards. The forecasts are ours, built from how long each kind of crossing stays closed for each kind of train, and corrected by live running. The site has served them to the public since May 2026 with very little downtime, and the apps and widgets are built on exactly this API.

Predictions, not measurements. Every closure time is a median estimate and every end time is uncertain. Anything you build on this must tell its users to always follow the signals and barriers at the crossing. Never use the API to decide whether a crossing is safe to use.

Plans

Free

No keys, no sign-up, no card.

  • Every endpoint, every crossing
  • 120 status fetches a minute per client, cache hits free
  • Rate-limit headers on every response, so you never hit the limit by surprise
  • Credit Mind the Gates and link to the crossing's page
  • Personal, community and non-commercial projects
Start building

Commercial

Tell us what you are building and we will agree terms that fit.

  • Higher limits for your traffic
  • A licence for commercial use
  • A conversation about uptime before you depend on it: there is no SLA, but the site has run since May 2026 with very little downtime
  • Help with the data: what it can and cannot tell you
Talk to us

Questions people ask

Is there an API for UK level crossing status?

Yes, this one. It returns whether a level crossing is open or closed right now, when that is expected to change, and the forecast closures for the next half hour, for every listed crossing in Great Britain and Northern Ireland.

Is the level crossing API free?

Yes for personal, community and non-commercial use, with no keys or sign-up. Commercial use, or traffic above the published limits, needs a conversation first.

Where does the data come from?

Network Rail's open data feeds for Great Britain (the national timetable, live train movements and signalling) and Translink's timetable and departure boards for Northern Ireland. The closure forecasts are Mind the Gates' own.

How accurate are the closure times?

They are median estimates built from the timetable and live running, and the API says when a closure is confirmed by signalling data rather than forecast. A closure can start earlier or end later than shown, so every time should be displayed with a ~ and users told to obey the lights and barriers at the crossing.

Which crossings are covered?

Every active public-road crossing with barriers or lights that can be matched to a train route: 1,655 at the moment, across England, Scotland, Wales and Northern Ireland. The catalogue endpoint lists them all with coordinates.

Also for agents

An MCP server at /mcp exposes search, status, nearest and busiest as tools, and every crossing page has a markdown twin at /crossing/{slug}.md. Discovery is at /.well-known/api-catalog, and the house rules at /auth.md.

Read the docs OpenAPI description