Documentation menu
Transit
GET/v1/transit/departures
Access and price
| Auth | An API key, as Authorization: Bearer snk_… or ?api_key=snk_…. Metered. A browser (maps) key may call it. |
|---|---|
| Price | 1 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
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| stop | query | string | yes | Required. The stop's NaPTAN ATCO code, as /v1/transit/stops returns it |
| at | query | string | no | Start of the window, RFC 3339 (default now). Must fall inside the three service days the index holds |
| window_minutes | query | integer | no | Window length, 1 to 180 minutes (default 60) Limits: at least 0. |
| limit | query | integer | no | Most 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| Field | Type | Required | Description |
|---|---|---|---|
| attribution | string | yes | NaPTAN and BODS attribution (both OGL v3.0). |
| basis | string | yes | Always timetable. |
| coverage | string | yes | What this covers and what it does not. |
| departures | TransitDeparture[] | yes | In timetable order. |
| generated_at | string | yes | When this answer was assembled (RFC 3339). |
| label | string | yes | The honesty line, verbatim. Show it with the departures. |
| stop | TransitStop | yes | |
| timetable_date | string | yes | The 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"
}400
stop 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 billedapplication/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 keyapplication/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+jsonapplication/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 billedapplication/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