Plan a trip
Changed onReturns trip options between two coordinates. Finds the nearest stops at origin and destination and queries the transit provider for routes. Available in countries with routing support (Germany, Austria, France, Switzerland, Belgium, Norway, Finland, Denmark, Sweden, UK, Netherlands, Ireland, Luxembourg).
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
Origin latitude
Origin longitude
Destination latitude
Destination longitude
Set alerts=1 to receive service disruptions (strikes, cancellations, detours, replacement services) affecting the legs of the returned trips. The response then carries a top-level disruptions array, and each affected item lists the ids of its disruptions in alerts. A disruption is attached to a leg only if its validity overlaps the leg's travel time. 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 trip options
Example response
{
"region": "Berlin/Brandenburg",
"trips": [
{
"legs": [
{
"line": "U2",
"direction": "Pankow",
"stopNames": [
"Hamburg Habichtstraße"
]
}
]
}
],
"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