Places along a route
places_along_routeFind stops on the way between two locations, filtering by category or name, and see detour distance and route position for each.
Instructions
Places on the way from A to B: corridor search along the route.
Answers "find a coffee shop on my drive to the airport" — the route tool
plus find_places in one call. Builds the same street-graph shortest path
`route` returns, then finds places whose nearest point on that path is
within max_detour_m (default 1000m, capped at 5000m; larger values
return a bad_request error rather than being silently clamped).
Each result row is a find_places row plus two numbers: detour_m, the
straight-line distance to the route doubled — an approximation of the
round trip off and back on, not a re-routed detour — and along_m, how
far along the route from the origin that place sits, so "roughly
halfway" is answerable. Results are ordered by along_m (route order,
reading as an itinerary) rather than by detour cost. When more than
limit places are on the way, the response is an even sample spanning the
whole route — never just the first limit, which would drop the far end
of the journey — and carries "truncated": true saying so. It also
carries {"route": {"distance_m", "duration_s", "mode"}} for the
underlying route. A composed itinerary also carries
verify_before_going when any stop is low-confidence or listed closed,
naming the 1–2 places most worth checking.
category and name narrow the search exactly as they do in find_places
(category matches Overture's taxonomy, e.g. 'coffee_shop'; name is a
substring match) — worth passing on a long route, since an unfiltered
corridor through a dense area can hold more places than the search
considers, in which case the response carries "truncated": true and a
note saying so.
Omit mode to use the stored preferences mode, else drive. Same cost model
and the same straight-line-distance caps as `route`, and the same
structured errors: route_too_long, no_graph_nearby, no_route,
unsupported_mode, and bad_request for non-finite/out-of-range
coordinates or an invalid max_detour_m.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mode | No | Travel mode. Default: stored preference, else drive. | |
| name | No | ||
| limit | No | ||
| to_lat | Yes | ||
| to_lon | Yes | ||
| category | No | ||
| from_lat | Yes | ||
| from_lon | Yes | ||
| max_detour_m | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||