Elevation Data API

Altitude for any coordinate on Earth

Simple REST API returning precise elevation data based on latitude and longitude. Global SRTM coverage, low latency, JSON responses.

±1m Accuracy
Global Coverage
REST Interface
JSON Response
Quick Start

One request. One number.

Pass a latitude and longitude. Get the elevation in meters.

Examples
cURL
Python
JavaScript
Response
# Single coordinate lookup
curl "https://elevation4.p.rapidapi.com/v1/elevation?lat=34.882764&lon=32.389925" \
  -H "X-RapidAPI-Host: elevation4.p.rapidapi.com" \
  -H "X-RapidAPI-Key: YOUR_API_KEY"
import requests

url = "https://elevation4.p.rapidapi.com/v1/elevation"

params = {"lat": 34.882764, "lon": 32.389925}
headers = {
    "X-RapidAPI-Host": "elevation4.p.rapidapi.com",
    "X-RapidAPI-Key": "YOUR_API_KEY",
}

response = requests.get(url, headers=headers, params=params)
data = response.json()

print(data["elevation"])  # → 211.62
const res = await fetch(
  "https://elevation4.p.rapidapi.com/v1/elevation?lat=34.882764&lon=32.389925",
  {
    headers: {
      "X-RapidAPI-Host": "elevation4.p.rapidapi.com",
      "X-RapidAPI-Key": "YOUR_API_KEY",
    },
  }
);

const { elevation } = await res.json();
console.log(elevation); // → 211.62
// GET /v1/elevation?lat=34.882764&lon=32.389925
// HTTP 200 OK
{
  "elevation":    211.62,
  "unit":         "meters",
  "resolution":   90,
  "source":       "copernicus-dem-90",
  "interpolation":"bilinear",
  "location": { "lat": 34.882764, "lon": 32.389925 }
}
How it works

Three steps to altitude

01

Subscribe on RapidAPI

Pick a plan — including a free tier — and grab your API key from the RapidAPI dashboard.

02

Send a request

Call the endpoint with any latitude/longitude pair. No SDK required — a plain HTTP GET is enough.

03

Read the elevation

Get back a JSON object with the elevation in meters. Done.

Features

Everything you need

🌍

Global coverage

Based on SRTM (Shuttle Radar Topography Mission) data — every landmass between 60°N and 56°S at ~90m resolution.

Low latency

Optimised tile lookup and in-memory caching deliver results in milliseconds, not seconds.

📦

Batch requests

Query multiple coordinates in a single POST call. Reduce round-trips for route-elevation or heatmap workloads.

🔧

Simple REST API

Standard HTTP GET and POST. JSON in, JSON out. No SDK, no binary protocol, no auth complexity beyond your API key.

📐

Decimal precision

Elevation values returned in meters with sub-meter precision. Ideal for terrain analysis, routing, and outdoor apps.

🛡️

Reliable infrastructure

Served through RapidAPI's global gateway — rate-limiting, auth, and uptime monitoring handled for you.

API Reference

Endpoints

Base URL: https://elevation4.p.rapidapi.com

GET /v1/elevation Single coordinate lookup

Returns the elevation in meters for a single latitude/longitude coordinate.

Parameter Type Required Description
lat float required Latitude in decimal degrees (e.g. 34.882764)
lon float required Longitude in decimal degrees (e.g. 32.389925)
resolution integer optional DEM resolution in meters (default: 90)
interpolation string optional Interpolation method, e.g. bilinear (default: bilinear)

Required headers

HeaderValue
X-RapidAPI-Host elevation4.p.rapidapi.com
X-RapidAPI-Key Your RapidAPI key

Response

{
  "elevation":    211.62,
  "unit":         "meters",
  "resolution":   90,
  "source":       "copernicus-dem-90",
  "interpolation":"bilinear",
  "location": {
    "lat": 34.882764,
    "lon": 32.389925
  }
}
POST /v1/elevation/batch Batch coordinate lookup

