route_directions
Get turn-by-turn driving, cycling, or walking directions along real roads, with distance, travel time, and route geometry. Plan delivery, service, or commute trips using OpenStreetMap data—no API key needed.
Instructions
Get driving, cycling or walking directions along real roads.
Returns distance, travel time and turn-by-turn instructions using OpenStreetMap road data via Valhalla -- no API key needed.
Use this for anything involving actual travel: delivery and field-service scheduling, ambulance response-time modelling, freight planning with vehicle restrictions, commute estimation, hiking and cycling routes.
For straight-line distance instead, use geom_measure -- it is much cheaper and needs no network. To find everywhere reachable within a time budget rather than the path to one place, use route_isochrone. For travel times between many places at once, use route_matrix rather than calling this repeatedly.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| via | No | Optional intermediate stops, semicolon-separated, visited in the order given. Example: '48.87,2.33; 48.88,2.35' | |
| detail | No | 'summary' returns distance, duration and turn list. 'full' adds the route geometry as GeoJSON, which is much larger. | summary |
| origin | Yes | Start, as coordinates or a place name. | |
| profile | No | Vehicle type. 'truck' respects weight, height, width and hazmat restrictions; 'walk' uses footpaths; 'bicycle' prefers cycleways. | car |
| destination | Yes | End, as coordinates or a place name. | |
| coordinate_format | No | 'grid' adds a USNG/MGRS grid reference to each turn. Useful for crews working from gridded paper maps -- search and rescue, wildland fire, surveying. | decimal |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| end | Yes | ||
| meta | Yes | ||
| start | Yes | ||
| steps | No | ||
| profile | Yes | ||
| provider | Yes | ||
| duration_s | Yes | ||
| distance_km | Yes | ||
| distance_miles | Yes | ||
| duration_display | Yes | ||
| geometry_geojson | No | ||
| geometry_polyline | No | ||
| profile_description | Yes |