O/D Analysis

Analysis Trips Result

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

Get the full trips result by sending a GET request.

Request data

HTTPS Method: GET

For ease of viewing and identification:

  • 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.

Format

get
URL request format
https://api.tomtom.com/origindestination/1/analysis/flowmatrix/{id}/result/trips?key={Your_API_Key}&dateRange={dateRange}&timeRange={timeRange}

Example

get
URL request example
https://api.tomtom.com/origindestination/1/analysis/flowmatrix/123/result/trips?key={Your_API_Key}&dateRange=0&timeRange=0

Request parameters

Required parameters

Description

id
integer

Analysis number id.


Value: The analysis number id.

key
string

Authorization key for access to the API.


Value: Your valid API Key.

dateRange
integer

Index of the date range.


Value: Example: 0

timeRange
integer

Index of the time range.


Value: Example: 0

Optional parameters

Description

excludeSameODTrips
boolean

Drops every link whose origin equals its destination, that is the internal traffic of a region.


Default value: false

Response data

This response will return information about all linked connections. The result is available once the analysis reaches the ACCEPTED status, and it is served as a file attachment named trips_{dateRange}_{timeRange}-v2.json.

Response structure

Field

Description

links
array

An array of links between regions.


Value: See the following example.

Each link’s origin and destination are always real region indices: an end that falls outside your regions is attributed to the boundary region the trip actually used, the first region it entered for the origin and the last region it left for the destination.

externalEndsCode

Value

Meaning

0

Both ends of the trip are inside the regions.

1

The trip started outside and ended inside the regions.

2

The trip started inside and ended outside the regions.

3

Both ends of the trip are outside the regions.

Result interpretation example

A link has five positions: [origin, destination, via, externalEndsCode, normalized trip count].

get
Response body
{
"links": [
[0, 0, 0, 0, 33.6],
[0, 0, 0, 1, 18.7],
[0, 1, 1, 2, 2.8],
[1, 0, 1, 1, 3.2],
[1, 1, 1, 3, 6.6]
]
}

Five rows of an analysis of two regions, where index 0 and 1 follow the order of the regions list of the creation request.

  • [0, 0, 0, 0, 33.6] - trips that both started and ended inside region 0.
  • [0, 0, 0, 1, 18.7] - the same origin and destination, but the trip started outside the defined regions and entered the analysis area through region 0. Only the last position differs from the row above, so externalEndsCode is what separates them.
  • [0, 1, 1, 2, 2.8] - from region 0 to region 1, ending outside the defined regions, leaving the analysis area through region 1.
  • [1, 0, 1, 1, 3.2] - here via is not the destination, so this row belongs to the drill-down rather than to the origin-destination view.
  • [1, 1, 1, 3, 6.6] - both ends outside the defined regions; the trip only passed through region 1.

An empty result is {"links":[]}.

Reading the normalized trip count

The last position of a link is the normalized trip count for this date range and time range, described at Normalized probe counts. A trip counts once towards that total, no matter how many links it appears in.

  • The links whose via equals their destination are the origin-destination view of the analysis. Their normalized values add up to about 100.
  • Every other link is part of a drill-down by via region. Adding those values up gives more than 100, because a trip that passed through three regions is present in three links.
  • Normalized values of two different results - a different dateRange or timeRange - have different denominators and must not be added together.

Region indices follow the order of the regions list of the creation request.

Errors

If there is an error in the supplied parameters or any other internal problem, an error response is generated in the requested format.

Response codes

Code

Meaning & possible causes

200

OK

400

Bad request

401

Unauthorized

403

Forbidden

404

Not Found