Simple REST API returning precise elevation data based on latitude and longitude. Global SRTM coverage, low latency, JSON responses.
Pass a latitude and longitude. Get the elevation in meters.
# 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 } }
Pick a plan — including a free tier — and grab your API key from the RapidAPI dashboard.
Call the endpoint with any latitude/longitude pair. No SDK required — a plain HTTP GET is enough.
Get back a JSON object with the elevation in meters. Done.
Based on SRTM (Shuttle Radar Topography Mission) data — every landmass between 60°N and 56°S at ~90m resolution.
Optimised tile lookup and in-memory caching deliver results in milliseconds, not seconds.
Query multiple coordinates in a single POST call. Reduce round-trips for route-elevation or heatmap workloads.
Standard HTTP GET and POST. JSON in, JSON out. No SDK, no binary protocol, no auth complexity beyond your API key.
Elevation values returned in meters with sub-meter precision. Ideal for terrain analysis, routing, and outdoor apps.
Served through RapidAPI's global gateway — rate-limiting, auth, and uptime monitoring handled for you.
Base URL: https://elevation4.p.rapidapi.com
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
| Header | Value |
|---|---|
| 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
}
}
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
}
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"
}
Enrich GPS tracks with elevation gain/loss. Calculate climbing effort for hiking, cycling, and running routes.
Augment coordinate datasets with terrain altitude. Render elevation-coloured maps or contour overlays.
Calculate safe clearance altitude above terrain. Validate waypoints against ground elevation before flight.
Identify low-lying areas, model inundation zones, or compute line-of-sight between terrain points.
Quick sanity-check elevation before expensive fieldwork. Cross-reference survey points against SRTM baseline.
Generate realistic terrain heightmaps from real-world coordinates. Seed procedural worlds with authentic geography.
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