GeoInsight API Docs Log in Get an API key

Elevation API

Height above sea level for a single coordinate or a batch of up to 100 points.

GET /v1/elevation POST /v1/elevation

Base URL https://geoinsight.dev. Every request needs the X-API-Key header — see authentication, what this call costs and error codes.

GET /v1/elevation

Elevation above sea level for a single point.

Request

FieldTypeRequiredDefaultDescription
latfloatyesLatitude, −90..90.
lngfloatyesLongitude, −180..180.
interpolationstringnobilinearbilinear or nearest.

Examples

curl -H "X-API-Key: gi_live_..." \
  "https://geoinsight.dev/v1/elevation?lat=50.0647&lng=19.9450"
import requests

r = requests.get(
"https://geoinsight.dev/v1/elevation",
params={"lat": 50.0647, "lng": 19.9450},
headers={"X-API-Key": "gi_live_..."},
)
print(r.json()["results"][0]["elevation"])
const res = await fetch(
  "https://geoinsight.dev/v1/elevation?lat=50.0647&lng=19.9450",
  { headers: { "X-API-Key": "gi_live_..." } },
);
const data = await res.json();
console.log(data.results[0].elevation);

Response

{
  "results": [{ "lat": 50.0647, "lng": 19.945, "elevation": 219.3 }],
  "dataset": "copernicus-glo-30",
  "resolution_m": 30
}
Field Type Unit Description
results array One entry per requested point, in the same order as the input.
results[].lat number deg Latitude echoed back from the request, so results stay identifiable when batched.
results[].lng number deg Longitude echoed back from the request.
results[].elevation number m a.s.l. Terrain height above sea level. null when the point falls outside dataset coverage or on a nodata cell (open sea).
dataset string Source dataset identifier. Currently always copernicus-glo-30.
resolution_m integer m Nominal ground sample distance of the source raster. Features smaller than this are not resolved.

POST /v1/elevation

Elevation for up to 100 points in a single request. Results are returned in the same order as the input points.

Request (JSON body)

FieldTypeRequiredDefaultDescription
pointsarrayyes1–100 objects, each { "lat": …, "lng": … }.
points[].latfloatyesLatitude, −90..90.
points[].lngfloatyesLongitude, −180..180.
interpolationstringnobilinearbilinear or nearest.

Examples

curl -H "X-API-Key: gi_live_..." -X POST "https://geoinsight.dev/v1/elevation" \
  -H "Content-Type: application/json" \
  -d '{"points":[{"lat":50.0647,"lng":19.9450},{"lat":49.28,"lng":19.96}]}'
import requests

r = requests.post(
"https://geoinsight.dev/v1/elevation",
json={"points": [{"lat": 50.0647, "lng": 19.9450}, {"lat": 49.28, "lng": 19.96}]},
headers={"X-API-Key": "gi_live_..."},
)
print(r.json()["results"])
const res = await fetch("https://geoinsight.dev/v1/elevation", {
  method: "POST",
  headers: { "X-API-Key": "gi_live_...", "Content-Type": "application/json" },
  body: JSON.stringify({ points: [{ lat: 50.0647, lng: 19.9450 }, { lat: 49.28, lng: 19.96 }] }),
});
console.log((await res.json()).results);

Response

{
  "results": [
{ "lat": 50.0647, "lng": 19.945, "elevation": 219.3 },
{ "lat": 49.28, "lng": 19.96, "elevation": 301.8 }
  ],
  "dataset": "copernicus-glo-30",
  "resolution_m": 30
}
Field Type Unit Description
results array One entry per input point, in the same order. Match results to inputs by index, not by coordinate.
results[].lat number deg Latitude echoed back from the request.
results[].lng number deg Longitude echoed back from the request.
results[].elevation number m a.s.l. Terrain height above sea level. null outside dataset coverage or on a nodata cell.
dataset string Source dataset identifier.
resolution_m integer m Nominal ground sample distance of the source raster.