Vai al contenuto
GET /v1/route

Driving route between points

Provalo dal vivo

10 chiamate gratuite al giorno — senza registrazione, senza chiave API. Passa dal gateway oanor.

Intestazioni personalizzate (facoltative)
api.oanor.com/routing-api

Funziona. Prendi una chiave API e usala nel tuo progetto.

Ottieni una chiave API

Frammenti di codice

curl "https://api.oanor.com/routing-api/v1/route" \
  -H "x-oanor-key: oanor_test_..."
await fetch("https://api.oanor.com/routing-api/v1/route", {
  headers: { "x-oanor-key": "oanor_test_..." }
});
$ch = curl_init("https://api.oanor.com/routing-api/v1/route");
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/route",
    headers={"x-oanor-key": "oanor_test_..."}
)

Risposta di esempio

Una risposta reale di questo endpoint, acquisita dall'ultimo health check.

{
    "data": {
        "profile": "driving",
        "geometry": {
            "type": "LineString",
            "coordinates": [
                [
                    13.387983,
                    52.517094
                ],
                [
                    13.38576,
                    52.516951
                ],
                [
                    13.385206,
                    52.520105
                ],
                [
                    13.388021,
                    52.521765
                ],
                [
                    13.387228,
                    52.527168
                ],
                [
                    13.393668,
                    52.528491
                ],
                [
                    13.396829,
                    52.52926
                ]
            ]
        },
        "waypoints": [
            {
                "name": "Unter den Linden",
                "location": [
                    13.387983,
                    52.517094
                ]
            },
            {
                "name": "Torstraße",
                "location": [
                    13.396829,
                    52.52926
                ]
            }
        ],
        "distance_m": 2067,
        "duration_s": 297
    },
    "meta": {
        "timestamp": "2026-05-30T01:47:48.888Z",
        "request_id": "e9d58381-5190-4a43-8a06-a8f9700931eb"
    },
    "status": "ok",
    "message": "Route retrieved successfully",
    "success": true
}