maps_directions
Get turn-by-turn directions with multiple travel modes, waypoints, live traffic, and route preferences. Optimize waypoint order or request alternative routes for efficient travel.
Instructions
Compute a route with turn-by-turn steps between two points, with optional waypoints. Supports DRIVE, WALK, BICYCLE, TWO_WHEELER and TRANSIT, live traffic for the motorised modes, toll/highway/ferry avoidance, alternative routes and waypoint order optimisation. Origin, destination and waypoints each accept an address, "latitude,longitude", or "place_id:...". Set include_steps=false when only total time and distance matter.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| units | No | Units in the instructions, default METRIC. | |
| origin | Yes | Start of the route. Address ("Bern main station"), coordinates ("46.9480,7.4474") or a place ID ("place_id:ChIJ..."). | |
| waypoints | No | Optional stops along the way, in order. Each one: Address ("Bern main station"), coordinates ("46.9480,7.4474") or a place ID ("place_id:ChIJ..."). | |
| avoid_tolls | No | Avoid toll roads (motorised modes only). | |
| destination | Yes | End of the route. Address ("Bern main station"), coordinates ("46.9480,7.4474") or a place ID ("place_id:ChIJ..."). | |
| region_code | No | CLDR region code, e.g. "CH". | |
| travel_mode | No | Travel mode, default DRIVE. | |
| alternatives | No | Return alternative routes as well. | |
| arrival_time | No | RFC 3339 UTC arrival timestamp. TRANSIT only, and mutually exclusive with departure_time. | |
| avoid_ferries | No | Avoid ferries (motorised modes only). | |
| include_steps | No | Include turn-by-turn steps, default true. Set false for totals only, which is cheaper. | |
| language_code | No | ISO 639 language code for the instructions, e.g. "de". | |
| transit_modes | No | TRANSIT only, restrict the vehicle types considered. | |
| avoid_highways | No | Avoid highways (motorised modes only). | |
| departure_time | No | RFC 3339 UTC timestamp, e.g. "2026-08-13T07:30:00Z". Must be in the future. | |
| routing_preference | No | Traffic handling for DRIVE and TWO_WHEELER, default TRAFFIC_AWARE. TRAFFIC_AWARE_OPTIMAL is slower and costs more. Ignored for the other modes. | |
| optimize_waypoint_order | No | Let the API reorder the waypoints for the shortest total route. | |
| transit_routing_preference | No | TRANSIT only, what to optimise for. |