Enhanced Junction Analytics Data
Important Note Explore ready-to-use traffic reports and data visualizations immediately by signing up for a 30-day free trial on the MOVE Portal. Once registered, you'll receive an API key to start using the Traffic Analytics APIs right away. Alternatively, you may contact our Sales team for a tailored solution.
Purpose
Important Note This endpoint is working only if you have granted access to enhanced features
The Enhanced Junction Data is a REST API endpoint that provides raw data for a selected junction. This endpoint delivers detailed metrics for each approach within the junction, with specific focus on single trace metrics. Metrics are collected at designated locations known as Arrival Points.
After creating the junction with Arrival Points, wait for the archive to be populated with arrival time data. For LIVE data, this process typically takes around 15 minutes, while for HISTORICAL data, it can take up to 24 hours. Arrival times are calculated from the moment the junction was created.
Request data
You can can download the Junction archive by sending a GET request, as shown in the following example.
- Constants and parameters enclosed in curly brackets must be replaced with their values.
- Please see the following Request parameters section with the required and optional parameters tables for their values. The generic request format is as follows.
HTTPS method: GET
https://api.tomtom.com/junction-analytics/junctions/1/archive/{junctionId}/raw-data/arrival-times/hourly?key={Your_API_Key}&day={day}&hour={hour}&quarterHour={quarterHour}&archiveType={archiveType}
Request parameters
The following table shows the query parameters:
- Required parameters must be used or the call will fail.
- Optional parameters may be used.
Required parameters | Description |
---|---|
| The unique junction id that must be used in the request path. |
| An API Key valid for the requested service. Value: Your valid API Key. |
| Date in the format of 'yyyy-MM-dd'. Date for which you want to receive data |
| Integer in range [0-23] correspond to each hour of day |
Optional parameters | Description |
---|---|
| Integer in range [0-3] correspond to each quarter of hour. If quarter hour is not set than data from whole hour will be returned. |
| One of the values:
Default value: |
Request headers
Header | Value |
---|---|
Content-Type | application/json |
Example Request:
curl -X GET "https://api.tomtom.com/junction-analytics/junctions/1/archive/junction_id/raw-data/arrival-times/hourly?key=key&day=2023-12-17&hour=1&quarterHour=1&archiveType=HISTORICAL"
Json Response
Example response
1{2 "junctionId": "667434251abe777e5702b753",3 "hour": 0,4 "approaches": [5 {6 "approachId": "-1872034020",7 "traces": [8 {9 "arrivals": [10 {11 "name": "350_FT",12 "time": 1729728029300,13 "point": {14 "type": "Point",15 "coordinates": [13.4339111985361, 52.5371087758463]16 },17 "speed": 4118 },19 {20 "name": "40_FT",21 "time": 1729728046400,22 "point": {23 "type": "Point",24 "coordinates": [13.4330950205503, 52.536418975744]25 },26 "speed": 2627 },28 {29 "name": "0_FT",30 "time": 1729728047900,31 "point": {32 "type": "Point",33 "coordinates": [13.43299, 52.53633]34 },35 "speed": 2636 }37 ],38 "entryTime": 1729728007092,39 "hasStops": false,40 "exitId": "-276077211",41 "travelTime": 47799,42 "averageSpeed": 34,43 "numberOfStops": 1,44 "firstStopDistance": 12,45 "controlData": {46 "controlDelay": 21421,47 "approachDelay": 5433,48 "decelerationPointSpeed": 23,49 "accelerationEndpointSpeed": 25,50 "entryDistance": 120,51 "exitDistance": 136,52 "numberOfStops": 1,53 "firstStopDistance": 1254 }55 }56 ]57 }58 ]59}
Response fields
The following section describes all of the fields that can appear in a response.
junctionId
(string) The unique ID of the junction.
hour
(integer) The requested hour of the archive.
approaches[]
(array) Contains junction approaches. Holder for arrival data per approach:
approachId
(string) The approach ID is unique in the junction context.traces[]
(array) Contains traces in the context of the approach.hasStops
(boolean) Indicates if the vehicle stopped at some point along the approach.numberOfStops
(integer) The number of times the vehicle stopped on the approach.firstStopDistance
(integer) The distance from the first stop of the vehicle in the queue to the start of the junction in meters.exitId
(string) The ID of the exit taken by the vehicle from the approach.entryTime
(long) The timestamp when the trace traversed the approach start, in UTC time (milliseconds).averageSpeed
(integer) The average speed of the vehicle on the approach in kilometers/hour.travelTime
(integer) The total time in milliseconds taken by the vehicle to traverse the approach.controlData
controlDelay
(integer) The additional time vehicles experience at intersections due to traffic control devices (e.g., signals, stop signs). It includes time lost in deceleration, stopping, queue move-up, and acceleration. Measured in milliseconds per vehicle, it is a key factor in evaluating intersection efficiency and determining Level of Service (LOS).approachDelay
(integer) The additional time vehicles experience at approaching an intersection due to traffic control devices (e.g., signals, stop signs). It includes time lost in deceleration, stopping, queue move-up, and acceleration. Measured in milliseconds per vehicle, it is a key factor in evaluating intersection efficiency and determining Level of Service (LOS). Unlike control delay, approach delay does not account for travel within or beyond the intersection.decelerationPointSpeed
(integer) The max speed of the vehicle within the control approach.accelerationEndpointSpeed
(integer) The max speed of the vehicle within the control exit.entryDistance
(integer) Entry distance on the control approach, in meters.exitDistance
(integer) Exit distance on the control exit, in meters.numberOfStops
(integer) The number of times the vehicle stopped on the control approach.firstStopDistance
The distance from the first stop of the vehicle in the queue to the start of the junction, in meters.
arrivals[]
(array) Contains arrivals in the context of trace.name
(string) The descriptive name of the point associated with the arrival.time
(long) The timestamp when the trace traversed the point, in UTC time (milliseconds).point
(point) The arrival point. A GeoJSON Feature Point that contains the projection point onto the junction approach. GeoJSON Point specificationspeed
(integer) The speed of the vehicle through the arrival point, in kilometers/hour.
Errors
An error response is returned if there is an error in the supplied parameters or any other internal problem. The error response is generated in the requested format.
Error response codes
The following table gives the HTTP error response codes.
Code | Description |
---|---|
400 | Bad Request Example: Junction 5fd9b98a88a13608d7b5d92c is not yet active, no live data available! |
401 | Unauthorized |
403 | Forbidden |
404 | Not Found
|
Error response field
Field | Description |
---|---|
| Problem description. |
Example error response
1{2 "errorMessage": "Junction of id 5fd8da2b84510126b9d18b0d does not have arrival points."3}