API / Elevation
GET /v1/elevation

Elevation API.

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.

API OPERATIONAL · View status
# 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

Point lookup and path profiling. One endpoint.

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.

GET /v1/elevation?coordinates=lon,lat

Point elevation

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.

  • Altitude in metres above sea level (WGS 84)
  • Terrain resolution metadata included in response
  • Optional slope - angle in degrees and percentage
  • Surface type flag - land, water, or glacier
  • Sub-100ms response at edge - suitable for inline enrichment
GET /v1/elevation?coordinates=p1|p2|p3…

Path elevation profile

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.

  • Up to 512 waypoints per request
  • Altitude per point - metres above sea level
  • Cumulative distance in metres between waypoints
  • Slope per segment - degrees and percentage grade
  • Total ascent and descent summarised in response

Who uses it

Terrain intelligence for operational products.

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

Terrain-aware route planning

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

Flood and landslide risk scoring

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

Ascent and descent profiling

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

Pipeline and cable routing

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

Slope analysis for land assessment

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

Terrain clearance for flight paths

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

Structured elevation, ready to plot or process.

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
Example response - path query (3 waypoints) 200 OK
{
  "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

GET https://api.farun.io/v1/elevation

Query parameters

coordinates req
string
One or more lon,lat pairs separated by |. E.g. 77.20,28.61|77.22,28.63. Max 512 points.
include_slope
boolean
Return slope_deg and slope_pct between consecutive waypoints. Default: false.
units
string
Altitude units. metres (default) or feet.
resolution
string
Terrain dataset resolution hint. auto (default) | high | standard.

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

Start building

Coordinates to terrain context
in one request.

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.