Elevation Profile API
Elevation at every point of a path plus total ascent, descent and distance — a full route profile.
/api/1/elevation/profileCurrent plan limits
Free includes Routing, Route Optimization, Geocoding (including reverse lookup and autocomplete) and Matrix APIs within plan limits. Map Matching, Isochrone, Truck Routing, Fuel Estimate and other separate APIs require a paid plan, including PAYG. API access follows the account’s effective plan; a positive balance alone does not override Free restrictions. Road Data and AI retain their separate Business requirements.
Replace YOUR_KEY with your own API key. Paid API requests consume credits; copying this example does not send a request.
Current plans and pricingOverview
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
/api/1/elevation/profile| Parameter | Type | Status |
|---|---|---|
| points | array | Optional |
| polyline | string | Optional |
Example request
Credit cost: 1 credit / 10 pointscurl -X POST "https://osrmroute.com/api/1/elevation/profile" \
-H "Authorization: Bearer YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{"points":[[40.37,49.85],[40.80,48.90],[41.30,48.05]]}'