v51

latestOpenAPI 3.1.0MITraw.githubusercontent.com2026-08-012281206.0 KB
routing

Computes optimal connections from one place to another.

get/api/v6/plan

Query parameters

fromPlacestring required

`latitude,longitude[,level]` tuple with

  • latitude and longitude in degrees
  • (optional) level: the OSM level (default: 0)

OR

stop id

toPlacestring required

`latitude,longitude[,level]` tuple with

  • latitude and longitude in degrees
  • (optional) level: the OSM level (default: 0)

OR

stop id

radiusnumber double

Experimental. Search radius in meters around the fromPlace / toPlace coordinates. When set and the place is given as coordinates, all transit stops within this radius are used as start/end points. The pre-transit/post-transit time for each of them is estimated from the crow-fly distance to the coordinate at walking speed (1.5 m/s), rounded down to whole minutes. Works without OSM/street routing data loaded.

viastring[]

List of via stops to visit (only stop IDs, no coordinates allowed for now). Also see the optional parameter viaMinimumStay to set a set a minimum stay duration for each via stop.

viaMinimumStayinteger[]

Optional. If not set, the default is 0,0 - no stay required.

For each via stop a minimum stay duration in minutes.

The value 0 signals that it's allowed to stay in the same trip. This enables via stays without counting a transfer and can lead to better connections with less transfers. Transfer connections can still be found with viaMinimumStay=0.

timestring date-time

Optional. Defaults to the current time.

Departure time ($arriveBy=false) / arrival date ($arriveBy=true),

maxTransfersinteger

The maximum number of allowed transfers (i.e. interchanges between transit legs, pre- and postTransit do not count as transfers). maxTransfers=0 searches for direct transit connections without any transfers. If you want to search only for non-transit connections (FOOT, CAR, etc.), send an empty transitModes parameter instead.

If not provided, the routing uses the server-side default value which is hardcoded and very high to cover all use cases.

Warning: Use with care. Setting this too low can lead to optimal (e.g. the fastest) journeys not being found. If this value is too low to reach the destination at all, it can lead to slow routing performance.

In plan endpoints before v3, the behavior is off by one, i.e. maxTransfers=0 only returns non-transit connections.

maxTravelTimeinteger

The maximum travel time in minutes. If not provided, the routing to uses the value hardcoded in the server which is usually quite high.

Warning: Use with care. Setting this too low can lead to optimal (e.g. the least transfers) journeys not being found. If this value is too low to reach the destination at all, it can lead to slow routing performance.

minTransferTimeinteger

Optional. Default is 0 minutes.

Minimum transfer time for each transfer in minutes.

additionalTransferTimeinteger

Optional. Default is 0 minutes.

Additional transfer time reserved for each transfer in minutes.

transferTimeFactornumber

Optional. Default is 1.0

Factor to multiply minimum required transfer times with. Values smaller than 1.0 are not supported.

maxMatchingDistancenumber

Optional. Default is 250 meters.

Maximum matching distance in meters to match geo coordinates to the street network.

Is limited by server config variable max_max_matching_distance, larger values are capped to this limit.

pedestrianProfile'FOOT' | 'WHEELCHAIR'

Different accessibility profiles for pedestrians.

Optional. Default is FOOT.

Accessibility profile to use for pedestrian routing in transfers between transit connections, on the first mile, and last mile.

pedestrianSpeednumber

Average speed for pedestrian routing in meters per second

Optional

Average speed for pedestrian routing.

cyclingSpeednumber

Average speed for bike routing in meters per second

Optional

Average speed for bike routing.

vehicleHeightnumber

Vehicle height for HGV routing in meters

Vehicle height in meters used for HGV street routing.

vehicleWidthnumber

Vehicle width for HGV routing in meters

Vehicle width in meters used for HGV street routing.

vehicleLengthnumber

Vehicle length for HGV routing in meters

Vehicle length in meters used for HGV street routing.

vehicleWeightnumber

