Get nearby departures
Changed onReturns real-time departures from transit stops near the given coordinates. Automatically detects the region and queries the appropriate transit provider(s).
Request
- Base URLhttps://api.abfahrt.now
- Auth
- API key in header x-api-key
- or API key in query parameter api_key
- TypeScriptA function with typed inputs. Its response is checked against the schema.
Query parameters
Latitude (WGS84)
Longitude (WGS84)
Search radius in meters
Maximum number of departures to return
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.
Only return departures at least N minutes from now
Only return departures within N minutes from now
Deduplication mode. "nearest" (default) shows each line only from the closest stop. "off" shows departures from all stops within the radius.
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.
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
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
queryrequest parameteralerts - info
added the optional property
//to the response with the status - info
added the optional property
to the response with the status
- info