---
title: "Elevation along points or a route."
method: POST
path: "/elevation/v1"
tags: ["Routing"]
---

# Elevation along points or a route.

`POST /elevation/v1`

## Request

- Base URL: `https://api.rijwind.com`
- URL: `https://api.rijwind.com/elevation/v1`
- Auth: HTTP bearer

Look up ground elevation for discrete points or along a route. For a route, send the geometry as an `encodedPolyline` and the server resamples it to `samples` evenly-spaced points — ideal for building an elevation profile from a GPS track without sending every point.

**Quota cost:** 1 unit per call. The `points` array is capped at 512; for a longer track use `encodedPolyline` (resampled to at most 1000 points).

## Request body

- ElevationRequest: Elevation lookup. Provide either `points` (discrete coordinates) or `encodedPolyline` (a route, resampled server-side) — exactly one is required.
  - `encodedPolyline` string, nullable: A route as a single encoded polyline (precision 6). The server samples it at `samples` evenly-spaced points — send a whole GPS track this way rather than thousands of individual points.
  - `points` LngLat[], nullable: Up to 512 discrete `(lat, lon)` points to look up. Omit when using `encodedPolyline`.
    - `lat` number, double, required
    - `lon` number, double, required
  - `samples` integer, nullable: Number of evenly-spaced samples for `encodedPolyline` mode. Default 256, capped at 1000.

## Response `200`

Elevations in request order.

- ElevationResponse: Elevations in the same order as the request — one per input point, or one per sample along the polyline.
  - `elevations` ElevationPoint[], required
    - `elevation` number, double, nullable: Elevation in metres above sea level, or `null` where there is no coverage (e.g. open ocean).
    - `lat` number, double, required
    - `lon` number, double, required

## Other responses

- `400`: Body malformed, neither input provided, or more than 512 points.
- `401`: Missing, malformed, or revoked API key.
- `429`: Monthly quota exhausted.

---

[API](https://skmtc.dev/rijwind/apis/rijwind-api.md) · [All operations](https://skmtc.dev/rijwind/apis/rijwind-api/llms.txt) · [OpenAPI document](https://skmtc.dev/rijwind/apis/rijwind-api/revisions/01d72fb6aa4d?raw)
