GuidesAPI Reference
API Reference

Routes

Lists public transit routes. The service supports several use cases as follows:

  • define routes based on arrival or departure times.
  • filter specific transit modes, such as rail and metro only.
  • plan routes hours or days in advance.
  • set a maximum distance for the walk to the nearest transit stop/station or the speed of the walk.
  • define how many changes or transfers the journey may include.
  • request turn-by-turn navigation.
  • request route polyline in order to view the route over a map.
Query Params
string
required

Trip origin WGS-84 compliant coordinates.

Format: {lat},{lng}[;placeName={name}]

The optional placeName parameter can be used to customize the name of the origin place and will affect the generated actions descriptions.

string
required

Trip destination WGS-84 compliant coordinates.

Format: {lat},{lng}[;placeName={name}]

The optional placeName parameter can be used to customize the name of the destination place and will affect the generated actions descriptions.

lang
array of strings
Defaults to en-US

Specifies the list of preferred languages of the response. The first supported language from the list will be used for for the response. The value should comply with the IETF BCP 47.

lang
string
enum

Units of measurement used, for example, in guidance instructions. The default is metric.

If imperial units are requested and the requested language is en-US, then United States customary units (miles and feet) will be used. If imperial units are requested and a language other than en-US is requested then imperial (miles and yards) units will be used.

Allowed:
date-time

Specifies the time of departure as defined by either date-time or full-date T partial-time in RFC 3339, section 5.6 (for example, 2019-06-24T01:23:45). The requested time is converted to the local time at origin. When the optional timezone offset is not specified, time is assumed to be local. If neither departureTime or arrivalTime are specified, current time at departure location will be used. All Time values in the response are returned in the timezone of each location.

date-time

Specifies the time of arrival as defined by either date-time or full-date T partial-time in RFC 3339, section 5.6 (for example, 2019-06-24T01:23:45). The requested time is converted to the local time at destination. When the optional timezone offset is not specified, time is assumed to be local. All Time values in the response are returned in the timezone of each location.

Note : The following features do not support the arrivalTime parameter:

  • EV Routing
  • Route Handle
  • Route Import
integer
0 to 5
Defaults to 0

Number of alternative routes to return aside from the optimal route. By default, alternatives=0 is assumed and only one optimal route is returned. In cases where also a pedestrian route is available it will be also returned. This may lead to two routes being returned in total (one transit route and one pedestrian route) even though only one is expected when alternatives=0 is given.

integer
0 to 6

Maximum number of changes or transfers allowed in a route. Unlimited number of changes is permitted when not set.

modes
array of objects

Transit mode filter used to determine which modes of transit to include in the response. By default, all supported transit modes are permitted.

Supported modes: highSpeedTrain intercityTrain interRegionalTrain regionalTrain cityTrain bus ferry subway lightRail privateBus inclined aerial busRapid monorail flight spaceship

This parameter also support an exclusion list: It's sufficient to specify each mode to exclude by prefixing it with -. Mixing of inclusive and exclusive transit modes is not allowed.

examples:

  • subway,bus. Returns only subways and busses.
  • -subway,-bus. Returns all modes except subways and busses.
modes
number
0.5 to 2
Defaults to 1

Walking speed in meters per second. Influences the duration of walking segments from origin to a station, from a station to destination and in-between the stations (e.g. if transfer is needed).

integer
0 to 6000
Defaults to 2000

Maximum allowed walking distance in meters (e.g. when looking for nearest stations).

accessibility
array of strings

Defines accessibility requirements for routes.

  • wheelchair - Select only wheelchair accessible vehicles and stations.
return
array of strings

Defines which section attributes are included.

  • intermediate - List of intermediate stops within a section of the route. If enabled, the response includes intermediateStops attribute. Each intermediate stop includes stop/station names, WGS-84 geocoordinates, and the departure times at the stops.
  • fares - List of fares/tickets to cover a section of the route.
  • polyline - Polyline for the route in Flexible Polyline Encoding.
  • actions - Actions (such as maneuvers or tasks) that must be taken to complete the section.
  • travelSummary - Include summary for the travel portion of the section.
  • incidents - Include a list of all incidents applicable to each section.
  • bookingLinks - Include a list of links to book a ride for a section of the route.
  • nextDepartures - Return the next departures for the transit section.
  • sourceFeedMapping - Include a list of source feed data that matches the data of the section.
Headers
string

User-provided token that can be used to trace a request or a group of requests sent to the service.

Responses

Language
Credentials
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json