search_along_route
Find places (POIs) along a route with the REAL extra travel time of stopping at each — never a straight-line guess. Provide origin + destination (a route is computed) or an existing route's geometry_polyline6, plus a free-text query ("coffee", "EV charger", "truck stop") and max_detour_minutes (default 10). For a category intent ("fuel", "EV charger", "coffee") pass category instead of relying on words alone: it takes the same vocabulary as nearby_places (lowercased OSM tag values such as "fuel", "cafe", "charging_station", "parking", "pharmacy"), and common colloquial phrases are normalised server-side ("petrol station" and "gas station" to fuel, "coffee" to cafe, "EV charger" to charging_station). query alone also promotes a pure category phrase to the same browse, so "fuel" finds fuel stations rather than places whose NAME starts "Ful"; anything else stays free-text name matching. When a browse ran, the response echoes the tokens used in matched_categories. Candidates near the route corridor are priced through the routing engine with your costing: detour = (origin→place) + (place→destination) − (origin→destination). Costing "auto", "truck" (with a truck profile the detours respect dimensional/ADR restrictions), "bicycle", "pedestrian" or "motor_scooter". Returns results sorted by detour with detour_minutes, detour_km, along_route_position (0-1) and off_route_m; at most 25 candidates are priced per call (candidate_cap).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes | Free-text POI query, e.g. "coffee", "EV charger", "truck stop". | |
| truck | No | Truck profile (dimensions + ADR declaration). Requires costing "truck"; the detours then respect dimensional/ADR restrictions. | |
| origin | No | Route origin (with `destination`, when no geometry is given). | |
| costing | No | Costing model for the route and detour matrix: "auto" (default), "truck", "bicycle", "pedestrian" or "motor_scooter". | auto |
| category | No | Explicit place category ("fuel", "cafe", "charging_station" — same vocabulary as nearby_places). Colloquial phrases are normalised server-side; prefer this over query for category intents. | |
| destination | No | Route destination. | |
| max_results | No | Maximum results (default 5, at most 25). | |
| geometry_polyline6 | No | An existing route geometry as an encoded polyline6 (the `route` tool's `geometry_polyline6`). Provide either this or `origin` + `destination`, not both. | |
| max_detour_minutes | No | Largest acceptable detour in minutes (default 10, at most 120). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes | The query as interpreted. | |
| costing | Yes | The costing the detours were priced with. | |
| results | Yes | Places within the detour budget, cheapest detour first. | |
| candidate_cap | Yes | The matrix fan-out cap in force. | |
| route_length_m | Yes | Length of the route geometry in metres. | |
| fuel_attribution | No | Attribution string for fuel-price data sources, present only when at least one returned result carries `fuel_prices` (gateway-preferred mode with `SN_FUEL_PRICES` configured; see [`AlongRouteHit`]). | |
| route_distance_m | No | Direct origin→destination distance in metres. | |
| route_duration_s | No | Direct origin→destination travel time in seconds (same estimator as the detour legs), when routable. | |
| candidates_costed | Yes | Candidates actually priced through the engine (fan-out is capped at `candidate_cap` nearest-to-route). | |
| matched_categories | No | The normalised category tokens the candidates were browsed by, present only when a category browse actually ran (an explicit `category`, or a query the server promoted to one). Absent means free-text name matching answered the call, so a caller can tell how its words were understood rather than inferring it from the results. | |
| max_detour_minutes | Yes | The detour budget applied, minutes. | |
| candidates_considered | Yes | Candidates found near the corridor before pricing. |