๐Ÿ›ค๏ธ Soton Crossings

data API

Data API

A free, read-only JSON feed of live level-crossing status for Southampton โ€” currently Mount Pleasant Road, St Denys. Derived from open Network Rail signalling data. No key, no sign-up. CORS is open (Access-Control-Allow-Origin: *), so you can call it from a browser.

Base URL: https://sotoncrossings.co.uk

Not official, not safety-critical. This is an independent best-guess derived from signalling โ€” it can be wrong, delayed, or unavailable, and is not affiliated with Network Rail. Don't use it to decide whether it's safe to cross, and don't present it as authoritative. See the attribution note below.

The endpoint

There's one endpoint. Poll it โ€” every 10โ€“30s is plenty (it's safe to cache for a few seconds). Please don't poll faster than ~10s.

GET /api/state

The whole current picture in one JSON document. Key fields:

fieldmeaning
crossing.id / name / placewhich crossing this is (see filter below)
crossing.downboolean โ€” are the barriers currently down
crossing.downSincems-epoch the protecting route was set (null if up)
crossing.directions / routeswhich moves are protected right now
forecast.nextDownInSecseconds until we expect the next closure (null if none imminent)
timetable.windows[]upcoming closures: downAt/clearAt (ms-epoch), directions, running (live train count)
closures[]recent actual closures with durationSec
stats.connectedboolean โ€” are we currently connected to the feed
curl https://sotoncrossings.co.uk/api/state

# is it down right now?
curl -s https://sotoncrossings.co.uk/api/state | jq '.crossing.down'

Filtering by crossing

We cover one crossing today, but more may be added. To stay future-proof, read crossing.id from the response, and optionally pin it with ?crossing=<id>:

GET /api/state?crossing=mount-pleasant-road

An unknown id returns 404 with the list of valid ids, so your integration won't silently read the wrong crossing if the set changes. Omit the parameter to get the default (currently the only) crossing.

To enumerate the available crossings, there's a small static list:

GET /api/crossings
โ†’ { "crossings": [ { "id": "mount-pleasant-road", "name": "Mount Pleasant Road", "place": "St Denys, Southampton" } ] }

Fair use

Attribution & licence

If you use this data, please credit Soton Crossings and include this notice:

Contains information of Network Rail Infrastructure Limited licensed under the Open Government Licence v3.0.

The forecasts and derived status are our own work, provided as-is with no warranty. Soton Crossings is independent and not affiliated with Network Rail.


Questions or building something? [email protected] ยท Privacy ยท Terms