Vehicle gross weight for HGV routing in tons

Vehicle gross weight in tons used for HGV street routing.

vehicleHazmatboolean

Whether the vehicle carries hazardous materials for HGV routing

Whether the vehicle carries hazardous materials for HGV street routing.

vehicleHazmatWaterboolean

Whether the vehicle carries hazardous materials dangerous to water for HGV routing

Whether the vehicle carries hazardous materials dangerous to water for HGV street routing.

vehicleAxleCountinteger

Axle count for HGV routing

Axle count used for HGV street routing.

vehicleAxleLoadnumber

Maximum axle load for HGV routing in tons

Maximum axle load in tons used for HGV street routing.

vehicleTrailerboolean

Whether the vehicle has a trailer for HGV routing

Whether the vehicle has a trailer for HGV street routing.

vehicleTopSpeedinteger

Vehicle top speed for HGV routing in km/h

Vehicle top speed in km/h used for HGV street routing.

vehicleLezAccessboolean

Whether the vehicle is allowed to use low-emission zones for HGV routing

Whether the vehicle is allowed to use low-emission zones for HGV street routing.

elevationCosts'NONE' | 'LOW' | 'HIGH'

Different elevation cost profiles for street routing. Using a elevation cost profile will prefer routes with a smaller incline and smaller difference in elevation, even if the routed way is longer.

  • NONE: Ignore elevation data for routing. This is the default behavior
  • LOW: Add a low penalty for inclines. This will favor longer paths, if the elevation increase and incline are smaller.
  • HIGH: Add a high penalty for inclines. This will favor even longer paths, if the elevation increase and incline are smaller.

Optional. Default is NONE.

Set an elevation cost profile, to penalize routes with incline.

  • NONE: No additional costs for elevations. This is the default behavior
  • LOW: Add a low cost for increase in elevation and incline along the way. This will prefer routes with less ascent, if small detours are required.
  • HIGH: Add a high cost for increase in elevation and incline along the way. This will prefer routes with less ascent, if larger detours are required.

As using an elevation costs profile will increase the travel duration, routing through steep terrain may exceed the maximal allowed duration, causing a location to appear unreachable. Increasing the maximum travel time for these segments may resolve this issue.

The profile is used for direct routing, on the first mile, and last mile.

Elevation cost profiles are currently used by following street modes:

  • BIKE
useRoutedTransfersboolean

Optional. Default is false.

Whether to use transfers routed on OpenStreetMap data.

detailedTransfersboolean

Controls if transfer polylines and step instructions are returned.

If not set, this parameter inherits the value of detailedLegs.

  • true: Compute transfer polylines and step instructions.
  • false: Return empty legGeometry and omit steps for transfers.
detailedLegsboolean

Controls if legGeometry and steps are returned for direct legs, pre-/post-transit legs and transit legs.

joinInterlinedLegsboolean

Optional. Default is true.

Controls if a journey section with stay-seated transfers is returned:

  • joinInterlinedLegs=false: as several legs (full information about all trip numbers, headsigns, etc.). Legs that do not require a transfer (stay-seated transfer) are marked with interlineWithPreviousLeg=true.
  • joinInterlinedLegs=true (default behavior): as only one joined leg containing all stops
transitModesMode[]

Optional. Default is TRANSIT which allows all transit modes (no restriction). Allowed modes for the transit part. If empty, no transit connections will be computed. For example, this can be used to allow only SUBURBAN,SUBWAY,TRAM.

directModesMode[]

Optional. Default is WALK which will compute walking routes as direct connections.

Modes used for direction connections from start to destination without using transit. Results will be returned on the direct key.

Note: Direct connections will only be returned on the first call. For paging calls, they can be omitted.

Note: Transit connections that are slower than the fastest direct connection will not show up. This is being used as a cut-off during transit routing to speed up the search. To prevent this, it's possible to send two separate requests (one with only transitModes and one with only directModes).

