Open Topo Data API

Beginner's Pick Geocoding / No Auth Required Beginner HTTPS
Free to Use
62 C
Measured Score 0 50 100 Speed 14/30 Consistency 20/20 Security 20/20 Browser access 0/15 Transparency 8/15 TESTED 2026-08-10

Overview

Open Topo Data is a free elevation API that returns the altitude above sea level (or ocean depth below sea level) for any latitude and longitude on Earth. It aggregates multiple topographic datasets including SRTM, ETOPO1, and others. It requires no API key and is great for hiking apps, route planners, or any project needing terrain data.

Beginner Tip

The public API is limited to 1 request per second and 100 locations per request. For bulk elevation lookups, you can self-host Open Topo Data for free using Docker.

Measurement Record

What actually happened when we called this API from our own infrastructure. Every value below was recorded by the request, not copied from the provider's documentation.

Request
GET https://api.opentopodata.org/v1/srtm30m?locations=40.7128,-74.0060
Result
HTTP 200 · application/json · 181 bytes · compressed
Response time
280 ms (median of 3) · fastest 277 ms
Transport
TLSv1.3 · TLS_AES_256_GCM_SHA384 · certificate issued by Google Trust Services
Browser CORS
No Access-Control-Allow-Origin header — call it from a server, not the browser
Served by
cloudflare
Recorded
2026-08-10

Fields Returned

Top-level fields present in the response we captured, with the type and value we actually received.

Field Type Value received
dataset string srtm30m
elevation integer 25
location object {1 fields}

Captured Response

Captured from a real request to https://api.opentopodata.org/v1/srtm30m?locations=40.7128,-74.0060 on 2026-08-10. Long arrays and nested objects are truncated to keep the shape readable.

JSON Response · Captured
{
  "results": [
    {
      "dataset": "srtm30m",
      "elevation": 25,
      "location": {
        "…": "(2 more fields)"
      }
    }
  ],
  "status": "OK"
}

Field Reference

results Array of elevation results, one per input coordinate
status OK if the request succeeded; error message if something went wrong

Implementation Example

Calls a real endpoint of this API. Replace any placeholder credentials with your own key.

Request
const url = "https://api.opentopodata.org/v1/srtm30m?locations=40.7128,-74.0060";
const response = await fetch(url);
if (!response.ok) throw new Error(`Request failed: ${response.status}`);
const data = await response.json();
console.log(data);

What Can You Build?

Note: These code examples are AI-generated and unverified. Always refer to the official API documentation for accurate usage.

How This API Fails

We deliberately sent this API a broken request and recorded exactly what came back on 2026-08-10. Knowing the shape of an error before you hit it makes error handling much easier to write.

HTTP 404 Requesting a path that does not exist text/html

Returned an HTML error page rather than JSON — worth knowing if your client assumes every response can be parsed as JSON.

Common Errors & Troubleshooting

Generated guidance based on this API's documentation, not observed by us. Treat it as a starting point and check against the provider's own error reference.

429 Too Many Requests Exceeding the 1 request per second rate limit
Add at least 1 second delay between requests; batch multiple coordinates in a single request (up to 100) using pipe separator
null elevation returned The coordinate is in an area not covered by the chosen dataset
Try a different dataset endpoint (e.g., /v1/etopo1 for ocean depths or /v1/ned10m for high-res US data)
400 Bad Request Coordinates are malformed or out of range
Use decimal format lat,lon (e.g., 51.5074,-0.1278); separate multiple points with a pipe character |

Measured Score Breakdown

Live HTTP request to the API endpoint

Speed 14/30
Consistency 20/20
Security 20/20
Browser access 0/15
Transparency 8/15
Endpoint Response Time 280ms

Fully tested on Aug 10, 2026

Technical Specifications

Auth No Auth
HTTPS REQUIRED
CORS NO
Category Geocoding
Difficulty Beginner
Endpoint last called: 2026-08-10

Related Tags

Similar APIs

View All →