Elevation Profile API
GlobalElevation at every point of a path plus total ascent, descent and distance — a full route profile.
Overview
The Elevation Profile API takes a path — a points array or an encoded polyline — and returns the elevation at every point, plus total ascent, total descent, min/max elevation and cumulative distance. Perfect for cycling, hiking and running apps that need a climb profile. Global SRTM data, so it works anywhere.
API reference
POST
/api/1/elevation/profile| Parameter | Type | Status |
|---|---|---|
| points | array | Required |
| polyline | string | Optional |
Example request
Credit cost: 1 credit / 10 pointscurl -X POST "https://osrmroute.com/api/1/elevation/profile?key=YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{"points":[[40.37,49.85],[40.80,48.90],[41.30,48.05]]}'Other services
Routing APIRoute Optimization APIGeocoding APIPlaces APIMatrix APIIsochrones APIMap Matching APINearest APITrip API (TSP)Location ClusteringDirections APIAlternative Routes APISnap to Road APIAutocomplete APIBatch Geocoding APITimezone APIElevation APIBoundary Lookup APIGeofencing APISolar APIGeometry Utilities APICoordinate Conversion APICountry Info API