Mobile apps

What is a routing API?

A routing API is a web service that calculates a route between two or more points and returns turn-by-turn steps, distance, duration and a path to draw on the map, for cars, bikes, trucks or pedestrians.

What apps do with it

Estimate arrival times, compute trip distance, optimise a driver's stops, show a path in a passenger app, and check whether a pick-up is inside a service area. Distance-matrix variants compare many origins and destinations at once, for example finding the nearest free driver.

What decides quality

Road data freshness, live traffic, turn restrictions, vehicle profile and how the provider handles closed roads. Google, Mapbox, HERE and TomTom offer commercial APIs, while OSRM, GraphHopper and Valhalla run on OpenStreetMap data that you can host yourself.

Points to watch

  • Costs scale with requests, so cache repeated routes and avoid calling on every location update.
  • Terms often require showing results on the provider's own map.
  • Traffic-aware times differ from free-flow times; label them clearly.
  • Plan fallbacks for outages and rate limits.

Questions, answered

For rough radius checks yes. For fares, ETAs and dispatch it understates real road distance.

Yes, with open-source engines and OpenStreetMap data, trading provider fees for server work.

By the Stegnor team · Updated