Returns 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).

get/trips

Request

Query parameters

from_latnumber double required
Example:52.5206

Origin latitude

from_lonnumber double required
Example:13.3862

Origin longitude

to_latnumber double required
Example:52.4752

Destination latitude

to_lonnumber double required
Example:13.4435

Destination longitude

alerts1

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

regionstring required
attributionstring

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 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