Skip to content
Documentation menu
docs / api / post-v1-weather-along
Weather

POST/v1/weather/along

Access and price

AuthAn API key, as Authorization: Bearer snk_… or ?api_key=snk_…. Metered. Needs a full key; a browser (maps) key is refused.
Price1 call per request. Class: standard, or premium for truck and ADR work. Published as unit_rules.default in /pricing.json.
PremiumWhen 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

bash
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)

FieldTypeRequiredDescription
depart_atstringnoDeparture time, RFC 3339; defaults to now.
duration_snumbernoTotal 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_mnumbernoRoute-sampling interval in metres; default 25,000, clamped to 5,000–100,000, and the point count is separately capped at [MAX_SAMPLES].
shapestringyesThe 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

json
{
  "shape": "string"
}

Responses

200Per-sample weather aligned to each point's estimated time of arrival
FieldTypeRequiredDescription
attributionstringnoThe credit to show next to the forecast, verbatim. Present when at least one sample carries real data.
attribution_urlstringnoWhere 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_atstringyesThe departure time actually used (RFC 3339 UTC).
derived_fieldsstring[]noThe 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_snumberyesThe route duration actually used, seconds.
duration_sourcestringyesprovided | estimated_default_speed, see [DurationSource].
licence_urlstringnoThe data licence to link with the credit (CC BY 4.0). Present exactly when attribution is.
sample_interval_mnumberyesThe sampling interval actually used, metres (after clamping/the [MAX_SAMPLES] cap, may be coarser than requested on a long route).
samplesWeatherSample[]yesRoute samples, arc_m ascending.

Example: A response assembled from this schema's own field examples, enums, defaults and types; not a recorded call

json
{
  "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
    }
  ]
}
400Invalid request

application/problem+json · Problem

401Missing or invalid API key. Also: No key, or a missing, malformed, unknown, revoked or expired one (unauthorized); the body carries signup, docs and a one-call hint for a free key

application/problem+json · Problem

402Beyond the included volume with no way to pay this call: an x402 body naming how to pay (provisional key past its allowance, prepaid balance below the price, or a rejected X-PAYMENT). Not problem+json

application/json · X402PaymentRequired

403The key may not call this: a browser key outside its scope (scope-insufficient), a request from an origin the key does not allow (origin-not-allowed), or an account restriction (forbidden)

application/problem+json · Problem

413The request declares a body larger than 1048576 bytes (plain text, not problem+json)

text/plain

429Quota or rate limit exceeded. Also: Per-key rate limit (rate-limited, with Retry-After), or monthly quota exhausted with no payment path (quota-exceeded)

application/problem+json · Problem

501Weather-along-route is not enabled (SN_OPEN_METEO_URL unset)

application/problem+json · Problem

504The request did not finish within the gateway's request deadline (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