Skip to content
Documentation menu
docs / api / post-elevation
Elevation

POST/elevation

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 started block of 25 points. Class: standard, or premium for truck and ADR work. Published as unit_rules.elevation in /pricing.json.
PremiumWhen the body asks for truck routing: "costing": "truck", a top-level adr object or "hazmat": true

What it does

Point-elevation endpoint.

An API key, as Authorization: Bearer snk_… or ?api_key=snk_…. Metered. Price: 1 call per started block of 25 points.

Call it

bash
curl -fsS -X POST "https://api.mapmap.ai/elevation" \
  -H "Authorization: Bearer $MAPMAP_KEY" \
  -H "Content-Type: application/json" \
  -d '{"points":[{"lat":54.4542,"lon":-3.2116},{"lat":51.5074,"lon":-0.1278}]}'

Request body

application/json

{"points": [{"lat", "lon"}, …]}, at most 500 points

Example: From website/public/docs/analysis.md:964

json
{
  "points": [
    {
      "lat": 54.4542,
      "lon": -3.2116
    },
    {
      "lat": 51.5074,
      "lon": -0.1278
    }
  ]
}

Responses

200{"results": [{"lat", "lon", "elevation_m", "source", "resolution_m"}, …]}, one entry per input point in order; elevation_m/source/resolution_m are null together wherever the engine has no DEM coverage
FieldTypeRequiredDescription
resultsobject[]noOne entry per point, in input order: lat, lon, elevation_m (null outside coverage), resolution_m and source.

Example: Recorded from the hosted gateway on 2026-11-05 with a test key: POST /elevation, Trafalgar Square and Brighton; lists trimmed to their first items

json
{
  "results": [
    {
      "elevation_m": 14.46,
      "lat": 51.508,
      "lon": -0.1281,
      "resolution_m": 30,
      "source": "mapzen-terrain-tiles"
    },
    {
      "elevation_m": 45.4,
      "lat": 50.829,
      "lon": -0.141,
      "resolution_m": 30,
      "source": "mapzen-terrain-tiles"
    }
  ]
}
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

501Elevation not enabled on this deployment (SN_ELEVATION_ENABLED unset; the hosted gateway sets it true; this is a self-hosting gate for a Valhalla with no DEM tiles staged)

application/problem+json · Problem

502Upstream routing engine failed

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 Elevation

Generated from https://api.mapmap.ai/openapi.json on 2026-11-12 · operationId post_elevation