OpenTopoData API
Free elevation API with no key: ground elevation for any coordinates from multiple global datasets including SRTM, ASTER and ETOPO1. Self-hostable. Tested.
Endpoint tested and returned HTTP 200 on 2026-08-20
What is the OpenTopoData API?
OpenTopoData is a free, key-free elevation API returning ground elevation for any coordinates, with a choice of global datasets including SRTM, ASTER, EU-DEM and ETOPO1 for ocean bathymetry.
Elevation lookup is a common need — for hiking apps, drone planning, flood modelling — and OpenTopoData covers it with no key, offering several datasets at different resolutions rather than a single opaque source.
Dataset choice genuinely matters. SRTM offers 30m resolution but only covers land between roughly 60°N and 56°S; ETOPO1 is far coarser but global and includes ocean depths. Picking the wrong one for your latitude returns nulls.
Quick facts
- Base URL
https://api.opentopodata.org/v1- Authentication
- No API key required on the public instance.
- Rate limit
- 1,000 calls per day and 1 call per second on the public instance.
- Pricing
- Free and open source; self-host for unlimited use.
- CORS
- Not enabled — call it from your server
- Official docs
- Read the docs
How to use the OpenTopoData API
Every request below was executed against the live API on 2026-08-20, and the response shown is the real body it returned — not an illustration.
1. Look up elevation for coordinates
GET https://api.opentopodata.org/v1/etopo1?locations=31.52,74.35
curl 'https://api.opentopodata.org/v1/etopo1?locations=31.52,74.35'const res = await fetch("https://api.opentopodata.org/v1/etopo1?locations=31.52,74.35");
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.opentopodata.org/v1/etopo1?locations=31.52,74.35", timeout=20)
res.raise_for_status()
print(res.json()){
"results": [
{
"dataset": "etopo1",
"elevation": 216.0,
"location": {
"lat": 31.52,
"lng": 74.35
}
}
],
"status": "OK"
}Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
<dataset> | path | Required | srtm30m, srtm90m, aster30m, eudem25m, etopo1, mapzen. etopo1 |
locations | string | Required | Pipe-separated lat,lng pairs. 31.52,74.35 |
interpolation | string | Optional | nearest, bilinear or cubic. bilinear |
Response fields
statusstring- OK on success.
resultsarray- One entry per requested location.
results[].elevationnumber- Elevation in metres above sea level; negative below.
results[].locationobject- The coordinates that were queried.
results[].datasetstring- Which dataset the value came from.
What you can build with the OpenTopoData API
- Add elevation profiles to hiking or cycling routes
- Plan drone flights with terrain awareness
- Support flood and terrain modelling
- Enrich geographic data with altitude
Common errors and how to fix them
elevation is null
The dataset does not cover those coordinates.
Fix: SRTM covers roughly 60°N to 56°S only. Use etopo1 for global coverage including polar regions and oceans.
429
Exceeded 1,000 calls per day or 1 per second.
Fix: Batch up to 100 locations per request with pipe separators, and cache — terrain does not change.
Unexpectedly coarse values
ETOPO1 is roughly 1.8km resolution.
Fix: Use srtm30m for land detail; etopo1 is for global and ocean coverage, not precision.
OpenTopoData API — frequently asked questions
Is OpenTopoData free?
Yes, the public instance is free with no API key at 1,000 calls per day. It is open source, so you can self-host for unlimited use.
Which dataset should I use?
srtm30m for detailed land elevation between 60°N and 56°S, eudem25m for Europe, and etopo1 for global coverage including polar regions and ocean depths.
Why is my elevation null?
The chosen dataset does not cover those coordinates. SRTM has no data above 60°N — switch to etopo1 for global coverage.
Can I look up many points at once?
Yes, pipe-separate up to 100 coordinate pairs in the locations parameter, which is far more efficient than individual requests.
Tools that pair with this API
JSON Formatter
Format, beautify and minify JSON online with 2-space, 4-space or tab indentation. Sort keys alphabetically and catch syntax errors instantly — free and private.
Unit Converter
Convert between units of length, weight, temperature, area, volume, speed, time and data storage instantly, with a swap button and common conversion tables.
OpenTopoData is an independent third-party service and is not affiliated with ByteTools or ByteVancer. Details on this page were verified on 2026-08-20; always check the official documentation before relying on this API in production, as terms and limits can change.