Documentation menu
POST/v1/weather/along
Access and price
| Auth | An API key, as Authorization: Bearer snk_… or ?api_key=snk_…. Metered. Needs a full key; a browser (maps) key is refused. |
|---|---|
| Price | 1 call per request. Class: standard, or premium for truck and ADR work. Published as unit_rules.default in /pricing.json. |
| Premium | When the body asks for truck routing: "costing": "truck", a top-level adr object or "hazmat": true |
What it does
Forecast weather along a route, aligned to each point's ETA.
An API key, as Authorization: Bearer snk_… or ?api_key=snk_…. Metered. Price: 1 call per request.
Call it
curl -fsS -X POST "https://api.mapmap.ai/v1/weather/along" \
-H "Authorization: Bearer $MAPMAP_KEY" \
-H "Content-Type: application/json" \
-d '{"shape":"string"}'Request body
application/json · WeatherAlongRequest
Route shape as polyline6, optional depart_at (RFC 3339, default now), optional duration_s (route duration in seconds; omit for a generic average-speed estimate) and optional sample_interval_m (default 25,000, 5,000–100,000)
| Field | Type | Required | Description |
|---|---|---|---|
| depart_at | string | no | Departure time, RFC 3339; defaults to now. |
| duration_s | number | no | Total route duration in seconds, used to compute each sample's ETA
by arc-length fraction. Omit to fall back to a generic
[DEFAULT_AVERAGE_SPEED_KPH] estimate (flagged in the response as
duration_source: "estimated_default_speed"); pass the real value
from /route for accurate alignment. |
| sample_interval_m | number | no | Route-sampling interval in metres; default 25,000, clamped to
5,000–100,000, and the point count is separately capped at
[MAX_SAMPLES]. |
| shape | string | yes | The route shape as a polyline6 string. |
Example: A request assembled from this schema's own field examples, enums, defaults and types; not a recorded call
{
"shape": "string"
}Responses
| Field | Type | Required | Description |
|---|---|---|---|
| attribution | string | no | The credit to show next to the forecast, verbatim. Present when at least one sample carries real data. |
| attribution_url | string | no | Where the credit links (https://open-meteo.com/): Open-Meteo's
licence asks for a link next to any place its data is displayed.
Present exactly when attribution is. |
| depart_at | string | yes | The departure time actually used (RFC 3339 UTC). |
| derived_fields | string[] | no | The sample fields MapMap derives rather than reads from Open-Meteo
(precipitation_type from rain and snowfall, severe from the WMO
code), so a display can indicate the changes the licence asks to
be indicated. Present exactly when attribution is. |
| duration_s | number | yes | The route duration actually used, seconds. |
| duration_source | string | yes | provided | estimated_default_speed, see [DurationSource]. |
| licence_url | string | no | The data licence to link with the credit (CC BY 4.0). Present
exactly when attribution is. |
| sample_interval_m | number | yes | The sampling interval actually used, metres (after clamping/the
[MAX_SAMPLES] cap, may be coarser than requested on a long
route). |
| samples | WeatherSample[] | yes | Route samples, arc_m ascending. |
Example: A response assembled from this schema's own field examples, enums, defaults and types; not a recorded call
{
"depart_at": "string",
"duration_s": 0,
"duration_source": "string",
"sample_interval_m": 0,
"samples": [
{
"arc_m": 0,
"available": false,
"eta": "string",
"lat": 0,
"lon": 0
}
]
}application/problem+json · Problem
unauthorized); the body carries signup, docs and a one-call hint for a free keyapplication/problem+json · Problem
X-PAYMENT). Not problem+jsonapplication/json · X402PaymentRequired
scope-insufficient), a request from an origin the key does not allow (origin-not-allowed), or an account restriction (forbidden)application/problem+json · Problem
text/plain
rate-limited, with Retry-After), or monthly quota exhausted with no payment path (quota-exceeded)application/problem+json · Problem
application/problem+json · Problem
request-timeout)application/problem+json · Problem
Error bodies follow the shared problem model documented on API conventions.
Also under Weather
Generated from https://api.mapmap.ai/openapi.json on 2026-11-12 · operationId post_weather_along