---
title: "Along-route search endpoint (see module docs)."
method: POST
path: "/route/along"
tags: ["routing"]
---

# Along-route search endpoint (see module docs).

`POST /route/along`

## Request

- Base URL: `https://api.mapmap.ai`
- URL: `https://api.mapmap.ai/route/along`
- Auth: one of:
  - HTTP bearer
  - API key in query parameter `api_key`

## Request body

- object

## Response `200`

Places along the route, each with its honest engine-computed detour: `{query, source, costing, route, max_detour_minutes, candidates: {considered, costed, cap}, results[]: {place, detour_minutes, detour_km, along_route_position, off_route_m}}`, sorted by detour. When the geocode source browsed the first-party index by category (an explicit `category`, or a `query` that is entirely category phrases (`fuel`, `petrol station`, `coffee near me`), which promotes automatically), the response also carries `matched_categories` naming the normalised tokens browsed. With the fuel-price store configured (SN_FUEL_PRICES), fuel-station results also carry `fuel_prices`, `fuel_brand` and `fuel_updated_at`, and the response a `fuel_attribution` string

- object

## Other responses

- `400`: Invalid request
- `401`: Missing or invalid API key
- `404`: `source: "places"` on a gateway without customer places
- `429`: Quota or rate limit exceeded
- `501`: `source: "geocode"` on a gateway without a geocoder (SN_PHOTON_URL unset), or an explicit `category` on a gateway without the first-party geocode index (SN_GEOCODE_DIR unset; `urn:sn-gateway:problem:reverse-filtering-not-enabled`, the same feature-detect status `GET /geocode/reverse` uses for its first-party-only filters). A category *promoted* from the query degrades to free-text search instead of failing
- `502`: Upstream routing engine or geocoder failed

---

[API](https://skmtc.dev/mapmap/apis/sn-gateway.md) · [All operations](https://skmtc.dev/mapmap/apis/sn-gateway/llms.txt) · [OpenAPI document](https://skmtc.dev/mapmap/apis/sn-gateway/revisions/2293be8b4c38?raw)
