Open Topo Data API

⭐ Beginner's Pick Geocoding / No Auth Required Beginner HTTPS
Free to Use Varies (check documentation)

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.

Available Data

repository name and description
star and fork counts
contributor data
issues and pull requests
commit history

Example Response

JSON Response
{
  "status": "success",
  "data": {
    "result": "Data from Open Topo Data",
    "description": "Elevation and ocean depth for a latitude and longitude",
    "timestamp": "2025-01-15T10:00:00Z"
  }
}

Field Reference

results Array of elevation results, one per input coordinate
results[].elevation Elevation in meters above sea level; negative values indicate below sea level
results[].location.lat Latitude of the queried point
results[].location.lng Longitude of the queried point
results[].dataset Name of the topographic dataset used for this elevation result
status OK if the request succeeded; error message if something went wrong

Implementation Example

const url = "https://www.opentopodata.org/";
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.

Common Errors & Troubleshooting

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 |

Matrix Score Breakdown

🌐 Reachability 30/30
⚡ Speed 20/20
🔒 Security 15/15
🛠 Developer XP 20/20
✓ Reliability 7/15
Response Time 50ms

Fully tested on Apr 5, 2026

Technical Specifications

Auth No Auth
HTTPS REQUIRED
CORS NO
Category Geocoding
Difficulty Beginner
Verified: 2026-04-04

Similar APIs

View All →