Request flow data

A basic flow request consists of a geospatial filter (in) and the type of location referencing to return (locationReferencing). The response will contain the traffic flow information of the road segments that are within the requested area.

The geospatial filter in can be a circle, a bounding box or a corridor, each having its own format. In our example below, we will use a circle specified by a point with latitude and longitude and a radius: in=circle:52.50811,13.47853;r=2000. For more details on the geospatial filtering types, see Geospatial filtering.

The locationReferencing can be one or more out of tmc, olr, shape. Specify only the location types that you can interpret to ensure that you don't get any data that you can't process.

Note

Specify none if you are not interested in the location of the flow information. The response will not contain any location references.

For more information on the location referencing types, see Location referencing.

The returned data will be an array of flow items, each having a location and a currentFlow element. Each location has a length in meters, a description that usually is a street name, and the available location references of the location, depending on which were requested by the locationReferencing parameter.

The currentFlow element of each flow item carries the speed, jam factor, and traversability information of the flow item.

Bearer token
| Apikey
curl -H "Authorization: Bearer $TOKEN" "https://data.traffic.hereapi.com/v7/flow?in=circle:52.50811,13.47853;r=2000&locationReferencing=olr"
curl "https://data.traffic.hereapi.com/v7/flow?in=circle:52.50811,13.47853;r=2000&locationReferencing=olr&apiKey=$API_KEY"
{
   "sourceUpdated":"2021-06-08T10:07:23Z",
   "results":[
      {
         "location":{
            "description":"Alt-Friedrichsfelde",
            "length":966.0,
            "olr":"CCoBEAAmJQmadyVXRQAJBQQBAkcACgUEAYpTAAfI/7QACQUEAQK3ADAAgxM="
         },
         "currentFlow":{
            "speed":13.888889,
            "speedUncapped":14.722222,
            "freeFlow":13.888889,
            "jamFactor":1.2,
            "confidence":0.99,
            "traversability":"open"
         }
      },
      {
         "location":{
            "description":"Rosenfelder Straße",
            "length":929.0,
            "olr":"CCoBEAAmJQmeJyVXKAAJBQQBArcACgUEAYpoAPgaAEkACQUEAQJFADCDTQA="
         },
         "currentFlow":{
            "speed":13.888889,
            "speedUncapped":14.722222,
            "freeFlow":13.611112,
            "jamFactor":2.0,
            "confidence":0.99,
            "traversability":"open"
         }
      },
      ...
   ]
}

The results array above has been truncated for readability.

If no traffic information is available at the requested location, the results will be an empty array:

{"sourceUpdated":null,"results":[]}

results matching ""

    No results matching ""