Skip to content
TarekyDocs
Console

Public API: durations/distances between many points (metered)

GET
/v1/matrix/{profile}/{coordinates}
curl --request GET \
--url 'https://api.tareky.com/v1/matrix/driving/example?steps=true&geometries=polyline&overview=simplified&continue_straight=default&roundtrip=true&source=any&destination=any' \
--header 'Authorization: Bearer <token>'
profile
required
string
Allowed values: driving walking
coordinates
required
string
alternatives
string

True, false, or a number of alternatives (directions)

steps
string
Allowed values: true false

Turn-by-turn steps (directions, match, optimize)

geometries
string
Allowed values: polyline polyline6 geojson
overview
string
Allowed values: simplified full false
annotations
string

True, or a comma list of duration,distance,speed,nodes

continue_straight
string
Allowed values: default true false
bearings
string

{bearing},{range};… one per coordinate

approaches
string

Curb or unrestricted, ; separated

exclude
string

E.g. motorway, toll, ferry

sources
string

Matrix: indexes of the origin coordinates, ; separated

destinations
string

Matrix: indexes of the destination coordinates

roundtrip
string
Allowed values: true false

Optimize

source
string
Allowed values: any first

Optimize

destination
string
Allowed values: any last

Optimize

radiuses
string

Snap radius in metres per coordinate, ; separated (default 5000)

x-access-key-id
string

Legacy key id (until its sunset)

Media typeapplication/json
object
code
required

“Ok” on success

string
durations

Seconds, sources x destinations; present unless annotations leaves out duration

Array<Array<number | null>>
distances

Metres, sources x destinations; only when annotations asks for distance

Array<Array<number | null>>
sources
required
Array<object>
object
name
required

Name of the street the coordinate snapped to

string
location
required

[lng, lat]

array
>= 2 items <= 2 items
distance
required

Metres from the input coordinate to the snapped one

number
hint

Omitted with generate_hints=false

string
key
additional properties
destinations
required
Array<object>
object
name
required

Name of the street the coordinate snapped to

string
location
required

[lng, lat]

array
>= 2 items <= 2 items
distance
required

Metres from the input coordinate to the snapped one

number
hint

Omitted with generate_hints=false

string
key
additional properties
key
additional properties
any
Examplegenerated
{
"code": "example",
"durations": [
[
1
]
],
"distances": [
[
1
]
],
"sources": [
{
"name": "example",
"location": [
"example"
],
"distance": 1,
"hint": "example"
}
],
"destinations": [
{
"name": "example",
"location": [
"example"
],
"distance": 1,
"hint": "example"
}
]
}

Rate limit or monthly quota exceeded; see Retry-After

Media typeapplication/json
object
error
required
object
code
required

Stable machine-readable code, e.g. quota_exceeded, no_route

string
message
required
string
status
required
integer
>= -9007199254740991 <= 9007199254740991
details

For invalid_request: the validation issues

docsUrl
required
string
requestId
string
Examplegenerated
{
"error": {
"code": "example",
"message": "example",
"status": 1,
"details": "example",
"docsUrl": "example"
},
"requestId": "example"
}

Any other error, in the /v1 error envelope

Media typeapplication/json
object
error
required
object
code
required

Stable machine-readable code, e.g. quota_exceeded, no_route

string
message
required
string
status
required
integer
>= -9007199254740991 <= 9007199254740991
details

For invalid_request: the validation issues

docsUrl
required
string
requestId
string
Examplegenerated
{
"error": {
"code": "example",
"message": "example",
"status": 1,
"details": "example",
"docsUrl": "example"
},
"requestId": "example"
}