Skip to content
Documentation menu
docs / api / get-v1-transit-departures
Transit

GET/v1/transit/departures

Access and price

AuthAn API key, as Authorization: Bearer snk_… or ?api_key=snk_…. Metered. A browser (maps) key may call it.
Price1 call per request. Class: standard. Published as unit_rules.default in /pricing.json.

What it does

GET /v1/transit/departures?stop=<ATCO>[&at=][&window_minutes=60][&limit=8].

Call it

bash
curl -fsS -X GET "https://api.mapmap.ai/v1/transit/departures?stop=…" \
  -H "Authorization: Bearer $MAPMAP_KEY"

Parameters

NameInTypeRequiredDescription
stopquerystringyesRequired. The stop's NaPTAN ATCO code, as /v1/transit/stops returns it
atquerystringnoStart of the window, RFC 3339 (default now). Must fall inside the three service days the index holds
window_minutesqueryintegernoWindow length, 1 to 180 minutes (default 60) Limits: at least 0.
limitqueryintegernoMost departures to return, 1 to 30 (default 8) Limits: at least 0.

Responses

200Timetabled departures from BODS timetables, in order, each with its line, destination, operator, scheduled_at and a live vehicle on that line seen heading towards the stop (or null). basis is always timetable and label says what a live entry is: an observation, never an arrival prediction
FieldTypeRequiredDescription
attributionstringyesNaPTAN and BODS attribution (both OGL v3.0).
basisstringyesAlways timetable.
coveragestringyesWhat this covers and what it does not.
departuresTransitDeparture[]yesIn timetable order.
generated_atstringyesWhen this answer was assembled (RFC 3339).
labelstringyesThe honesty line, verbatim. Show it with the departures.
stopTransitStopyes
timetable_datestringyesThe service date the requested time falls on, YYYY-MM-DD.

Example: A response assembled from this schema's own field examples, enums, defaults and types; not a recorded call

json
{
  "attribution": "string",
  "basis": "string",
  "coverage": "string",
  "departures": [
    {
      "line": "string",
      "scheduled_at": "string",
      "trip": "string"
    }
  ],
  "generated_at": "string",
  "label": "string",
  "stop": {
    "id": "string",
    "lat": 0,
    "lines": [
      "string"
    ],
    "lon": 0,
    "name": "string"
  },
  "timetable_date": "string"
}
400stop missing or malformed, at malformed or outside the timetable window this gateway holds (the message names the window), or a malformed window_minutes or limit. Not billed

application/problem+json · Problem

401Missing or invalid API key. Also: No key, or a missing, malformed, unknown, revoked or expired one (unauthorized); the body carries signup, docs and a one-call hint for a free key

application/problem+json · Problem

402Beyond the included volume with no way to pay this call: an x402 body naming how to pay (provisional key past its allowance, prepaid balance below the price, or a rejected X-PAYMENT). Not problem+json

application/json · X402PaymentRequired

403The key may not call this: a browser key outside its scope (scope-insufficient), a request from an origin the key does not allow (origin-not-allowed), or an account restriction (forbidden)

application/problem+json · Problem

404No such stop in the index (bus and coach stops in England only). Not billed

application/problem+json · Problem

429Quota or rate limit exceeded. Also: Per-key rate limit (rate-limited, with Retry-After), or monthly quota exhausted with no payment path (quota-exceeded)

application/problem+json · Problem

501Timetable departures not enabled (SN_TRANSIT_DIR unset, or no departures index built yet). Not billed

application/problem+json · Problem

504The request did not finish within the gateway's request deadline (request-timeout)

application/problem+json · Problem

Error bodies follow the shared problem model documented on API conventions.

Also under Transit

Generated from https://api.mapmap.ai/openapi.json on 2026-11-12 · operationId get_transit_departures