The request
{
"profile": "road-bike", "lengthKm": 86.458, "ascentM": 1083, "durationS": 20880,
"geometry": { "type": "LineString", "coordinates": [[lon, lat, ele], ...] }
}
- points
- 2 to 50 points as [lon, lat]: start, waypoints, finish
- profile
bike(default),city,road-bike,quiet-road-bike,gravel,mtb,hiking,car,shortest- alternative
- 0 to 3: the best route or one of three alternatives
- format
geojson(default) orgpx
How long a route takes
Routing searches the road network, so time grows with distance. In our tests a 13 km city ride took one or two seconds, 85 to 140 km six to ten seconds, and 530 km 20 to 25 seconds. A search that would take longer than two minutes stops with status 504; add a waypoint or split the trip into legs. A start in a pedestrian zone or on a track the profile cannot use answers 404 with no_route.
Limits
A route counts once per started 100 km of the route found (50 km for the MTB profile), against both your requests and your routes, so a 250 km route counts as three, or five on MTB. Routes also have their own limit on how many run at once.
| Plan | Routes a day | Routes at once | Price |
|---|---|---|---|
| Free | 20 | 1 | $0 |
| Developer | 1,000 | 2 | $14.99 a month |
| Pro | 5,000 | 2 | $39.99 a month |
After the route
Send the line back to get what lies along it: the weather at the time you get there, the elevation profile, water, food and shops, river gauges, air quality stations, borders and time zones. POST /v1/route/report returns several of them in one request.
Credits: routes on map data © OpenStreetMap contributors, available under the Open Database License.