/v1/elevation Query terrain elevation for any coordinate, path, or batch of locations. Altitude in metres, slope gradient, and surface type from a single GET request.
Backed by Farun's high-resolution terrain dataset. Use it to enrich routes with altitude profiles, flag steep or impassable terrain, assess flood and landslide risk, and power outdoor navigation workflows without hosting your own DEM pipeline.
# Single coordinate - altitude in metres
curl "https://api.farun.io/v1/elevation" \
-H "X-RapidAPI-Key: YOUR_KEY" \
-H "X-RapidAPI-Host: farun-maps.p.rapidapi.com" \
-G \
--data-urlencode "coordinates=77.2090,28.6139"
# Multi-point path - returns elevation profile
curl "https://api.farun.io/v1/elevation" \
-H "X-RapidAPI-Key: YOUR_KEY" \
-G \
--data-urlencode "coordinates=77.20,28.61|77.22,28.63|77.25,28.65" \
--data-urlencode "include_slope=true" Returns
Metres above sea level
Path support
Up to 512 waypoints
Slope
Optional - degrees & %
Query modes
Query a single coordinate for its altitude, or pass a sequence of waypoints and get back a full elevation profile with distance and slope between each point.
/v1/elevation?coordinates=lon,lat Pass a single coordinate and get the terrain altitude in metres above sea level. Fast enough to call inline during asset creation, address validation, or telemetry enrichment workflows.
/v1/elevation?coordinates=p1|p2|p3… Pass a pipe-separated sequence of coordinates and get back an ordered elevation profile - altitude, cumulative distance, and slope between each waypoint. Useful for route planning, ascent calculation, and hazard flagging.
Who uses it
Elevation data is the layer beneath every terrain-aware workflow. It's what separates a route that looks right on a flat map from one that accounts for mountain passes, flood plains, and unpaved gradients that slow or stop a vehicle.
Routing & Navigation
Pair with the Routing API to flag high-gradient segments that are unsuitable for heavy vehicles or slow for cyclists. Pass the route geometry as a coordinate sequence and filter by slope threshold before dispatching.
Risk & Insurance
Assess the elevation of an insured location relative to its surroundings. Low-lying coordinates near water bodies or steep terrain can be automatically flagged at policy submission for risk-adjusted underwriting.
Outdoor & Adventure
Generate elevation profiles for hiking routes, cycling tracks, or trail plans. Summarise total ascent, descent, and maximum gradient so users understand the physical demand of a route before they start.
Infrastructure & Utilities
Profile candidate infrastructure corridors for elevation change and slope constraints before committing to surveys or permitting. Flag segments that exceed gradient tolerances for gas pipelines, roads, or fibre routes.
Agriculture & Land
Evaluate field gradients for irrigation planning, erosion risk, and cultivation suitability. Pass farm boundary waypoints and use the slope output to classify zones by drainage and machinery accessibility.
Drone & UAV
Profile a planned UAV corridor against terrain elevation to calculate minimum safe altitude at each waypoint. Identify terrain peaks that exceed permitted flight envelopes before authorising a mission.
Response shape
Each result maps directly to a queried coordinate. For path queries, results are returned in input order with cumulative distance and slope between each pair so charting an elevation profile requires no additional processing.
results[].elevation Altitude in metres above sea level (WGS 84 ellipsoidal height) results[].location [longitude, latitude] - echoed from the input for easy mapping results[].slope_deg Slope angle in degrees to the next waypoint (path mode only) results[].slope_pct Slope as percentage grade - rise over run x 100 results[].distance_m Cumulative distance in metres from the first waypoint summary.ascent_m Total elevation gained across the path in metres summary.descent_m Total elevation lost across the path in metres summary.max_slope_pct Maximum slope percentage encountered on the path {
"results": [
{
"location": [77.20, 28.61],
"elevation": 207,
"distance_m": 0,
"slope_deg": 1.4,
"slope_pct": 2.4
},
{
"location": [77.22, 28.63],
"elevation": 216,
"distance_m": 2847,
"slope_deg": 3.1,
"slope_pct": 5.4
},
{
"location": [77.25, 28.65],
"elevation": 231,
"distance_m": 6103,
"slope_deg": null,
"slope_pct": null
}
],
"summary": {
"ascent_m": 24,
"descent_m": 0,
"max_slope_pct": 5.4
}
} Endpoint reference
https://api.farun.io/v1/elevation Query parameters
coordinates req include_slope units resolution Response codes
200 application/json Results array with one entry per input coordinate. 400 Bad request Invalid coordinate format or more than 512 points provided. 401 Unauthorized Missing or invalid RapidAPI key. 429 Rate limited Request rate exceeds your plan. Upgrade on RapidAPI. Max waypoints
512 per request
Altitude unit
Metres (WGS 84)
Slope output
Degrees + % grade
Terrain data
Farun high-res DEM
Path summary
Ascent, descent, max slope
Units option
metres or feet
Integration example
// Elevation profile for a route geometry
async function getElevationProfile(routeCoords) {
// routeCoords: [[lon,lat], [lon,lat], ...]
const coords = routeCoords
.map(c => c.join(","))
.join("|");
const res = await fetch(
`/api/elevation?coordinates=$${coords}&include_slope=true`
);
const { results, summary } = await res.json();
// Flag segments steeper than 15%
const steep = results.filter(
p => p.slope_pct != null && p.slope_pct > 15
);
return { results, summary, steep };
} Often used together
Calculate a route first, then pass the waypoints to Elevation for a terrain profile of the planned path.
Convert a coordinate into a human-readable address or place name.
Retrieve full structured data for a specific place name, address, category, and geometry.
Combine reachability zones with elevation data to flag areas with high terrain gradient within a time or distance envelope.
Start building
Subscribe on RapidAPI for instant key access. The free tier covers 200 elevation requests per month, enough to build and test a full route profiling or terrain risk workflow end to end.