Computes optimal connections from one place to another.
Query parameters
`latitude,longitude[,level]` tuple with
- latitude and longitude in degrees
- (optional) level: the OSM level (default: 0)
OR
stop id
`latitude,longitude[,level]` tuple with
- latitude and longitude in degrees
- (optional) level: the OSM level (default: 0)
OR
stop id
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.
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.
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.
Optional. Defaults to the current time.
Departure time ($arriveBy=false) / arrival date ($arriveBy=true),
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.
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.
Optional. Default is 0 minutes.
Minimum transfer time for each transfer in minutes.
Optional. Default is 0 minutes.
Additional transfer time reserved for each transfer in minutes.
Optional. Default is 1.0
Factor to multiply minimum required transfer times with. Values smaller than 1.0 are not supported.
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.
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.
Average speed for pedestrian routing in meters per second
Optional
Average speed for pedestrian routing.
Average speed for bike routing in meters per second
Optional
Average speed for bike routing.
Vehicle height for HGV routing in meters
Vehicle height in meters used for HGV street routing.
Vehicle width for HGV routing in meters
Vehicle width in meters used for HGV street routing.
Vehicle length for HGV routing in meters
Vehicle length in meters used for HGV street routing.
Vehicle gross weight for HGV routing in tons
Vehicle gross weight in tons used for HGV street routing.
Whether the vehicle carries hazardous materials for HGV routing
Whether the vehicle carries hazardous materials for HGV street routing.
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.
Axle count for HGV routing
Axle count used for HGV street routing.
Maximum axle load for HGV routing in tons
Maximum axle load in tons used for HGV street routing.
Whether the vehicle has a trailer for HGV routing
Whether the vehicle has a trailer for HGV street routing.
Vehicle top speed for HGV routing in km/h
Vehicle top speed in km/h used for HGV street routing.
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.
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
Optional. Default is false.
Whether to use transfers routed on OpenStreetMap data.
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.
Controls if legGeometry and steps are returned for direct legs, pre-/post-transit legs and transit legs.
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
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
The minimum number of itineraries to compute. This is only relevant if timetableView=true. The default value is 5.
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.
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.
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
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
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
Optional. Default is false.
If set to true, all used transit trips are required to allow bike carriage.
Optional. Default is false.
If set to true, all used transit trips are required to allow car carriage.
Optional. Default is false.
If set to true, all used transit trips are required to be usable without compulsory reservation.
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.
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.
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.
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.
Optional. Query timeout in seconds.
Optional. Experimental. Number of passengers (e.g. for ODM or price calculation)
Optional. Experimental. Number of luggage pieces; base unit: airline cabin luggage (e.g. for ODM or price calculation)
Optional. Experimental. Adds overtaken direct public transit connections.
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.
Optional. Experimental. If set to true, the response will contain fare information.
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].
Optional. Include intermediate stops where passengers can not alight/board according to schedule.
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.
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 to use
Response
routing result