GET /v1/elevation
Elevation above sea level for a single point.
Request
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
lat | float | yes | — | Latitude, −90..90. |
lng | float | yes | — | Longitude, −180..180. |
interpolation | string | no | bilinear | bilinear 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. |