Documentation menu
GET/directions-matrix/v1/{user}/{profile}/{coordinates}
Access and price
| Auth | An API key, as Authorization: Bearer snk_…, ?api_key=snk_… or ?access_token=snk_…. Metered. Needs a full key; a browser (maps) key is refused. |
|---|---|
| Price | 1 call per started block of 25 elements (sources × targets), at most 10000 elements per request. Class: standard, or premium for truck and ADR work. Published as unit_rules.matrix in /pricing.json. |
| Premium | For the truck profile |
What it does
Mapbox-compatible Matrix.
An API key, as Authorization: Bearer snk_…, ?api_key=snk_… or ?access_token=snk_…. Metered. Price: 1 call per started block of 25 elements (sources × targets), at most 10000 elements per request.
Call it
curl -fsS -X GET "https://api.mapmap.ai/directions-matrix/v1/{user}/{profile}/{coordinates}" \
-H "Authorization: Bearer $MAPMAP_KEY"Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| user | path | string | yes | mapbox or mapmap |
| profile | path | string | yes | driving, driving-traffic (served as driving), walking, cycling or truck (premium) |
| coordinates | path | string | yes | lon,lat pairs separated by ; |
| access_token | query | string | no | Your MapMap key (snk_...) |
| sources | query | string | no | ;-separated coordinate indices, or all (default) |
| destinations | query | string | no | ;-separated coordinate indices, or all (default) |
| annotations | query | string | no | duration (default), distance, or both comma-separated |
| depart_at | query | string | no | Local departure time, YYYY-MM-DDThh:mm |
Responses
{code, durations, distances?, sources, destinations}; waypoints carry the input coordinate and an empty name (the engine reports no snapped position). Metered as POST /matrix: one unit per started block of 25 elements| Field | Type | Required | Description |
|---|---|---|---|
| code | string | no | Ok, or a Mapbox error code. |
| destinations | object[] | no | The snapped destinations: location and name. |
| distances | number[][] | no | Metres, distances[source][destination], when asked for. |
| durations | number[][] | no | Seconds, durations[source][destination]. |
| eta_calibration | object | no | The typical-delay calibration applied to the durations, with the
engine's own in engine_durations. A MapMap addition. |
| sources | object[] | no | The snapped sources: location and name. |
Example: Recorded from the hosted gateway on 2026-11-05 with a test key: GET /directions-matrix/v1/mapbox/driving/-0.1410,50.8290;-0.1370,50.8220;-0.1530,50.8270?sources=0&destinations=1;2&annotations=duration,distance; lists trimmed to their first items
{
"code": "Ok",
"destinations": [
{
"location": [
-0.137,
50.822
],
"name": ""
},
{
"location": [
-0.153,
50.827
],
"name": ""
}
],
"distances": [
[
1193,
1696
]
],
"durations": [
[
274.836,
372.253
]
],
"eta_calibration": {
"applied": true,
"cells_calibrated": 2,
"cells_not_walked": 0,
"cells_unchanged": 0,
"engine_durations": [
[
226,
301
]
],
"method": "gb_typical_delay_v1",
"note": "Local roads in Great Britain carry no live traffic data, so the time on them includes the junction and congestion delay a typical car meets at this time of day, from Department for Transport statistics, on top of the routing engine's free-flowing time: the same delay POST /route adds, applied to the path each cell was costed on. It is a typical figure, not live traffic. Motorways, roads covered by National Highways traffic data and roads outside Great Britain keep the engine's own time. engine_durations holds the engine's own times.",
"period": "all_day",
"sources": [
"Department for Transport, tables CGN0503 and CGN0504: average speed and delay on local 'A' roads in England, urban and rural, by time of day, rolling year to June 2026"
]
},
"sources": [
{
"location": [
-0.141,
50.829
],
"name": ""
}
]
}{code, message} for a malformed or unsupported option, not billedapplication/json
unauthorized); the body carries signup, docs and a one-call hint for a free keyapplication/problem+json · Problem
X-PAYMENT). Not problem+jsonapplication/json · X402PaymentRequired
scope-insufficient), a request from an origin the key does not allow (origin-not-allowed), or an account restriction (forbidden)application/problem+json · Problem
ProfileNotFoundapplication/json
application/json
rate-limited, with Retry-After), or monthly quota exhausted with no payment path (quota-exceeded)application/problem+json · Problem
request-timeout)application/problem+json · Problem
Error bodies follow the shared problem model documented on API conventions.
Also under Mapbox-compatible paths
Generated from https://api.mapmap.ai/openapi.json on 2026-11-12 · operationId get_matrix