Open-Elevation API
Free elevation API with no key: get metres above sea level for any latitude and longitude worldwide, several points per request. Tested curl example and live response.
Endpoint tested and returned HTTP 200 on 2026-08-21
What is the Open-Elevation API?
Open-Elevation is a free, key-free API that returns the elevation in metres above sea level for any coordinate on Earth. It accepts several points in one request and is fully open source, so the same service can be self-hosted from public SRTM data.
Elevation is one of those values that is easy to want and awkward to obtain: the underlying datasets are large, the file formats are specialised, and most hosted providers gate access behind a key. Open-Elevation was built specifically as the free alternative — the data is SRTM, the code is on GitHub, and the public instance asks for nothing.
The accuracy story is worth understanding before you rely on it. SRTM samples the ground on a grid of roughly 30 metres, so what you get back is the height of a cell rather than of your exact point. On a plateau that hardly matters; on a cliff edge or a narrow valley floor two nearby coordinates can differ by tens of metres. The dataset is also a surface model in places, meaning dense forest canopy and large buildings can read higher than the ground beneath them.
Quick facts
- Base URL
https://api.open-elevation.com/api/v1- Authentication
- No API key or account. Open source under GPL; the hosted instance is provided free and can be self-hosted for heavy use.
- Rate limit
- No published quota on the public instance, which is community-funded and occasionally slow. Self-host for bulk work.
- Pricing
- Free.
- CORS
- Enabled — callable directly from browser JavaScript
- Official docs
- Read the docs
How to use the Open-Elevation API
Every request below was executed against the live API on 2026-08-21, and the response shown is the real body it returned — not an illustration.
1. Look up elevation for two coordinates in one request
GET https://api.open-elevation.com/api/v1/lookup?locations=41.161758,-8.583933%7C27.9881,86.9250
curl 'https://api.open-elevation.com/api/v1/lookup?locations=41.161758,-8.583933%7C27.9881,86.9250'const res = await fetch("https://api.open-elevation.com/api/v1/lookup?locations=41.161758,-8.583933%7C27.9881,86.9250");
if (!res.ok) throw new Error(`Request failed: ${res.status}`);
const data = await res.json();
console.log(data);import requests
res = requests.get("https://api.open-elevation.com/api/v1/lookup?locations=41.161758,-8.583933%7C27.9881,86.9250", timeout=20)
res.raise_for_status()
print(res.json()){
"results": [
{
"elevation": 117.0,
"longitude": -8.583933,
"latitude": 41.161758
},
{
"latitude": 27.9881,
"longitude": 86.925,
"elevation": 8771.0
}
]
}Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
locations | query | Required | Pipe-separated `lat,lon` pairs. Several points can be resolved in a single GET. 41.161758,-8.583933|27.9881,86.9250 |
(POST body) | json | Optional | The same endpoint accepts a POST with `{"locations":[{"latitude":..,"longitude":..}]}` for longer batches that would overflow a URL. |
Response fields
resultsarray- One object per requested point, in the order you sent them.
results[].latitude / longitudefloat- The coordinates echoed back, which is how you match results to inputs in a batch.
results[].elevationfloat- Height in metres above sea level. Returns 0 over open ocean and for points outside SRTM coverage — the two are indistinguishable in the response.
What you can build with the Open-Elevation API
- Add elevation to GPS tracks that recorded position but not altitude
- Build an elevation profile along a walking or cycling route
- Estimate gradient between waypoints for effort or energy modelling
- Enrich weather or agricultural data with terrain height
- Filter site candidates by altitude for solar, radio or drone planning
Common errors and how to fix them
Elevation is 0 for a land point
SRTM does not cover latitudes beyond roughly 60 degrees north or 56 degrees south, and gaps return zero.
Fix: Zero is also the legitimate answer over the sea, so the response cannot tell you which it is. Cross-check high-latitude points against another source.
Slow or timing-out requests
The public instance is community-funded and occasionally saturated.
Fix: Batch many points into one request rather than looping, and retry with a backoff. For sustained load, self-host — the project ships a Docker image.
Two nearby points differ by tens of metres
SRTM is a roughly 30-metre grid, so the value belongs to a cell, not a point.
Fix: Expect cell-level resolution. On steep terrain, sample several nearby points and use the spread as an uncertainty estimate.
Elevation seems too high in a forest or city
SRTM is partly a surface model — it measures canopy and rooftops, not bare earth.
Fix: For bare-earth heights you need a dedicated terrain model. Treat SRTM values as ground level only in open, low-vegetation terrain.
Open-Elevation API — frequently asked questions
Is Open-Elevation free?
Yes, free with no key or account, and the whole project is open source. The public instance is community-funded, so heavy users are encouraged to run their own copy rather than lean on it.
How accurate is the elevation data?
It comes from SRTM at roughly 30-metre resolution, so each answer is the height of a grid cell. That is good to within a few metres on gentle terrain and considerably worse on cliffs, narrow valleys and anywhere with tall canopy.
Can I look up many points at once?
Yes. Pipe-separate the pairs in the `locations` query parameter, or POST a JSON array for longer batches. One batched request is far kinder to the public instance than a loop of single lookups.
Why does it return 0 for some locations?
Either the point is over water, or it falls outside SRTM's coverage, which stops near the poles. The response does not distinguish the two, so treat a zero at high latitude as missing data rather than sea level.
Tools that pair with this API
GPX Track Analyzer
Analyse a GPX file for distance, elevation gain and loss, moving versus elapsed time, speed and pace, with an elevation profile drawn in your browser.
Coordinate Converter
Convert GPS coordinates between decimal degrees, degrees-minutes-seconds and decimal minutes instantly. Paste any format like 40°26'46"N and copy the result.
Distance Calculator
Calculate the straight-line distance and bearing between two points on a map by latitude/longitude using the Haversine formula — km, miles and nautical miles.
Open-Elevation is an independent third-party service and is not affiliated with ByteTools or ByteVancer. Details on this page were verified on 2026-08-21; always check the official documentation before relying on this API in production, as terms and limits can change.