Mind the Gates Crossings API
The crossings API from Mind the Gates — 6 operation(s) for crossings.
The crossings API from Mind the Gates — 6 operation(s) for crossings.
Every API here is available over the APIs.io API and to AI agents over MCP.
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
find_apisBrowse and filter every API in the catalog.get_api_artifactsOne API's artifacts, grouped by type.get_openapiThe primary OpenAPI for this API.find_similar_apisAPIs that look like this one.apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.resolveTurn a domain, URL or GitHub org into the provider it belongs to.find_cohortsEvery scored population of providers in the catalog.curl "https://apis.io/api/v1/apis/mindthegates-uk:mindthegates-uk-crossings-api"
curl "https://apis.io/api/v1/apis?limit=25"
Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.
Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.
A second provider on the same verified email joins the account you already have.
openapi: 3.2.0
info:
title: Mind the Gates public Crossings API
summary: Live status and closure forecasts for UK level crossings
description: 'Read-only, no keys. Predictions, not measurements: every time is a median estimate and users must follow the signals at the crossing. Human documentation at https://mindthegates.uk/api/docs'
version: '1'
servers:
- url: https://mindthegates.uk
tags:
- name: crossings
paths:
/api/v1/search:
get:
tags:
- crossings
summary: Ranked name search over the catalogue
description: 'Ranked crossing search for the apps'' pickers. The ordering is
search_crossings'' — the one implementation, shared with the MCP
list tool. Empty query = empty result (the pickers show nothing
until the user types).'
operationId: api_search_api_v1_search_get
parameters:
- name: q
in: query
required: false
schema:
type: string
default: ''
title: Q
responses:
'200':
description: Successful Response
content:
application/json:
schema: {}
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
/api/v1/crossings:
get:
tags:
- crossings
summary: 'The catalogue: every listed crossing'
description: 'App-facing catalog: every listed crossing as one compact JSON
document, for client-side search in the native apps'' pickers —
the same search-as-you-type experience the homepage gives, fed by
the same rows. Built once per process (CROSSINGS_LIST is baked at
import); an hour of cache is fine for a list that changes only on
catalog rebuild + deploy. All app-facing JSON lives under /api;
the .md twin stays a suffix because it''s content negotiation on
the page, not an API.'
operationId: crossings_json_api_v1_crossings_get
responses:
'200':
description: Successful Response
content:
application/json:
schema: {}
/api/v1/near:
get:
tags:
- crossings
summary: Nearest listed crossings to a point
description: 'The listed crossings nearest (lat, lon), nearest first, each a
catalogue row plus `distance_km` and `distance_miles` (straight
line). `limit` 1 to 25. 422 for a point off the globe.'
operationId: api_near_api_v1_near_get
parameters:
- name: lat
in: query
required: true
schema:
type: number
title: Lat
- name: lon
in: query
required: true
schema:
type: number
title: Lon
- name: limit
in: query
required: false
schema:
type: integer
default: 5
title: Limit
responses:
'200':
description: Successful Response
content:
application/json:
schema: {}
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
/api/v1/busiest:
get:
tags:
- crossings
summary: Today's ranking by predicted minutes closed
description: 'Today''s ranking of listed crossings by predicted minutes closed
to road traffic between 06:00 and 22:00 local, the same figures as
/atlas/busiest-level-crossings. `limit` 1 to 100. 503 until the
first build of the day has completed; retry in a minute.'
operationId: api_busiest_api_v1_busiest_get
parameters:
- name: limit
in: query
required: false
schema:
type: integer
default: 25
title: Limit
responses:
'200':
description: Successful Response
content:
application/json:
schema: {}
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
/api/v1/status:
get:
tags:
- crossings
summary: Live state of up to 50 crossings in one call
description: 'The right shape for a dashboard or a poller watching a SET of
crossings: `crossings` is a comma-separated list of word slugs (or
registry short slugs), up to 50. Each row carries the crossing''s
current `status` and its `next_closure` (the next closed band on
the forecast timeline; the one in progress while closed; null when
none is forecast), from the same render the per-crossing endpoint
does. Slugs the site does not list come back
under `unknown` rather than failing the call.
Costs ceil(n/10) of the per-address render budget, so fifty
crossings every twenty seconds is fifteen renders a minute, where
fifty per-crossing calls would be fifty and would trip the
fan-out cap. Cacheable for 20 s like the per-crossing endpoint.'
operationId: api_status_api_v1_status_get
parameters:
- name: crossings
in: query
required: false
schema:
type: string
default: ''
title: Crossings
responses:
'200':
description: Successful Response
content:
application/json:
schema: {}
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
/api/v1/crossing/{word}:
get:
tags:
- crossings
summary: 'One crossing: live state, forecast timeline, trains'
description: 'App-facing status + forecast timeline for one crossing (api: 1).
Accepts word slugs and registry short slugs alike — an API client
shouldn''t need a redirect dance to use a stored identifier.
`horizon` is how many minutes of timeline to return, clamped to
[TIME_WINDOW_MIN, API_HORIZON_MAX_MIN]: the page''s window at the
least, the forecast model''s own look-ahead at the most. The
response says what it got in `horizon_min`.'
operationId: api_crossing_api_v1_crossing__word__get
parameters:
- name: word
in: path
required: true
schema:
type: string
title: Word
- name: horizon
in: query
required: false
schema:
type: integer
default: 30
title: Horizon
responses:
'200':
description: 'Live state and forecast (api: 1)'
content:
application/json:
schema:
$ref: '#/components/schemas/Crossing'
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
components:
schemas:
ValidationError:
properties:
loc:
items:
anyOf:
- type: string
- type: integer
type: array
title: Location
msg:
type: string
title: Message
type:
type: string
title: Error Type
input:
title: Input
ctx:
type: object
title: Context
type: object
required:
- loc
- msg
- type
title: ValidationError
Crossing:
type: object
required:
- api
- slug
- name
- generated_at
- status
- timeline
properties:
api:
type: integer
const: 1
slug:
type: string
description: Word slug, as in the page URL
name:
type: string
type:
type:
- string
- 'null'
description: Crossing type in plain words
region:
type:
- string
- 'null'
description: Network Rail route or NI
source:
type: string
enum:
- nr
- nir
description: 'nr: Great Britain, live feeds can confirm. nir: Northern Ireland, timetable forecast only'
generated_at:
type: string
format: date-time
status:
type: object
required:
- state
- confirmed
- until
- marginal
properties:
state:
type: string
enum:
- open
- closed
- unknown
confirmed:
type: boolean
description: True only when signalling data proves the barriers down
confirmed_source:
type:
- string
- 'null'
enum:
- signalling
- monitor
- null
until:
type:
- string
- 'null'
format: date-time
description: Median estimate of when the state changes; show with ~
marginal:
type: boolean
description: Open, but the next closure may be starting
held_note:
type:
- string
- 'null'
timeline:
type: array
description: Forecast state windows for the next half hour, in order
items:
type: object
required:
- state
- start
- end
properties:
state:
type: string
enum:
- open
- closed
start:
type: string
format: date-time
end:
type: string
format: date-time
conditional:
type: boolean
description: Depends on a train that may not run
parked:
type: boolean
description: A train stands on the approach
marginal:
type: boolean
direction_labels:
type: object
properties:
up:
type: string
down:
type: string
direction_captions:
type: object
properties:
up:
type: string
down:
type: string
trains:
type: array
items:
type: object
properties:
at:
type: string
format: date-time
headcode:
type:
- string
- 'null'
direction:
type:
- string
- 'null'
origin:
type:
- string
- 'null'
destination:
type:
- string
- 'null'
cancelled:
type: boolean
live:
type: boolean
description: Seen in live running data
delay_sec:
type:
- integer
- 'null'
meta:
type: object
properties:
disclaimer:
type: string
disclaimer_full:
type: string
disclaimer_emphasis:
type: string
known_coverage_gap:
type:
- object
- 'null'
HTTPValidationError:
properties:
detail:
items:
$ref: '#/components/schemas/ValidationError'
type: array
title: Detail
type: object
title: HTTPValidationError