Note: the output direct array will stay empty if the input param maxDirectTime makes any direct trip impossible.

Only non-transit modes such as WALK, BIKE, CAR, HGV, BIKE_SHARING, etc. can be used.

preTransitModesMode[]

Optional. Default is WALK. Only applies if the from place is a coordinate (not a transit stop). Does not apply to direct connections (see directModes).

A list of modes that are allowed to be used from the from coordinate to the first transit stop. Example: WALK,BIKE_SHARING.

postTransitModesMode[]

Optional. Default is WALK. Only applies if the to place is a coordinate (not a transit stop). Does not apply to direct connections (see directModes).

A list of modes that are allowed to be used from the last transit stop to the to coordinate. Example: WALK,BIKE_SHARING.

directRentalFormFactorsRentalFormFactor[]

Experimental. Expect unannounced breaking changes (without version bumps).

Optional. Only applies to direct connections.

A list of vehicle type form factors that are allowed to be used for direct connections. If empty (the default), all form factors are allowed. Example: BICYCLE,SCOOTER_STANDING.

preTransitRentalFormFactorsRentalFormFactor[]

Experimental. Expect unannounced breaking changes (without version bumps).

Optional. Only applies if the from place is a coordinate (not a transit stop). Does not apply to direct connections (see directRentalFormFactors).

A list of vehicle type form factors that are allowed to be used from the from coordinate to the first transit stop. If empty (the default), all form factors are allowed. Example: BICYCLE,SCOOTER_STANDING.

postTransitRentalFormFactorsRentalFormFactor[]

Experimental. Expect unannounced breaking changes (without version bumps).

Optional. Only applies if the to place is a coordinate (not a transit stop). Does not apply to direct connections (see directRentalFormFactors).

A list of vehicle type form factors that are allowed to be used from the last transit stop to the to coordinate. If empty (the default), all form factors are allowed. Example: BICYCLE,SCOOTER_STANDING.

directRentalPropulsionTypesRentalPropulsionType[]

Experimental. Expect unannounced breaking changes (without version bumps).

Optional. Only applies to direct connections.

A list of vehicle type form factors that are allowed to be used for direct connections. If empty (the default), all propulsion types are allowed. Example: HUMAN,ELECTRIC,ELECTRIC_ASSIST.

preTransitRentalPropulsionTypesRentalPropulsionType[]

Experimental. Expect unannounced breaking changes (without version bumps).

Optional. Only applies if the from place is a coordinate (not a transit stop). Does not apply to direct connections (see directRentalPropulsionTypes).

A list of vehicle propulsion types that are allowed to be used from the from coordinate to the first transit stop. If empty (the default), all propulsion types are allowed. Example: HUMAN,ELECTRIC,ELECTRIC_ASSIST.

postTransitRentalPropulsionTypesRentalPropulsionType[]

Experimental. Expect unannounced breaking changes (without version bumps).

Optional. Only applies if the to place is a coordinate (not a transit stop). Does not apply to direct connections (see directRentalPropulsionTypes).

A list of vehicle propulsion types that are allowed to be used from the last transit stop to the to coordinate. If empty (the default), all propulsion types are allowed. Example: HUMAN,ELECTRIC,ELECTRIC_ASSIST.

directRentalProvidersstring[]

Experimental. Expect unannounced breaking changes (without version bumps).

Optional. Only applies to direct connections.

A list of rental providers that are allowed to be used for direct connections. If empty (the default), all providers are allowed.

directRentalProviderGroupsstring[]

Experimental. Expect unannounced breaking changes (without version bumps).

Optional. Only applies to direct connections.

A list of rental provider groups that are allowed to be used for direct connections. If empty (the default), all providers are allowed.

preTransitRentalProvidersstring[]

Experimental. Expect unannounced breaking changes (without version bumps).

Optional. Only applies if the from place is a coordinate (not a transit stop). Does not apply to direct connections (see directRentalProviders).

