Swap router.project-osrm.org for a hosted OSRM with an API key. Your requests don't change.
✅ No credit card required 🔓 Standard OSRM HTTP API
Get Free API Key
router.project-osrm.org is the OSRM project's public demo, and it's a generous thing to have: worldwide car, foot and bike routing with no signup. It's there so people can try OSRM out, not to sit behind an application. The project's usage policy keeps it to reasonable, non-commercial use at no more than one request per second, and it comes with no promises about uptime, latency or how fresh the map data is.
That's fine for a prototype or a weekend project. Once you're building something commercial, need more than a request a second, or can't afford to go down when the demo does, you need an OSRM of your own. You can self-host it on a large server, or use a hosted one.
Paths, query parameters and responses are the standard OSRM v1 API. Only the host and the auth header change.
# Before curl "https://router.project-osrm.org/route/v1/driving/-73.9935,40.7506;-73.7781,40.6413?overview=full" # After curl "https://api.simplerouting.io/osrm/route/v1/driving/-73.9935,40.7506;-73.7781,40.6413?overview=full" \ -H "Authorization: Bearer YOUR_API_KEY"
The same change in JavaScript:
// Before const BASE = "https://router.project-osrm.org"; const res = await fetch(BASE + "/route/v1/driving/-73.9935,40.7506;-73.7781,40.6413?overview=full"); // After const BASE = "https://api.simplerouting.io/osrm"; const res = await fetch(BASE + "/route/v1/driving/-73.9935,40.7506;-73.7781,40.6413?overview=full", { headers: { Authorization: "Bearer YOUR_API_KEY" }, });
Pass the base URL and the header to the OSRM router. Everything else stays as it is.
from routingpy.routers import OSRM
client = OSRM(
base_url="https://api.simplerouting.io/osrm",
headers={"Authorization": "Bearer YOUR_API_KEY"},
)
route = client.directions(
locations=[[-73.9935, 40.7506], [-73.7781, 40.6413]],
profile="driving",
)
print(route.duration, route.distance)
Get the road-following route geometry between any waypoints — ready to draw on Leaflet, Mapbox, or any map library. Turn-by-turn steps included.
Calculate travel distances and times between multiple points. Perfect for logistics and planning.
Assign jobs to vehicles and get optimal stop order. Handle time windows, capacity constraints, and multi-vehicle fleets.
Snap GPS traces to the road network. Clean up tracking data and analyze actual routes driven.
Car, bicycle, and truck routing across North America and Europe.
Built on OSRM, Valhalla, VROOM, and OpenStreetMap. No vendor lock-in, no proprietary formats.
# Get directions from Penn Station to JFK Airport
curl "https://api.simplerouting.io/osrm/route/v1/driving/-73.9935,40.7506;-73.7781,40.6413?overview=full" \
-H "Authorization: Bearer 988b35cc-6183-4922-bbc0-857e1a1d318d"
This is a live demo with a real API key (feel free to steal it).
No overages — your plan is your bill.
Hitting the limits, want more countries, or need a bespoke solution? Email [email protected] — we'll figure it out.