---
title: "Get elevation"
method: GET
path: "/elevation/{locations}.json"
tags: ["Elevation"]
---

# Get elevation

`GET /elevation/{locations}.json`

## Request

- Base URL: `https://api.maptiler.com`
- URL: `https://api.maptiler.com/elevation/{locations}.json`
- Auth: API key in query parameter `key`
- TypeScript: <https://skmtc.dev/maptiler/apis/maptiler-api-reference/docs/elevation/:locations.json/get.ts> (a function with typed inputs; its response is checked against the schema)

Get the elevation at given locations. If <i>unit</i> is omitted, elevation values are in meters.

## Path parameters

- `locations` string, required

## Query parameters

- `unit` 'meters' | 'feet'

## Response `200`

Elevation of the requested locations.

- array[]: Array of locations with elevation `[lng, lat, ele]`
  - number[]

## Other responses

- `400`: Out of bounds

---

[API](https://skmtc.dev/maptiler/apis/maptiler-api-reference.md) - [All operations](https://skmtc.dev/maptiler/apis/maptiler-api-reference/llms.txt) - [OpenAPI document](https://skmtc.dev/maptiler/apis/maptiler-api-reference/revisions/68ce3046fc1a?raw)