A list of rental providers that are allowed to be used from the from coordinate to the first transit stop. If empty (the default), all providers are allowed.

preTransitRentalProviderGroupsstring[]

Experimental. Expect unannounced breaking changes (without version bumps).

Optional. Only applies if the from place is a coordinate (not a transit stop). Does not apply to direct connections (see directRentalProviderGroups).

A list of rental provider groups that are allowed to be used from the from coordinate to the first transit stop. If empty (the default), all providers are allowed.

postTransitRentalProvidersstring[]

Experimental. Expect unannounced breaking changes (without version bumps).

Optional. Only applies if the to place is a coordinate (not a transit stop). Does not apply to direct connections (see directRentalProviders).

A list of rental providers that are allowed to be used from the last transit stop to the to coordinate. If empty (the default), all providers are allowed.

postTransitRentalProviderGroupsstring[]

Experimental. Expect unannounced breaking changes (without version bumps).

Optional. Only applies if the to place is a coordinate (not a transit stop). Does not apply to direct connections (see directRentalProviderGroups).

A list of rental provider groups that are allowed to be used from the last transit stop to the to coordinate. If empty (the default), all providers are allowed.

ignoreDirectRentalReturnConstraintsboolean

Experimental. Expect unannounced breaking changes (without version bumps).

Optional. Default is false.

If set to true, the routing will ignore rental return constraints for direct connections, allowing the rental vehicle to be parked anywhere.

ignorePreTransitRentalReturnConstraintsboolean

Experimental. Expect unannounced breaking changes (without version bumps).

Optional. Default is false.

If set to true, the routing will ignore rental return constraints for the part from the from coordinate to the first transit stop, allowing the rental vehicle to be parked anywhere.

ignorePostTransitRentalReturnConstraintsboolean

Experimental. Expect unannounced breaking changes (without version bumps).

Optional. Default is false.

If set to true, the routing will ignore rental return constraints for the part from the last transit stop to the to coordinate, allowing the rental vehicle to be parked anywhere.

numItinerariesinteger

The minimum number of itineraries to compute. This is only relevant if timetableView=true. The default value is 5.

maxItinerariesinteger

Optional. By default all computed itineraries will be returned

The maximum number of itineraries to compute. This is only relevant if timetableView=true.

Note: With the current implementation, setting this to a lower number will not result in any speedup.

Note: The number of returned itineraries might be slightly higher than maxItineraries as there might be several itineraries with the same departure time but different number of transfers. In order to not miss any itineraries for paging, either none or all itineraries with the same departure time have to be returned.

pageCursorstring

Use the cursor to go to the next "page" of itineraries. Copy the cursor from the last response and keep the original request as is. This will enable you to search for itineraries in the next or previous time-window.

timetableViewboolean

Optional. Default is true.

Search for the best trip options within a time window. If true two itineraries are considered optimal if one is better on arrival time (earliest wins) and the other is better on departure time (latest wins). In combination with arriveBy this parameter cover the following use cases:

timetable=false = waiting for the first transit departure/arrival is considered travel time:

  • arriveBy=true: event (e.g. a meeting) starts at 10:00 am, compute the best journeys that arrive by that time (maximizes departure time)
  • arriveBy=false: event (e.g. a meeting) ends at 11:00 am, compute the best journeys that depart after that time

timetable=true = optimize "later departure" + "earlier arrival" and give all options over a time window:

  • arriveBy=true: the time window around date and time refers to the arrival time window
  • arriveBy=false: the time window around date and time refers to the departure time window
arriveByboolean

Optional. Default is false.

  • arriveBy=true: the parameters date and time refer to the arrival time
  • arriveBy=false: the parameters date and time refer to the departure time
searchWindowinteger

Optional. Default is 15 minutes which is 900.

The length of the search-window in seconds. Default value 15 minutes.

  • arriveBy=true: number of seconds between the earliest departure time and latest departure time
  • arriveBy=false: number of seconds between the earliest arrival time and the latest arrival time
