Open Topo Data
Open Topo Data is an elevation API.
Host your own or use the free public API.
Open Topo Data is a REST API server for your elevation data.
{
"results": [{
"elevation": 815.0,
"location": {
"lat": 56.0,
"lng": 123.0
},
"dataset": "test-dataset"
}],
"status": "OK"
}
You can self-host with your own dataset or use the free public API which is configured with a number of open elevation datasets. The API is largely compatible with the Google Maps Elevation API.
Host your own
Install docker and git then run:
This will start an Open Topo Data server on http://localhost:5000/
.
Open Topo Data supports a wide range of raster file formats and tiling schemes, including most of those used by popular open elevation datasets.
See the server docs for more about configuration, adding datasets, and running on Windows and M1 Macs.
Usage
Open Topo Data has a single endpoint: a point query endpoint that returns the elevation at a single point or a series of points.
{
"results": [{
"elevation": 815.0,
"location": {
"lat": 56.0,
"lng": 123.0
},
"dataset": "test-dataset"
}],
"status": "OK"
}
The interpolation algorithm used can be configured as a request parameter, and locations can also be provided in Google Polyline format.
See the API docs for more about request and response formats.
Public API
I'm hosting a free public API at api.opentopodata.org.
To keep the public API sustainable some limitations are applied.
- Max 100 locations per request.
- Max 1 call per second.
- Max 1000 calls per day.
The following datasets are available on the public API, with elevation shown for downtown Denver, Colorado (39.7471, -104.9963).
Dataset name | Resolution | Extent | Source | API link (Denver, CO) |
---|---|---|---|---|
nzdem8m | 8 m | New Zealand. | LINZ | Not in dataset bounds |
ned10m | ~10 m | Continental USA, Hawaii, parts of Alaska. | USGS | 1590 m |
eudem25m | 25 m | Europe. | EEA | Not in dataset bounds |
mapzen | ~30 m | Global, inluding bathymetry. | Mapzen | 1590 m |
aster30m | ~30 m | Global. | NASA | 1591 m |
srtm30m | ~30 m | Latitudes -60 to 60. | USGS | 1604 m |
srtm90m | ~90 m | Latitudes -60 to 60. | USGS | 1603 m |
bkg200m | 200 m | Germany. | BKG | Not in dataset bounds |
etopo1 | ~1.8 km | Global, including bathymetry and ice surface elevation near poles. | NOAA | 1596 m |
gebco2020 | ~450m | Global bathymetry and land elevation. | GEBCO | 1603 m |
emod2018 | ~100m | Bathymetry for ocean and sea in Europe. | EMODnet | Not in dataset bounds |
See the API docs for more about request formats and parameters.
Support
Need some help getting Open Topo Data running? Send me an email at [email protected]!
Paid hosting
If you need an elevation API service with high-quality 1m lidar data, check out my sister project GPXZ.
The GPXZ Elevation API offers the following features:
- Managed hosting, load balanced for redundancy
- Seamless, global, hi-res elevation dataset
- Drop-in replacement endpoint for the Google Maps Elevation API
- Priority support
- No hard usage limits
- EU-only servers if needed
- CORS (so you can use the API in your frontend webapp)
For more details, reach out to [email protected].
Paid hosting funds the development of Open Topo Data and keeps the public API free.