---
title: "`GET /v1/transit/departures?stop=<ATCO>[&at=][&window_minutes=60][&limit=8]`."
method: GET
path: "/v1/transit/departures"
tags: ["transit"]
---

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

`GET /v1/transit/departures`

## Request

- Base URL: `https://api.mapmap.ai`
- URL: `https://api.mapmap.ai/v1/transit/departures`
- Auth: one of:
  - HTTP bearer
  - API key in query parameter `api_key`

## Query parameters

- `stop` string, required
- `at` string
- `window_minutes` integer
- `limit` integer

## Response `200`

Timetabled 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

- TransitDeparturesResponse: `GET /v1/transit/departures` answer.
  - `attribution` string, required: NaPTAN and BODS attribution (both OGL v3.0).
  - `basis` string, required: Always `timetable`.
  - `coverage` string, required: What this covers and what it does not.
  - `departures` TransitDeparture[], required: In timetable order.
    - `destination` string, nullable: The headsign the timetable gives, or `null`.
    - `line` string, required: The line name, e.g. `15`.
    - `live` TransitLive: A vehicle observed on the departure's line, heading towards the stop.
      - `age_s` integer, nullable: Age of the vehicle's position fix, seconds.
      - `distance_m` integer, required: Straight-line distance from the vehicle to the stop, metres.
      - `vehicle` string, required: The operator's vehicle reference.
    - `operator` string, nullable: National Operator Code, e.g. `TFLO`.
    - `scheduled_at` string, required: The timetabled departure, RFC 3339 in the timetable's local time.
    - `trip` string, required: The GTFS trip id.
  - `generated_at` string, required: When this answer was assembled (RFC 3339).
  - `label` string, required: The honesty line, verbatim. Show it with the departures.
  - `stop` TransitStop, required: One stop.
    - `bearing_deg` integer, nullable: Bearing from the queried point to the stop, degrees clockwise from true north (stops search only).
    - `distance_m` integer, nullable: Distance from the queried point, metres (stops search only).
    - `id` string, required: The NaPTAN ATCO code, e.g. `490008660N`. Pass it to `/v1/transit/departures?stop=`.
    - `indicator` string, nullable: The on-street indicator, e.g. `Stop S`, or `null`.
    - `lat` number, double, required
    - `lines` string[], required: Line names the timetable has calling here, e.g. `["9","15","23"]`.
    - `locality` string, nullable: The NaPTAN locality, or `null`.
    - `lon` number, double, required
    - `name` string, required: The stop's common name.
  - `timetable_date` string, required: The service date the requested time falls on, `YYYY-MM-DD`.

## Other responses

- `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 billed
- `401`: Missing or invalid API key
- `404`: No such stop in the index (bus and coach stops in England only). Not billed
- `429`: Quota or rate limit exceeded
- `501`: Timetable departures not enabled (`SN_TRANSIT_DIR` unset, or no departures index built yet). Not billed

---

[API](https://skmtc.dev/mapmap/apis/sn-gateway.md) · [All operations](https://skmtc.dev/mapmap/apis/sn-gateway/llms.txt) · [OpenAPI document](https://skmtc.dev/mapmap/apis/sn-gateway/revisions/2293be8b4c38?raw)
