Optimize stop order
optimize_routeOptimizes the visiting order of a set of stops to minimize total travel distance and time, returning a complete itinerary. Supports car, foot, or bike travel and optional roundtrip routing.
Instructions
Finds the best order to visit a set of stops (traveling-salesman optimization) and returns the optimized itinerary with total distance and time. With roundtrip (default) the tour returns to the first stop; without it the first stop is the start and the last stop the end.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| stops | Yes | ||
| profile | Yes | Travel mode: on foot, by car or by bicycle | |
| language | No | Language for resolved place labels, default "en" | |
| roundtrip | No | Return to the first stop at the end, default true |