Returns elevation for multiple coordinates in a single request. Accepts a JSON body.

Request body

{
  "locations": [
    { "lat": 51.5074,  "lon": -0.1278 },
    { "lat": 48.8566,  "lon": 2.3522  },
    { "lat": 40.7128,  "lon": -74.0060 }
  ]
}

Response

{
  "elevations": [
    { "lat": 45.464,  "lon": 9.19,    "elevation": 141.59 },
    { "lat": 41.89,   "lon": 12.492,  "elevation": 24.15  },
    { "lat": 52.368,  "lon": 4.904,   "elevation": 5.47   }
  ],
  "unit":          "meters",
  "resolution":    90,
  "source":        "copernicus-dem-90",
  "interpolation": "bilinear",
  "count":         3
}
GET /v1/elevation/profile Elevation profile along a path

Returns evenly-spaced elevation samples along a straight path between two coordinates. Includes total distance, gain/loss, min/max, and data source.

Parameter Type Required Description
from_lat float required Start latitude in decimal degrees
from_lon float required Start longitude in decimal degrees
to_lat float required End latitude in decimal degrees
to_lon float required End longitude in decimal degrees
samples integer optional Number of evenly-spaced samples along the path (default: 50)

Example request

curl "https://elevation4.p.rapidapi.com/v1/elevation/profile?from_lat=45.83&from_lon=6.87&to_lat=45.46&to_lon=9.19&samples=50" \
  -H "X-RapidAPI-Host: elevation4.p.rapidapi.com" \
  -H "X-RapidAPI-Key: YOUR_API_KEY"

Response

{
  "profile": [
    { "lat": 45.83,  "lon": 6.87,  "elevation": 4614.27, "distance_m": 0       },
    { "lat": 45.822, "lon": 6.917, "elevation": 2230.82, "distance_m": 3774.99 },
    // … more samples …
    { "lat": 45.46,  "lon": 9.19,  "elevation": 130.91,  "distance_m": 184974.75 }
  ],
  "total_distance_m": 184975,
  "min_elevation":    126.35,
  "max_elevation":    4614.27,
  "elevation_gain":   5967.13,
  "elevation_loss":   10450.5,
  "samples":          50,
  "resolution":       90,
  "source":           "copernicus-dem-90"
}

HTTP status codes

CodeMeaning
200Success
400Bad request — missing or invalid parameters
403Invalid or missing API key
429Rate limit exceeded — upgrade your plan
500Server error
Use cases

Built for builders

🏃

Fitness & outdoor apps

Enrich GPS tracks with elevation gain/loss. Calculate climbing effort for hiking, cycling, and running routes.

🗺️

Mapping & GIS

Augment coordinate datasets with terrain altitude. Render elevation-coloured maps or contour overlays.

🚁

Drone & UAV flight planning

Calculate safe clearance altitude above terrain. Validate waypoints against ground elevation before flight.

🌊

Flood & risk modelling

Identify low-lying areas, model inundation zones, or compute line-of-sight between terrain points.

🏗️

Construction & surveying

Quick sanity-check elevation before expensive fieldwork. Cross-reference survey points against SRTM baseline.

🎮

Games & simulation

Generate realistic terrain heightmaps from real-world coordinates. Seed procedural worlds with authentic geography.

Get started

Free to try. Pay as you grow.

Subscribe on RapidAPI — free tier included, no credit card required to start. Plans scale with your usage.

View plans on RapidAPI →

Data Attribution

Every usage of this data must be accompanied by the following attribution:

Elevation data: Copernicus DEM GLO-90 © ESA / Copernicus Programme.
Original data: © DLR e.V. 2010-2014 and
               © Airbus Defence and Space GmbH 2014-2018.
Used in accordance with the Copernicus Data Policy:
https://spacedata.copernicus.eu/en/web/guest/legal-notices