Elevation Lookup API
Height above mean sea level in metres for any point on land, from 30 metre resolution elevation data between 60° south and 60° north and 90 metre data beyond. Send one point, or up to 100 in a single call for profiles and routes.
Example
$ curl "https://api.mygeocode.com/v1/elevation?lat=27.9881&lon=86.9250"
# Several points, separated by |
$ curl "https://api.mygeocode.com/v1/elevation?locations=46.5763,7.6613|46.5484,7.9819|46.5588,8.0056"Values are sampled from a digital elevation model with bilinear interpolation between cells, so a point on a steep slope is estimated rather than snapped to the nearest cell. Expect vertical accuracy of a few metres on open ground and worse under dense forest or in cities, where models measure treetops and roofs.
{
"status": "ok",
"results": [
{
"lat": 27.9881,
"lon": 86.925,
"elevation_m": 8752.1,
"resolution_m": 30
}
]
}What you get back
| Field | Meaning |
|---|---|
results | One entry per point, in the order you sent them. |
elevation_m | Metres above mean sea level, one decimal. Negative below sea level (Death Valley, the Dead Sea shore). null over open ocean. |
resolution_m | The cell size of the dataset that answered: 30 or 90. |
Where it is used
Route profiles
Send the points of a hiking or cycling route in batches of 100 and draw the elevation profile, total ascent and steepest gradient.
Site assessment
Flood risk screening, solar panel planning, radio line of sight. Combine with forward geocoding to go from an address to a height in two calls.
Correcting GPS altitude
Consumer GPS altitude is often off by tens of metres. Replace it with a terrain lookup for anything that is on the ground.
Price and limits
Each point counts as one request, so a call with 100 points counts as 100. 2,500 points a day free, then one credit ($0.001) each or €50 a month unlimited. Pricing. The Google Elevation API, Bing Elevations and Open-Elevation formats are available as drop-in hosts.