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

Junction live data list

Junction live data list

Junction definition details is a REST API endpoint to read dynamic real-time information about a paginated list of junctions. For all these junctions, it contains the dynamic real-time metrics for each junction approach including travel time, delay, stops, queue length, and turn ratios for each exit.

You can obtain the junction live data list by sending a GET request.

GET https://api.tomtom.com/junction-analytics/junctions/1/live-data?key=<apiKey>&page=<page>&size=<size>

Path parameters

There are no path parameters.

Query parameters

ParameterTypeOptionalDefaultDescription

key

String

false

n/a

n/a

page

Int

true

0

n/a

size

Int

true

100

Max: 1000

Headers

HeaderValue

Content-Type

application/json

Example request

The following is an example request:

$ curl '/junction-analytics/junctions/1/live-data?key=<apiKey>&page=<page>&size=<size>' -i -X GET \
    -H 'Content-Type: application/json' \

Response

This response returns the junction live data list. The following table describes all the fields that can appear in a response.

Response fields

FieldTypeOptionalDescription

content[]

Array

true

This is a list of junctions live data.

content[].id

String

false

This is a unique ID of a junction.

content[].message

String

true

This message explains why live data is not available.

content[].approaches[]

Array

true

The array of an approaches live data, if available.

content[].approaches[].id

Int

false

Approach id unique in the junction context

content[].approaches[].travelTimeSec

Int

false

This is the time it takes to travel the full approach. It is updated every minute.

content[].approaches[].freeFlowTravelTimeSec

Int

false

This is the time it takes to travel the full approach without any delays (usually at nights); it is a fixed value from historical data.

content[].approaches[].delaySec

Int

false

Travel time - free flow travel time. This is updated every minute.

content[].approaches[].usualDelaySec

Int

false

This is the usual delay expected at this time of day, on this day of the week (derived using historical data). This is calculated using data from speed profiles, fixed value from historical data.

content[].approaches[].stops

Double

false

This is the average number of stops per vehicle. This is updated every minute.

content[].approaches[].queueLengthMeters

Double

false

This is queue length in case of a longer-lasting congestion. This might be longer than the length of the approach. It is updated every minute.

content[].approaches[].volumePerHour*

Int

false

*Experimental The approximate number of vehicles that have driven through the approach in the last hour.

content[].approaches[].turnRatios[]

Array

false

This is the list of turn ratios for the approach.

content[].approaches[].turnRatios[].exitIndex

Int

false

n/a

content[].approaches[].turnRatios[].ratioPercent

Int

false

These ratios are calculated for the last thirty minutes. Only exits for which traffic has been observed are included in the output. This is updated every minute.

content[].approaches[].turnRatios[].probesCount

Int

false

This is the absolute number of observed probes for this particular approach to exit pass, during last thirty minutes.

pageable

Object

false

This contains information about content page.

pageable.pageNumber

Int

false

This is the number of the current page.

pageable.pageSize

Int

false

This is the size of the current page.

pageable.offset

Int

false

This is the offset of data.

pageable.paged

Boolean

false

This is whether content is paged.

pageable.unpaged

Boolean

false

This is whether content is unpaged.

last

Boolean

false

This is whether the current page is the last page.

totalElements

Int

false

This is the total number of elements.

totalPages

Int

false

This is the number of total pages.

numberOfElements

Int

false

This is the number of elements currently on this page.

first

Boolean

false

This is whether the current page is the first one.

size

Int

false

This is the size of the page.

number

Int

false

This is the number of the current page.

empty

Int

false

This is whether the current page is empty.

Example response

The following is an example response:

HTTP/1.1 200 OK
{
    "content": [
        {
            "id": "5fb7096db0c41e0cf79e90ce",
            "approaches": [
                {
                    "id": -1497841953,
                    "travelTimeSec": 25,
                    "freeFlowTravelTimeSec": 25,
                    "delaySec": 0,
                    "usualDelaySec": 0,
                    "stops": 0.0,
                    "queueLengthMeters": 0.0,
                    "turnRatios": [
                        {
                            "exitIndex": 2,
                            "ratioPercent": 100
                        }
                    ]
                },
                {
                    "id": -531148112,
                    "travelTimeSec": 57,
                    "freeFlowTravelTimeSec": 57,
                    "delaySec": 0,
                    "usualDelaySec": 0,
                    "stops": 0.0,
                    "queueLengthMeters": 0.0,
                    "turnRatios": []
                },
                {
                    "id": -1562006886,
                    "travelTimeSec": 85,
                    "freeFlowTravelTimeSec": 85,
                    "delaySec": 0,
                    "usualDelaySec": -1,
                    "stops": 0.0,
                    "queueLengthMeters": 0.0,
                    "turnRatios": [
                        {
                            "exitIndex": 0,
                            "ratioPercent": 100
                        }
                    ]
                }
            ]
        },
        {
            "id": "5fb70a34b0c41e0cf79e9108",
            "approaches": [
                {
                    "id": -1616034860,
                    "travelTimeSec": 25,
                    "freeFlowTravelTimeSec": 25,
                    "delaySec": 0,
                    "usualDelaySec": -1,
                    "stops": 0.0,
                    "queueLengthMeters": 0.0,
                    "turnRatios": [
                        {
                            "exitIndex": 1,
                            "ratioPercent": 100
                        }
                    ]
                },
                {
                    "id": 1910548253,
                    "travelTimeSec": 22,
                    "freeFlowTravelTimeSec": 22,
                    "delaySec": 0,
                    "usualDelaySec": 0,
                    "stops": 0.0,
                    "queueLengthMeters": 0.0,
                    "turnRatios": [
                        {
                            "exitIndex": 0,
                            "ratioPercent": 100
                        }
                    ]
                }
            ]
        },
        {
            "id": "600012289ffd703722666240",
            "message": "Junction is not active, no live data available!"
        }
    ],
    "pageable": {
        "pageNumber": 0,
        "pageSize": 3,
        "offset": 0,
        "paged": true,
        "unpaged": false
    },
    "last": false,
    "totalElements": 127,
    "totalPages": 43,
    "numberOfElements": 3,
    "first": true,
    "size": 3,
    "number": 0,
    "empty": false
}

Errors

An error response is generated if there is an error in the supplied parameters or there is any other internal problem. The system generates the error response in the requested format.

HTTP error response codes

The following table contains the error response codes:

CodeNameDescriptionExample error message

401

Unauthorized

n/a

n/a

403

Forbidden

n/a

n/a

Error response field

FieldTypeOptionalDescription

errorMessage

String

true

Problem description.

Example error response

{
    "errorMessage": "Junction 5fd9b98a88a13608d7b5d92c is not yet active, no live data available!"
}