provider directions POST /v2/directions/{profile}
@utdk/openrouteservice /v2/directions/{profile}
Compute a route between coordinates
Returns the ordered route, total duration, total distance, and turn-by-turn steps. Use `driving-hgv` for service vans / heavy-goods routing (better bridge-weight and turn-restriction handling than `driving-car`).
profile path required
Routing profile. `driving-hgv` is the right pick for service vans / utility vehicles — it respects bridge weight, low-clearance, and large-vehicle turn restrictions that `driving-car` ignores.
enum: driving-car, driving-hgv, cycling-regular, cycling-mountain…

Try it

Authentication
Configure credentials for OpenRouteService API
Gateway
The gateway proxies requests and injects credentials server-side. Configure credentials above, then enter your gateway URL.

Saved automatically to browser storage.

getdirections
POST/v2/directions/{profile}
Returns the ordered route, total duration, total distance, and turn-by-turn steps. Use `driving-hgv` for service vans / heavy-goods routing (better bridge-weight and turn-restriction handling than `driving-car`).

Parameters

required

Routing profile. `driving-hgv` is the right pick for service vans / utility vehicles — it respects bridge weight, low-clearance, and large-vehicle turn restrictions that `driving-car` ignores.

Input

required

Ordered route waypoints. First is origin, last is destination.

Localisation for textual turn instructions (e.g. `en-AU`).

Per-waypoint snap-radius (m). Use -1 to disable snapping for that point.

Enter a gateway URL above to enable sending.

Code snippet
Updates live as you fill in the form above.

TypeScript

import openrouteservice from '@utdk/openrouteservice';

await openrouteservice.getdirections({
  "units": "m",
  "instructions": true,
  "elevation": false,
  "preference": "fastest"
})