An OpenStreetMap routing API for bikes, gravel, hiking and cars

Routes between up to 50 points on OpenStreetMap data, with profiles made for riding and walking rather than driving: quiet roads, gravel tracks, mountain bike trails and footpaths. The answer is a line with a height at every point, its length, climb and duration, or a GPX file ready for a bike computer.

curl https://geo.runningcat.dev/v1/route -H "Authorization: Bearer YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{"points": [[6.143, 46.204], [6.869, 45.924]], "profile": "road-bike"}'
Example request

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) or gpx

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.

PlanRoutes a dayRoutes at oncePrice
Free201$0
Developer1,0002$14.99 a month
Pro5,0002$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.

The free plan gives 500 requests a day, for commercial apps too. Create an account with Google or your email and make your keys right away.