Zum Inhalt springen
GET /v1/matrix

Distance/duration matrix

Live testen

10 freie Calls pro Tag — keine Anmeldung, kein API-Key. Geht durchs oanor-Gateway.

Eigene Header (optional)
api.oanor.com/routing-api

Funktioniert. Hol dir einen API-Key und nutze sie in deinem Projekt.

API-Key holen

Code-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_..."}
)

Beispiel-Response

Echte Antwort dieses Endpoints, erfasst beim letzten 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
}