requireBikeTransportboolean

Optional. Default is false.

If set to true, all used transit trips are required to allow bike carriage.

requireCarTransportboolean

Optional. Default is false.

If set to true, all used transit trips are required to allow car carriage.

noCompulsoryReservationboolean

Optional. Default is false.

If set to true, all used transit trips are required to be usable without compulsory reservation.

maxPreTransitTimeinteger

Optional. Default is 15min which is 900. Maximum time in seconds for the first street leg. Is limited by server config variable street_routing_max_prepost_transit_seconds.

maxPostTransitTimeinteger

Optional. Default is 15min which is 900. Maximum time in seconds for the last street leg. Is limited by server config variable street_routing_max_prepost_transit_seconds.

maxDirectTimeinteger

Optional. Default is 30min which is 1800. Maximum time in seconds for direct connections. Is limited by server config variable street_routing_max_direct_seconds.

fastestDirectFactornumber

Optional. Experimental. Default is 10. Factor with which the duration of the fastest direct non-public-transit connection is multiplied. Values > 1.0 allow transit connections that are slower than the fastest direct non-public-transit connection to be found.

timeoutinteger

Optional. Query timeout in seconds.

passengersinteger

Optional. Experimental. Number of passengers (e.g. for ODM or price calculation)

luggageinteger

Optional. Experimental. Number of luggage pieces; base unit: airline cabin luggage (e.g. for ODM or price calculation)

slowDirectboolean

Optional. Experimental. Adds overtaken direct public transit connections.

fastestSlowDirectFactornumber

Optional. Factor with which the duration of the fastest slowDirect connection is multiplied. Values > 1.0 allow connections that are slower than the fastest direct transit connection to be found. Values < 1.0 will return all slowDirect connections.

withFaresboolean

Optional. Experimental. If set to true, the response will contain fare information.

numLegAlternativesinteger

Optional. Maximum number of alternatives to return per transit leg. 0 disables alternatives. When greater than zero, each transit leg in the response is annotated with up to N alternatives: connections that can replace the leg while still matching the surrounding journey context (i.e. arriving in time for the next transit leg / departing after the previous transit leg's arrival). Each alternative is a 3-leg sequence [ingress footpath, transit, egress footpath].

withScheduledSkippedStopsboolean

Optional. Include intermediate stops where passengers can not alight/board according to schedule.

realtimeMode'OFF' | 'REALTIME_ANNOTATION_ONLY' | 'REALTIME'

Controls whether realtime data (delays, cancellations, added/changed trips) is used.

  • REALTIME: use realtime data for routing/sorting.
  • REALTIME_ANNOTATION_ONLY: route, sort and window on the scheduled timetable only, but still annotate the response with realtime data.
  • OFF: use the scheduled timetable only, with no realtime annotation.

Optional. Default is REALTIME.

Controls whether realtime data is used for routing.

  • REALTIME: the realtime timetable (delays, cancellations, added/changed trips) is used and reflected in the response.
  • REALTIME_ANNOTATION_ONLY: routing uses the scheduled timetable only, but the response is annotated with realtime data.
  • OFF: only the scheduled timetable is used.
languagestring[]

language tags as used in OpenStreetMap / GTFS (usually BCP-47 / ISO 639-1, or ISO 639-2 if there's no ISO 639-1)

algorithm'RAPTOR' | 'PONG' | 'TB'

algorithm to use

Response

routing result

requestParametersobject required

the routing query

debugOutputobject required

debug statistics

previousPageCursorstring required

Use the cursor to get the previous page of results. Insert the cursor into the request and post it to get the previous page. The previous page is a set of itineraries departing BEFORE the first itinerary in the result for a depart after search. When using the default sort order the previous set of itineraries is inserted before the current result.

nextPageCursorstring required

Use the cursor to get the next page of results. Insert the cursor into the request and post it to get the next page. The next page is a set of itineraries departing AFTER the last itinerary in this result.

All 22 operations