route
Plan routes between two or more waypoints with turn-by-turn directions. Choose from car, truck, bicycle, pedestrian, or motor scooter. Returns distance, duration, and step instructions.
Instructions
Get turn-by-turn directions between two or more waypoints.
Returns: { distance_km, duration_sec, legs: [{ steps: [{ instruction, distance_km, duration_sec }] }], geometry (GeoJSON LineString) }.
WAYPOINT ORDER: First element = origin, last = destination. Intermediate elements are via-points in order. TRAVEL MODES: auto (car), truck (HGV — applies weight/height/hazmat restrictions), bicycle, pedestrian, motor_scooter. ETA: duration_sec is road-network travel time under normal conditions. Does not account for live traffic. MULTI-STOP: Add intermediate waypoints for optimized stop sequences.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| waypoints | Yes | Array of {lat, lon} waypoints. First = origin, last = destination. Min 2, max 50. | |
| mode | No | Travel mode. Default: auto (car). Use truck for commercial vehicles with size/weight restrictions. | |
| units | No | Distance units for the response. Default: km. |