Elevation API
Elevation API
The Elevation API returns the height above sea level for one or more coordinates. You can query a single point, a list of points, or request a full elevation profile for a route.
If you want to enhance a route with elevation data use the Route Enhancing API.
Base URL
https://elevation.maptoolkit.netAuthentication
Add your API key as ?api_key=YOUR_API_KEY to every request. See Authentication for details.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
loc | lat,lng | Yes (or points) | A single coordinate. Repeat this parameter for multiple locations. |
points | JSON array | Yes (or loc) | A list of coordinates: [[lat, lng], ...] |
simplify | 0 or 1 | No | Returns a simplified version of the route, useful for static map generation. Default: 0. |
callback | string | No | Wraps the response in a JSONP callback function. |
Response
Example — two locations using loc:
GET https://elevation.maptoolkit.net?loc=50,10&loc=46,16&api_key=YOUR_API_KEYExample — two locations using points:
GET https://elevation.maptoolkit.net?points=[[50,10],[46,16]]&api_key=YOUR_API_KEY[289, 128]The response is an array of elevation values in meters, in the same order as the input coordinates.