/v1/matrix
Distance/duration matrix
Try it live
10 free calls per day — no sign-up, no API key. Goes through the oanor gateway.
It works. Grab an API key and use it in your project.
Get an API keyCode snippets
curl "https://api.oanor.com/routing-api/v1/matrix" \ -H "x-oanor-key: oanor_test_..."
await fetch("https://api.oanor.com/routing-api/v1/matrix", {
headers: { "x-oanor-key": "oanor_test_..." }
});
$ch = curl_init("https://api.oanor.com/routing-api/v1/matrix");
curl_setopt($ch, CURLOPT_HTTPHEADER, ["x-oanor-key: oanor_test_..."]);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$out = curl_exec($ch);
import requests
requests.get(
"https://api.oanor.com/routing-api/v1/matrix",
headers={"x-oanor-key": "oanor_test_..."}
)
Example response
A real response from this endpoint, captured by the latest health check.
{
"data": {
"count": 3,
"profile": "driving",
"distances_m": [
[
0,
1732.7,
2067.4
],
[
1258.2,
0,
1600.6
],
[
1888.7,
1792.2,
0
]
],
"durations_s": [
[
0,
209.1,
296.7
],
[
127,
0,
264.6
],
[
262.6,
312.6,
0
]
]
},
"meta": {
"timestamp": "2026-05-30T01:47:48.065Z",
"request_id": "9d5e3421-65bb-4355-a56c-5974ec40a7c1"
},
"status": "ok",
"message": "Matrix retrieved successfully",
"success": true
}