Get nearby departures

Changed on

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

get/departures

Request

Query parameters

latnumber double required
Example:52.5206

Latitude (WGS84)

lonnumber double required
Example:13.3862

Longitude (WGS84)

radiusinteger

Search radius in meters

limitinteger

Maximum number of departures to return

modestring

Filter by transport mode. Use mode=subway for a single mode, mode=subway,regional for multiple, or mode=-bus to exclude a mode. Available modes: subway, suburban, tram, bus, ferry, regional, express.

frominteger

Only return departures at least N minutes from now

tointeger

Only return departures within N minutes from now

dedup'nearest' | 'off'

Deduplication mode. "nearest" (default) shows each line only from the closest stop. "off" shows departures from all stops within the radius.

stopsstring

Comma-separated stop IDs to query directly (e.g. ATCO codes for UK). Skips radius-based discovery. Max 20 stops. Requires lat/lon for region detection.

alerts1

Set alerts=1 to receive service disruptions (strikes, cancellations, detours, replacement services) affecting the returned results. The response then carries a top-level disruptions array, and each affected item lists the ids of its disruptions in alerts. Only disruptions in force now or starting within the next 90 minutes are included. Available in regions whose source licence permits passing disruptions on: London, Stockholm, Norway, Switzerland, Vienna, Finland, Belgium, Budapest, Prague, Lisbon metropolitan area, Dublin (Luas) and Baden-Württemberg. More regions follow as licences are cleared. Show each disruption's attribution next to it.

Response

Successful response with departures

regionstring required

Detected transit region

citystring

City name derived from region. Absent for country-level fallback regions (e.g. "Portugal"), where no single city applies.

realtimeboolean required

Whether departures include real-time delay data

routingboolean required

Whether trip planning is available in this region

attributionstring

Required attribution for the data source

timeTravelSupportedboolean

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.

timeTravelHorizonMinutesinteger

How far ahead time travel reaches in this region, in minutes. Absent when the region has no fixed horizon.

radiusUsedinteger

Present only when the effective search radius differs from the requested one, because nothing was found nearby and the search was widened automatically.

forTimestring date-time

Echo of the requested departure time. Present only on time-travel requests.

Example response

{
  "region": "Berlin/Brandenburg",
  "city": "Berlin",
  "realtime": true,
  "routing": true,
  "departures": [
    {
      "line": "U2",
      "direction": "Pankow",
      "time": "3 min",
      "timestamp": 1710500000000,
      "stop": "S+U Alexanderplatz",
      "platform": "2",
      "delay": 2,
      "color": "#8C6DAB"
    }
  ],
  "stations": [
    {
      "name": "S+U Alexanderplatz",
      "distance": 120,
      "walkSeconds": 96
    }
  ],
  "regionBounds": {
    "north": 52.9,
    "south": 51.6,
    "east": 14.8,
    "west": 13
  },
  "routingBounds": [
    {
      "north": 52.9,
      "south": 51.6,
      "east": 14.8,
      "west": 13
    }
  ],
  "timeTravelSupported": true,
  "timeTravelHorizonMinutes": 1440,
  "radiusUsed": 2000,
  "disruptions": [
    {
      "id": "sl:12345",
      "title": "Avstängd hiss vid Hötorget",
      "source": "sl",
      "attribution": "Source: Trafiklab.se, CC BY 4.0"
    }
  ]
}

Changes

    • info

      added the new optional query request parameter alerts

    • info

      added the optional property // to the response with the status

    • info

      added the optional property to the response with the status