WayMatrix Developer Portal
  • Getting started
  • API reference
Information
Matrix
    Travel-time and distance matrixpostTravel-time and distance matrix (explicit JSON form)post
Directions
    Route between two pointsgetRoute with full optionspostRoute, JSON formpostRoute, GeoJSON formpostRoute, GPX formpost
Isochrones
    Reachability polygonspostReachability polygons (explicit GeoJSON form)post
Service
    LivenessgetLiveness, headers onlyheadEngine and graph provenancegetEngine and graph provenance, headers onlyhead
Schemas
powered by Zuplo
WayMatrix Routing API
WayMatrix Routing API

Matrix

Travel-time and distance matrices. The headline capability.


Travel-time and distance matrix

POST
https://routing-api-main-d2f2b11.zuplo.app
/v2/matrix/{profile}

Computes durations and/or distances between every source and every destination.

Cost: |sources| x |destinations| elements. Omitting sources or destinations selects every location, so a request with n locations and neither field costs n². The literal selector ["all"] means the same thing.

Maximum size: 90,000 elements per request (300 x 300) on current plans. The engine behind this API refuses more than 100,000; requests above your plan's limit are refused here, before any work is done, with the same error the engine would have given.

Travel-time and distance matrix › path Parameters

profile
​string · required

The routing profile. driving-car is the only profile served. Any other value returns the engine's own error, the same one hosted openrouteservice returns for a profile it does not carry.

Example: driving-car

Travel-time and distance matrix › Headers

Authorization
​string · required

The Authorization header is used to authenticate with the API using your API key. Value is of the format Bearer YOUR_KEY_HERE.

Travel-time and distance matrix › Request Body

MatrixRequest
locations
​Coordinate[] · required

The points the matrix is computed over. At least two.

sources
​(integer | string)[]

Indices into locations to use as sources. Omit, or send ["all"], for every location. This field is half of what the request costs.

destinations
​(integer | string)[]

Indices into locations to use as destinations. Omit, or send ["all"], for every location. This field is the other half of what the request costs.

metrics
​string[]

Which matrices to return. Defaults to durations only.

Enum values:
duration
distance
resolve_locations
​boolean

Return the name of the nearest road for each snapped point.

units
​string · enum

Units for the distance matrix. Durations are always seconds.

Enum values:
m
km
mi
id
​string

An arbitrary identifier echoed back in the response metadata.

Travel-time and distance matrix › Responses

The computed matrix.

MatrixResponse
durations
​array[]

Travel times in seconds, as rows of sources by columns of destinations. A null entry means no route was found between that pair.

distances
​array[]

Distances, present only when requested via metrics.

​SnappedPoint[]
​SnappedPoint[]
​Metadata

The engine's metadata block, passed through unchanged, plus our added element count.

POST/v2/matrix/{profile}
curl https://routing-api-main-d2f2b11.zuplo.app/v2/matrix/:profile \ --request POST \ --header 'Content-Type: application/json' \ --header 'Authorization: Bearer <token>' \ --data '{ "locations": [ { "0": -87.6298, "1": 41.8781 }, { "0": -87.6244, "1": 41.8796 }, { "0": -87.6722, "1": 41.9227 } ], "metrics": [ "duration", "distance" ], "units": "km" }'
Example Request Body
{ "locations": [ { "0": -87.6298, "1": 41.8781 }, { "0": -87.6244, "1": 41.8796 }, { "0": -87.6722, "1": 41.9227 } ], "metrics": [ "duration", "distance" ], "units": "km" }
json
application/json
Example Responses
{ "durations": [ { "0": 0, "1": 421.3, "2": 782.6 }, { "0": 402.9, "1": 0, "2": 897.4 }, { "0": 768.1, "1": 881.5, "2": 0 } ], "distances": [ { "0": 0, "1": 2.61, "2": 6.42 }, { "0": 2.68, "1": 0, "2": 8.13 }, { "0": 6.35, "1": 8.21, "2": 0 } ], "sources": [ { "location": [ -87.6298, 41.8781 ], "snapped_distance": 4.31 }, { "location": [ -87.6244, 41.8796 ], "snapped_distance": 11.82 }, { "location": [ -87.6722, 41.9227 ], "snapped_distance": 6.09 } ], "destinations": [ { "location": [ -87.6298, 41.8781 ], "snapped_distance": 4.31 }, { "location": [ -87.6244, 41.8796 ], "snapped_distance": 11.82 }, { "location": [ -87.6722, 41.9227 ], "snapped_distance": 6.09 } ], "metadata": { "attribution": "© openrouteservice by HeiGIT | Data from OpenStreetMap", "service": "matrix", "timestamp": 1788412800000, "query": { "locations": [ { "0": -87.6298, "1": 41.8781 }, { "0": -87.6244, "1": 41.8796 }, { "0": -87.6722, "1": 41.9227 } ], "metrics": [ "duration", "distance" ], "units": "km", "profile": "driving-car" }, "engine": { "version": "9.10.0", "build_date": "2026-07-28T00:00:00Z", "graph_date": "2026-07-31T00:00:00Z", "osm_date": "2026-07-30T00:00:00Z" }, "element_count": 9 } }
json
application/json

