Sorry, you need to enable JavaScript to visit this website.

Flow

Contact us for more information regarding the use of this feature.

This endpoint will return a collection of raw Traffic Flow within the specified area. You may specify the area either by using a Bounding Box, or by specifying a tile coordinate set in the x,y,z format, or a routeID.

Types

The table below describes a few of the common types used throughout this document:

Type Description Example
point Latitude, longitude pair (in EPSG4326 projection), with the following constraints:

  • Latitude values must be in the range -90..+90 inclusive.
  • Longitude values must be in the range -180..+180 inclusive.
52.37245,4.89406

Flow bounding box

Request

Format

GET https://<baseURL>/traffic/<versionNumber>/flow/​<top_left>/<bottom_right>.<ext>?key=<apiKey>[&limit=<limit>][&returnRoadUse=<returnRoadUse>][&roadUse=<roadUse>][&speedPercent=<speedPercent>][&speedUnits=<speedUnits>]

Parameters

The table below describes all of the parameters that can be used in a request. Required parameters must be used or the call will fail. Optional parameters, which are highlighted with [square brackets], may be used. If there is a default value that will be assumed when an optional parameter is not used, it is shown in the table. The order of request parameters is not important.

Parameter Description Req'd? Type / Values Default Value Max Value
baseURL Base URL for calling the API. Yes api.tomtom.com
versionNumber Service version number. The current value is 0. Yes 0
top_left Top left position of the bounding box. This is specified as a comma separated string composed by lat., lon. (e.g.: 37.553,-122.453). Yes Point
bottom_right Bottom right position of the bounding box. This is specified as a comma separated string composed by lat., lon. (e.g.: 37.553,-122.453). Yes Point
ext Valid response formats are JSON, JSONP, JS or XML. Yes String
apiKey Your TomTom API Key. Yes String
[limit] Maximum number of responses that will be returned. No Integer 20 100
[returnRoadUse] To enable return of the road use array. No Boolean false
[roadUse] To retrieve incidents for specific types of roads. The road use array can be one or more of:

  • LimitedAccess
  • Arterial
  • Terminal
  • Ramp
  • Rotary
  • LocalStreet.
No String
[speedPercent] Return the flow data below a certain percentage of average speed on the road network. No Float 100
[speedUnits] The speed units to expect in the response, either 'MPH' or 'KPH'. No String MPH

Flow by Tile Key

Request

Format

GET https://<baseURL>/traffic/<versionNumber>/flow/​<x>/<y>/<z>.<ext>?key=<apiKey>[&limit=<limit>][&returnRoadUse=<returnRoadUse>][&roadUse=<roadUse>][&speedPercent=<speedPercent>][&speedUnits=<speedUnits>]

Parameters

The table below describes all of the parameters that can be used in a request. Required parameters must be used or the call will fail. Optional parameters, which are highlighted with [square brackets], may be used. If there is a default value that will be assumed when an optional parameter is not used, it is shown in the table. The order of request parameters is not important.

Parameter Description Req'd? Type / Values Default Value Max Value
baseURL Base URL for calling the API. Yes api.tomtom.com
versionNumber Service version number. The current value is 0. Yes 0
x Horizontal - or "Easting" - value. Relative to the top left point. Yes Integer
y Vertical - or "Northing" - value. Relative to the top left point.  Yes Integer
z Zoom value. Valid values are between 0 and 20, with 0 being the most zoomed out. Yes Integer 20
ext Valid response formats are JSON, JSONP, JS or XML. Yes String
apiKey Your TomTom API Key. Yes String
[limit] Maximum number of responses that will be returned. No Integer 20 100
[returnRoadUse] To enable return of the road use array. No Boolean false
[roadUse] To retrieve incidents for specific types of roads. The road use array can be one or more of:

  • LimitedAccess
  • Arterial
  • Terminal
  • Ramp
  • Rotary
  • LocalStreet.
No String
[speedPercent] Return the flow data below a certain percentage of average speed on the road network. No Float 100
[speedUnits] The speed units to expect in the response, either 'MPH' or 'KPH'. No String MPH

Flow by routeID

Request

Format

GET https://<baseURL>/traffic/<versionNumber>/flow/<routeID>.<ext>?key=<apiKey>[&limit=<limit>][&returnRoadUse=<returnRoadUse>][&roadUse=<roadUse>][&speedPercent=<speedPercent>][&speedUnits=<speedUnits>]

Parameters

The table below describes all of the parameters that can be used in a request. Required parameters must be used or the call will fail. Optional parameters, which are highlighted with [square brackets], may be used. If there is a default value that will be assumed when an optional parameter is not used, it is shown in the table. The order of request parameters is not important.

Parameter Description Req'd? Type / Values Default Value Max Value
baseURL Base URL for calling the API. Yes api.tomtom.com
versionNumber Service version number. The current value is 0. Yes 0
routeID Hex. RouteID. Yes String
ext Valid response formats are JSON, JSONP, JS or XML. Yes String
apiKey Your TomTom API Key. Yes String
[limit] Maximum number of responses that will be returned. No Integer 20 100
[returnRoadUse] To enable return of the road use array. No Boolean false
[roadUse] To retrieve incidents for specific types of roads. The road use array can be one or more of:

  • LimitedAccess
  • Arterial
  • Terminal
  • Ramp
  • Rotary
  • LocalStreet.
No String
[speedPercent] Return the flow data below a certain percentage of average speed on the road network. No Float 100
[speedUnits] The speed units to expect in the response, either 'MPH' or 'KPH'. No String MPH

Response

Format

Response will be a json object, with the following structure:

{
        total : N, //integer, number of records returned
        flowData : [] //array of flow objects
}

Where each element of the flow array is in the format:

{
    currentSpeed : {
      value : 26,
      uom : "MPH"
},
    speedPercent : 71,
    averageSpeed : {
      value : 37,
      uom : "MPH"
},
    speedLimit : {
      value : 40,
      uom : "MPH" 
},
    geometry : [
      "37.35359, -121.92643",
      "37.35324, -121.92574",
      "37.35261, -121.92448"
    ],
    streetName : "Coleman Ave",
    routeNumbers : [ ]
}

You are here