API Documentation

A public API is available for testing at api.opentopodata.org.

Open Topo Data has a single endpoint.

GET /v1/<dataset_name>

Reads the elevation from a given dataset. The dataset must match one of the options in config.yaml.

Latitudes and longitudes should be in EPSG:4326 (also known as WGS-84 format), they will be converted internally to whatever the dataset uses.


  • locations: Required. Either
    • latitutde,longitude pairs, each separated by a pipe character |. Example: locations=12.5,160.2|-10.6,130.
    • Google polyline format. Example: locations=gfo}EtohhU.
  • interpolation: How to interpolate between the points in the dataset. Options: nearest, bilinear, cubic. Default: bilinear.


A json object, compatible with the Google Maps Elevation API.

  • status: Will be OK for a successful request, INVALID_REQUEST for an input (4xx) error, and SERVER_ERROR for anything else (5xx). Required.
  • error: Description of what went wrong, when status isn't OK.
  • results: List of elevations for each location, in same order as input. Only provided for OK status.
  • results[].elevation: Elevation, using units and datum from the dataset. May be NaN if the dataset has a NODATA value at the given location. May be null if the given location is outside the dataset bounds.
  • results[].location.lat: Latitude as parsed by Open Topo Data.
  • results[].location.lng: Longitude as parsed by Open Topo Data.

Some notes about the elevation value:

  • If the raster has an integer data type, the interpolated elevation will be rounded to the nearest integer. This is a limitation of rasterio/gdal.
  • If the raster has a NODATA value at the request location, Open Topo Data will return NaN.
  • If the request location isn't covered by any raster in the dataset, Open Topo Data will return null.


GET api.opentopodata.org/v1/srtm90m?locations=-43.5,172.5|27.6,1.98&interpolation=cubic

    "results": [
            "elevation": 45,
            "location": {
                "lat": -43.5,
                "lng": 172.5
            "elevation": 402,
            "location": {
                "lat": 27.6,
                "lng": 1.98
    "status": "OK"