Traffic API Developer's Guide

Quick Start

The section provides information to help you start using the HERE Traffic API. It outlines a simple scenario and shows the matching requests.

Note that each request must include the authentication parameters app_id and app_code to access the resources of the API. All examples in this guide use the placeholder text {YOUR_APP_CODE} and {YOUR_APP_ID} to indicate places where you should substitute your own unique app_id and app_code values. For more information about these authentication credentials, see Acquiring Credentials.

Requesting Traffic Incident Data

A basic scenario involving the use of the Traffic API is to obtain traffic incident data for a specific area. The two request examples below provide a working illustration.

Both requests ask for traffic incident data for an area around Frankfurt, Germany . To do this, they specify:

  1. the base URL, and the URL path, consisting of the service name ("traffic") and service version
  2. the targeted resource (incidents) – all the available resources and further examples are covered in the subsequent parts of this documentation
  3. the area for which to retrieve traffic incident data – this is done by identifying a map tile in a grid of tiles covering the entire globe
  4. the authentication credentials

The example requests differ in the way they identify the map tile (point 2 above) and in the response (output) format. The first request uses the [Z]/[X]/[Y] addressing scheme to indicate the map tile and thus provides the zoom level and the coordinates of the tile (see The Mercator Projection for details). It indicates that XML is the required output format. The second example identifies the map tile via a quadkey (see also Quadkeys) and specifies JSON as the output format.

Incident Reports Example – XML Output and [Z]/[X]/[Y] Tile Addressing

A request for traffic incident data to be delivered in XML, with the [Z]/[X]/[Y] addressing scheme specifying the map tile, is formulated as follows:

https://traffic.cit.api.here.com/traffic/6.2/incidents/xml/8/134/86
?app_id={YOUR_APP_ID}
&app_code={YOUR_APP_CODE}

To specify the tile for which to obtain traffic incident data, the request indicates the zoom level as 8, the tile column as 134, and row as 86

The complete response is too long to include here. It consists of the top-level element <TRAFFICML_INCIDENTS TIMESTAMP="05/23/2017 07:44:21 GMT" VERSION="2.3"> followed by <TRAFFIC_ITEMS>. <TRAFFIC_ITEMS> includes any number of individual <TRAFFIC_ITEM> elements that contain the incident location, time, duration, severity, description and other details.

Traffic Incident Data Example – JSON Output and Quadkey Tile Addressing

A request for traffic incident data for the same area around Frankfurt, Germany, to be delivered as a JSON object and using a quadkey to specify the map tile, is formulated as follows:

https://traffic.cit.api.here.com/traffic/6.2/incidents.json
?app_id={YOUR_APP_ID}
&app_code={YOUR_APP_CODE}
&quadkey=12020330

For additional use cases, see Traffic Incident Data.

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.