---
title: "Get nearby departures"
method: GET
path: "/departures"
---

# Get nearby departures

`GET /departures`

## Request

- Base URL: `https://api.abfahrt.now`
- URL: `https://api.abfahrt.now/departures`
- Auth: one of:
  - API key in header `x-api-key`
  - API key in query parameter `api_key`
- TypeScript: <https://skmtc.dev/abfahrt/apis/abfahrt-european-transit-api/docs/departures/get.ts> (a function with typed inputs; its response is checked against the schema)

Returns real-time departures from transit stops near the given coordinates.
Automatically detects the region and queries the appropriate transit provider(s).

## Query parameters

- `lat` number, double, required
- `lon` number, double, required
- `radius` integer
- `limit` integer
- `mode` string
- `from` integer
- `to` integer
- `dedup` 'nearest' | 'off'
- `stops` string
- `alerts` 1

## Response `200`

Successful response with departures

- DepartureResponse
  - `region` string, required: Detected transit region
  - `city` string: City name derived from region. Absent for country-level fallback regions (e.g. "Portugal"), where no single city applies.
  - `realtime` boolean, required: Whether departures include real-time delay data
  - `routing` boolean, required: Whether trip planning is available in this region
  - `departures` Departure[], required
    - `line` string, required: Line name/number
    - `direction` string, required: Destination/headsign
    - `time` string, required: Human-readable departure time. Relative ("3 min", "Now") for imminent departures, absolute HH:MM in the region's timezone further out.
    - `timestamp` integer, required: Departure time as Unix timestamp (milliseconds)
    - `stop` string, required: Stop/station name
    - `platform` string: Platform or track number (if available)
    - `delay` integer, required: Delay in minutes (0 = on time, negative = early)
    - `cancelled` boolean, required: Whether this departure is cancelled
    - `occupancy` string: Occupancy level (if available)
    - `mode` 'subway' | 'suburban' | 'tram' | 'bus' | 'ferry' | 'regional' | 'express': Transport mode
    - `color` string: Line colour as a hex triplet. Resolved from the operator's own GTFS colours where published, otherwise from a mode palette. Intended for rendering the line badge.
    - `alerts` string[]: Only with alerts=1. Ids of entries in `disruptions` that affect this departure.
  - `stations` Station[]
    - `id` string, required: Station ID (provider-specific)
    - `name` string, required: Station name
    - `distance` integer, required: Distance from query coordinates in meters
    - `walkSeconds` integer, required: Estimated walking time from the query coordinates, in seconds
    - `lat` number, double: Station latitude
    - `lon` number, double: Station longitude
  - `regionBounds` Bounds
    - `north` number, double, required
    - `south` number, double, required
    - `east` number, double, required
    - `west` number, double, required
  - `routingBounds` Bounds[]: Areas reachable by trip planning from this location (the region itself plus long-distance routing coverage). Present when the query location lies inside routing coverage. Clients should constrain routing destination search to these boxes and fall back to regionBounds when the field is absent.
    - `north` number, double, required
    - `south` number, double, required
    - `east` number, double, required
    - `west` number, double, required
  - `attribution` string: Required attribution for the data source
  - `timeTravelSupported` boolean: Whether departures for a future time can be requested here. Predictive per region; on an actual time-travel request it reports whether every contributing source really honoured the requested time.
  - `timeTravelHorizonMinutes` integer: How far ahead time travel reaches in this region, in minutes. Absent when the region has no fixed horizon.
  - `radiusUsed` integer: Present only when the effective search radius differs from the requested one, because nothing was found nearby and the search was widened automatically.
  - `forTime` string, date-time: Echo of the requested departure time. Present only on time-travel requests.
  - `disruptions` Disruption[]: Only present with alerts=1. Disruptions referenced by the departures' `alerts` ids.
    - `id` string, required: Stable id, unique within the response
    - `severity` 'info' | 'warning' | 'severe', required
    - `effect` 'cancellation' | 'delay' | 'detour' | 'stop_moved' | 'replacement_service' | 'accessibility' | 'other'
    - `title` string, required
    - `description` string
    - `lines` string[]: Affected line labels, when the source names them
    - `stopNames` string[]
    - `mode` 'subway' | 'suburban' | 'tram' | 'bus' | 'ferry' | 'regional' | 'express'
    - `validFrom` integer: Start of validity, epoch milliseconds
    - `validTo` integer: End of validity, epoch milliseconds
    - `url` string: Link to the operator's notice, when provided
    - `source` string, required: Data source identifier
    - `attribution` string: Licence credit for this disruption; display it alongside the notice

## Other responses

- `400`: Missing or invalid parameters
- `401`: Missing or invalid API key
- `429`: Rate limit exceeded

## Changes

- **2026-10-24** `e91a2a3f0979`: 3 info
  - added the new optional `query` request parameter `alerts`
  - added the optional property `departures/items/alerts` to the response with the `200` status
  - added the optional property `disruptions` to the response with the `200` status

[Operation history](https://skmtc.dev/abfahrt/apis/abfahrt-european-transit-api/changes/departures/get.md)

---

[API](https://skmtc.dev/abfahrt/apis/abfahrt-european-transit-api.md) - [All operations](https://skmtc.dev/abfahrt/apis/abfahrt-european-transit-api/llms.txt) - [OpenAPI document](https://skmtc.dev/abfahrt/apis/abfahrt-european-transit-api/revisions/e91a2a3f0979?raw)
