---
title: "Cheapest fuel along a route (see module docs)."
method: POST
path: "/v1/fuel/along"
tags: ["routing"]
---

# Cheapest fuel along a route (see module docs).

`POST /v1/fuel/along`

## Request

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

## Request body

- object

## Response `200`

Stations selling the requested fuel within the detour budget, freshest-priced first and cheapest within that: `{fuel, costing, route: {duration_s, distance_m, length_m, detour_baseline_s, detour_baseline_m}, max_detour_minutes, candidates: {considered, costed, cap, selection}, coverage: {stations, countries, sources}, note (only when results is empty, naming which of the several causes applies), baseline: {<currency>: {value, station_id, brand, name, updated_at}}, results[]: {station_id, source, brand, name, lat, lon, price: {value, currency, updated_at, fetched_at}, stale, detour_minutes, detour_km, along_route_position, off_route_m, saving_per_litre, saving_total}, say, fuel_attribution}. `route.duration_s`/`distance_m` are the path search's own figures, the same journey POST /route answers; `detour_baseline_*` is the matrix leg every detour is computed against. The 25 costed candidates are those nearest the route by the straight-line detour bound (`candidates.selection`), and the baseline is a station that passed the detour filter, so a saving is never quoted against one the results could not contain. `say` is the whole answer as one short spoken line, present on every response including an empty one. Detours are engine-computed, never crow-flies. `stale` is true unless BOTH the price's own `updated_at` and the snapshot's fetch time are within 24 hours; a stale price is ranked after every fresh one, is never the `baseline`, and carries no `saving_per_litre`

- object

## Other responses

- `400`: Invalid request
- `401`: Missing or invalid API key
- `429`: Quota or rate limit exceeded
- `501`: The fuel-price dataset is not enabled (SN_FUEL_PRICES unset)
- `502`: Upstream routing engine 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)
