Catalog/maps-elevation-profile

Maps

Elevation profile of a path (gain/loss) API

Turn a polyline (ordered lat/lon points) into a full elevation profile: evenly resampled points along the route with cumulative distance and height, plus total ascent (gain), descent (loss), min/max/start/end elevation, and net change — using keyless Open-Meteo elevation. Unlike single-point elevation, this profiles a whole route. Answers 'elevation profile of this hike', 'total climbing on this route', 'how much elevation gain along this path', 'min and max altitude of a trail'.

Price$0.01per request
MethodPOST
Route/v1/maps/elevation-profile
StatusLive
MIME typeapplication/json
Rate limit60/minute
Cache3600s public
mapselevation-profileelevationaltitudegainascentrouteopen-meteo
API URLhttps://x402.hexl.dev/v1/maps/elevation-profile
Integration docs
Example request
{
  "path": [
    {
      "latitude": 46.8,
      "longitude": 8.2
    },
    {
      "latitude": 46.81,
      "longitude": 8.21
    }
  ],
  "samples": 2
}
Example response
{
  "samples": 2,
  "totalDistanceMeters": 1342,
  "elevationGainMeters": 0,
  "elevationLossMeters": 446,
  "minElevationMeters": 1327,
  "maxElevationMeters": 1773,
  "startElevationMeters": 1773,
  "endElevationMeters": 1327,
  "netElevationMeters": -446,
  "profile": [
    {
      "latitude": 46.8,
      "longitude": 8.2,
      "distanceMeters": 0,
      "elevationMeters": 1773
    },
    {
      "latitude": 46.81,
      "longitude": 8.21,
      "distanceMeters": 1342,
      "elevationMeters": 1327
    }
  ]
}
Input schema
{
  "type": "object",
  "required": [
    "path"
  ],
  "properties": {
    "path": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "latitude": {
            "type": "number"
          },
          "longitude": {
            "type": "number"
          }
        }
      },
      "examples": [
        [
          {
            "latitude": 46.5,
            "longitude": 8
          },
          {
            "latitude": 46.55,
            "longitude": 8.05
          }
        ]
      ]
    },
    "samples": {
      "type": "number",
      "examples": [
        20
      ]
    }
  }
}
Output schema
{
  "type": "object",
  "additionalProperties": true
}