Public Transit API Developer's Guide

Transit Routing

Use the route resource to request routes between two sets of WGS-84 compliant geocoordinates.

.../v3/route.{format}?<parameter>=<value>...
      
Table 1. Mandatory Parameters
Parameter Data Type Description
app_code String

A 20 bytes Base64 URL-safe encoded string used for the authentication of the client application.
You must include an app_id and app_code with every request. To get an app_code assigned to you, please see Acquiring Credentials.

app_id String

A 20 bytes Base64 URL-safe encoded string used for the authentication of the client application.
You must include an app_id and app_code with every request. To get an app_code assigned to you, please see Acquiring Credentials.

dep Double,Double,String Specifies the latitude, the longitude and the name of the starting point of your route separated by commas. Where the latitude is in WGS 84-compliant degrees between -90 and 90, the longitude is in WGS 84-compliant degrees between -180 and 180 and the name can be omitted.
arr Double,Double,String Specifies the latitude, the longitude and the name of the end point of your route separated by commas. Where the latitude is in WGS 84-compliant degrees between -90 and 90 and the longitude is in WGS 84-compliant degrees between -180 and 180 and the name can be omitted.
routing String Specifies the requested routing type. Can be one of:
  • sr - for estimated routing
  • tt - for timetable
  • all - for both estimated and timetable routing
time DateTime Specifies the time in ISO 8601 (for example, 2017-12-25T01:23:45) format.
Table 2. Optional Parameters
Parameter Data Type Description
arrival Integer Switches between arrival and departure time. If enabled, makes routing request to interpret time as arrival time for the journey.

1 (enabled), 0 (disabled)

The default is 0.

max Integer Specifies the number of following departure/arrivals the response should include. The possible values are:

1-6

The default is 3.

callbackFunc String Specifies an arbitrary string used to wrap the JSON object in the response.
callbackId Integer If you specify the parameter callbackId, specifies the first argument to the function specified by the callbackFunc.
changes Integer Specifies the maximum number of changes or transfers allowed in a route.

0-6 or -1.

The default is -1 (which disables the filter, or unlimited no of changes permitted).

Note: In areas where this parameter is not supported, the route response includes the attribute sup_changes="0" in the Connection node.
details Integer Requests the inclusion of a list of intermediate stops within the routes in the response. If enabled, the response includes stop/station names, WGS-84 geocoordinates, and the departure/arrival times at the stops.

1 (enabled), 0 (disabled)

The default is 1.

graph Integer Requests coordinate pairs to allow the drawing of a polyline for the route. The possible values are:

1 (enabled), 0 (disabled)

The default is 0.

lang String Specifies the language of the response. The value complies with the ISO 639-1 standard and defaults to en.
modes String

Specifies the transit type filter used to determine which types of transit to include in the response.
By default the parameter is omitted, meaning all supported transit types are permitted.
See Transit Modes page for more information.

strict Integer Specifies if the number of returned connections must be strict.

1 (enabled), 0 (disabled)

The default is 0.

walk String Specifies a maximum walking distance and walking speed in the format max_distance,speed as follows:
  • max_distance: range 0-6000 (meters).
  • speed: range 50-200 (half of normal speed to double the normal speed).

The default value is 2000,100.

Note: In areas where speed or max_dist parameters are not supported, the route response includes the attributes sup_speed=0 or sup_max_dist=0 in the Connections node.
secCtx Integer The response includes a context for use in subsequent requests for the route section update.

1 (enabled), 0 (disabled)

The default is 0.

See Route Section Update for details.
maneuvers Integer The response includes turn-by-turn maneuvers information for the relevant transport mode, e.g. wak, taxi, car share, etc.

1 (enabled), 0 (disabled)

The default is 0.

firstLastMile Integer The response includes first/last mile of a long-distance connection. If set to 0, response will only show the long distance sections in between and excludes the initial and final connections.

1 (enabled), 0 (disabled)

The default is 1.

You cannot use this account to purchase a commercial plan on Developer Portal, as it is already associated to plans with different payment methods.

To purchase a commercial plan on Developer Portal, please register for or sign in with a different HERE Account.

Something took longer than expected.

The project should be available soon under your projects page.

Sorry, our services are not available in this region.

Something seems to have gone wrong. Please try again later.

We've detected that your account is set to Australian Dollars (AUD).
Unfortunately, we do not offer checkouts in AUD anymore.
You can continue using your current plan as normal, but to subscribe to one of our new plans,
please register for a new HERE account or contact us for billing questions on selfservesupport@here.com.