Travel-time and distance matrix (explicit JSON form)

POST
https://routing-api-main-d2f2b11.zuplo.app
/v2/matrix/{profile}/json

Identical to POST /v2/matrix/{profile}. This is the path openrouteservice-py sends, so it exists for the same reason the bare path does: a client library already uses it.

Travel-time and distance matrix (explicit JSON form) › path Parameters

profile
​string · required

The routing profile. driving-car is the only profile served. Any other value returns the engine's own error, the same one hosted openrouteservice returns for a profile it does not carry.

Example: driving-car

Travel-time and distance matrix (explicit JSON form) › Headers

Authorization
​string · required

The Authorization header is used to authenticate with the API using your API key. Value is of the format Bearer YOUR_KEY_HERE.

Travel-time and distance matrix (explicit JSON form) › Request Body

MatrixRequest
locations
​Coordinate[] · required

The points the matrix is computed over. At least two.

sources
​(integer | string)[]

Indices into locations to use as sources. Omit, or send ["all"], for every location. This field is half of what the request costs.

destinations
​(integer | string)[]

Indices into locations to use as destinations. Omit, or send ["all"], for every location. This field is the other half of what the request costs.

metrics
​string[]

Which matrices to return. Defaults to durations only.

Enum values:
duration
distance
resolve_locations
​boolean

Return the name of the nearest road for each snapped point.

units
​string · enum

Units for the distance matrix. Durations are always seconds.

Enum values:
m
km
mi
id
​string

An arbitrary identifier echoed back in the response metadata.

Travel-time and distance matrix (explicit JSON form) › Responses

The computed matrix.

MatrixResponse
durations
​array[]

Travel times in seconds, as rows of sources by columns of destinations. A null entry means no route was found between that pair.

distances
​array[]

Distances, present only when requested via metrics.

​SnappedPoint[]
​SnappedPoint[]
​Metadata

The engine's metadata block, passed through unchanged, plus our added element count.

POST/v2/matrix/{profile}/json
curl https://routing-api-main-d2f2b11.zuplo.app/v2/matrix/:profile/json \ --request POST \ --header 'Content-Type: application/json' \ --header 'Authorization: Bearer <token>' \ --data '{ "locations": [ { "0": -87.6298, "1": 41.8781 }, { "0": -87.6244, "1": 41.8796 }, { "0": -87.6722, "1": 41.9227 } ], "metrics": [ "duration", "distance" ], "units": "km" }'
Example Request Body
{ "locations": [ { "0": -87.6298, "1": 41.8781 }, { "0": -87.6244, "1": 41.8796 }, { "0": -87.6722, "1": 41.9227 } ], "metrics": [ "duration", "distance" ], "units": "km" }
json
application/json
Example Responses
{ "durations": [ [ 0 ] ], "distances": [ [ 0 ] ], "sources": [ { "location": { "0": -87.6298, "1": 41.8781 }, "snapped_distance": 0, "name": "name" } ], "destinations": [ { "location": { "0": -87.6298, "1": 41.8781 }, "snapped_distance": 0, "name": "name" } ], "metadata": { "attribution": "© openrouteservice by HeiGIT | Data from OpenStreetMap", "service": "service", "timestamp": 0, "query": {}, "engine": { "version": "version", "build_date": "build_date", "graph_date": "graph_date", "osm_date": "osm_date" }, "element_count": 0 } }
json
application/json

Directions