HERE Traffic API 6
In maintenance
Traffic API Developer's Guide

Examples

This section provides examples of requests reflecting typical use cases for the Traffic API, along with the corresponding results.

For readability, in some responses, line breaks are used and long strings are shortened with ellipsis (...).

The following example demonstrates search request for a traffic incident. The request uses bounding box coordinates to define the area to search. The request uses the HTTP GET method and sets the bounding box coordinates with a bbox. The value of the parameter is the latitude and longitude of the top left and bottom right corners of the area for which to retrieve traffic incident data. The last parameter, criticality, indicates the severity of the accidents about which to obtain information.

Note: These examples use a HERE API Key to authenticate your request. For the available authentication options, see the Identity & Access Management Developer Guide.
https://traffic.ls.hereapi.com/traffic/6.3/incidents.json
?apiKey={YOUR_API_KEY}
&bbox=52.516,13.355;52.511,13.400
&criticality=minor

Where a request uses the Mercator Projection addressing scheme in the examples, it is possible to use the Quadkey addressing scheme instead, or vice versa. For example, the following request using the Mercator Projection addressing scheme and specifying JSON as the desired response format:
https://traffic.ls.hereapi.com/traffic/6.2/flow/json/8/134/86
?apiKey={YOUR_API_KEY}
https://traffic.ls.hereapi.com/traffic/6.2/flow.xml
&apiKey={YOUR_API_KEY}
Other ways to specify a location are to use the query parameters proximity (prox) or a bounding box filter (bbox). For more information, see Limitations and Selecting a Request Pattern.