Elevation

Get elevations for multiple locations

Signed in? Open this endpoint in the dashboard playground, which uses your organization automatically. Signed out, use Try in Playground below with your API key.

POST
/geodata/elevation

Returns terrain elevation for 1 to 1,000 geographic locations, preserving input order. Backed by Valhalla /height on Tilezen skadi tiles.

The gateway also serves this operation at the alias POST /v1/elevation; both paths behave identically.

  • Send locations as [longitude, latitude] arrays (recommended) or objects with numeric lat and lon (or lonlat, or legacy latlon).
  • format=json returns a results array. format=geojson returns one GeoJSON Point feature per input location.
  • units=metric returns meters (m); units=imperial returns rounded feet (ft).
  • Set includeDistance=true to include the distance from the previous location. The first result has distance 0.
  • elevation is null when the Engine has no value for a point.

Deviation (approximated): metric elevations come from skadi (SRTM-derived) tiles at one-decimal precision, and elevation north of 60 degrees N is coarser; values can differ from Geoapify's by a few meters.

Deviation (approximated): includeDistance is the straight-line haversine distance between consecutive points, rounded to 0.1 m (metric) or whole feet (imperial).

Deviation (extra): format=geojson responds with content type application/json, not application/geo+json.

Not supported: none; every upstream request field is handled.

Authorization

queryapiKey<token>

Your API key from the dashboard, sent as ?apiKey=<key>.

Request Body

Elevation options and 1 to 1,000 input locations.

application/json
  1. body
format?string

Response representation. json returns a results array; geojson returns a FeatureCollection (served as application/json).

Default"json"
Value in"json""geojson"
units?string

Elevation and optional distance units. Metric results use meters (m, one decimal place); imperial results use rounded feet (ft).

Default"metric"
Value in"metric""imperial"
includeDistance?boolean

When true, include the great-circle (haversine) distance from the previous input location. The first result has distance 0.

Defaultfalse
locations*array<array<never>|||>

Ordered input locations. Use [longitude, latitude] arrays or objects with lat and lon. Results preserve this order.

Items1 <= items <= 1000

Response Body

Elevation result in the requested format.

application/json
  1. response
results*array<>
Example Request
curl -X POST 'https://api.data.graphitelab.ai/v1/geodata/elevation' \  -H 'Content-Type: application/json' \  -d '{  "units": "metric",  "locations": [    [      -104.9903,      39.7392    ],    [      -71.3036,      44.2706    ],    [      -115.5708,      51.1784    ]  ]}'
Example Response
{  "results": [    {      "location": {        "lon": -104.9903,        "lat": 39.7392      },      "elevation": 1596.8,      "units": "m"    },    {      "location": {        "lon": -71.3036,        "lat": 44.2706      },      "elevation": 1915.6,      "units": "m"    },    {      "location": {        "lon": -115.5708,        "lat": 51.1784      },      "elevation": 1387.9,      "units": "m"    }  ]}