Documentation menu
POST/elevation/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 | A flat 5 calls. Class: standard, or premium for truck and ADR work. Published as unit_rules.elevation_along in /pricing.json. |
| Premium | When the body asks for truck routing: "costing": "truck", a top-level adr object or "hazmat": true |
What it does
Along-route elevation profile endpoint.
An API key, as Authorization: Bearer snk_… or ?api_key=snk_…. Metered. Price: A flat 5 calls.
Call it
curl -fsS -X POST "https://api.mapmap.ai/elevation/along" \
-H "Authorization: Bearer $MAPMAP_KEY" \
-H "Content-Type: application/json" \
-d @request.jsonRequest body
application/json
Along-route elevation profile: a route (geometry_polyline6, or the full route response POST /route returns), and at most one of interval_m (default 100 m) or sample_count
Example: From website/public/docs/analysis.md:1006, with a polyline6 recorded from GET /route/v1 on 2026-11-05
{
"geometry_polyline6": "{swfaBl_yF[gJWuBSsBM_D@sCLuBXyA^}Ap@cBb@aAb@m@^]PGb@CfANnA\\x@\\x@r@~AlCxAh@pAHfAArPsAvBs@`H}BbIwCfLsFnCmAxAsDn@[pAi@~C_BnH}CvM}ElFgBtEsBhHwCtHeCvAa@dBe@xGyBzFeB|@YdEmAdHaBrJaBbCa@`Hg@|AK|Ls@vUqAjBKpIs@vAKdFS~BKtFWpDKbE@|JNdCD`DHfA@hB@fGNvDb@b[hC`GV|BhAzI^|AHh@BpFKbBE~@AnCCfCE`BHtFRD{IBqBFgGSGe@[_@c@We@Se@Qc@Me@Ig@Eg@Cg@Ag@FkGAi@Cc@E_@I]K[K_@I[C[AYRaSBm@Hq@Nm@Ri@Vg@Xa@ZYNG",
"interval_m": 200
}Responses
{samples: [{distance_m, lat, lon, elevation_m, source, resolution_m, grade_percent}], total_distance_m, total_ascent_m, total_descent_m, coverage_fraction, sample_count}. grade_percent on sample i is the percent grade of the segment ending at i (null on sample 0, and whenever either endpoint lacks elevation). total_ascent_m/total_descent_m are null (not 0) when no consecutive pair of samples both have elevation| Field | Type | Required | Description |
|---|---|---|---|
| coverage_fraction | number | no | Share of samples with elevation data, 0 to 1. |
| sample_count | integer | no | Number of samples. |
| samples | object[] | no | Samples at the requested interval: distance_m, lat, lon,
elevation_m, grade_percent and resolution_m. |
| total_ascent_m | number | no | Total climb, metres. |
| total_descent_m | number | no | Total descent, metres. |
| total_distance_m | number | no | Length of the shape, metres. |
Example: Recorded from the hosted gateway on 2026-11-05 with a test key: POST /elevation/along with the request example; lists trimmed to their first items
{
"coverage_fraction": 1,
"sample_count": 6,
"samples": [
{
"distance_m": 0,
"elevation_m": 13.55,
"grade_percent": null,
"lat": 51.507534,
"lon": -0.128007,
"resolution_m": 30,
"source": "mapzen-terrain-tiles"
},
{
"distance_m": 186.9,
"elevation_m": 17.57,
"grade_percent": 2.2,
"lat": 51.50632953536382,
"lon": -0.1271426854452161,
"resolution_m": 30,
"source": "mapzen-terrain-tiles"
}
],
"total_ascent_m": 7.7,
"total_descent_m": 4.1,
"total_distance_m": 934.5
}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
application/problem+json · Problem
request-timeout)application/problem+json · Problem
Error bodies follow the shared problem model documented on API conventions.
Also under Elevation
Generated from https://api.mapmap.ai/openapi.json on 2026-11-12 · operationId post_elevation_along