Calculate travel times and distances between any set of locations in a single API call. Counted per call, not per element.
Powered by OSRM and OpenStreetMap.
✅ No credit card required 🇪🇺 Hosted in the EU 🔓 Open source, no lock-in
Get Free API KeyAlways free for small projects. $15/mo covers most apps
A distance matrix API computes an N×M grid of travel times and distances in a single request. Instead of making separate routing calls for every pair of locations, you send all your points at once and get back every combination instantly.
Find the fastest order to visit a set of stops. Feed the matrix into any VRP solver or your own scheduling logic.
Given a customer location, rank your store locations by actual drive time — not straight-line distance.
Pre-compute all pairwise travel times for a fleet assignment problem or warehouse-to-customer matching.
4 NYC landmarks. Click Run Demo to fetch real travel times from the API.
# Distance matrix between 4 NYC landmarks
curl "https://api.simplerouting.io/osrm/table/v1/driving/-73.9855,40.7580;-74.0134,40.7127;-73.9718,40.7678;-73.9614,40.7143"
This is a live demo — no account required to get started.
Sign up for a free key, then drop it into this curl command:
# Times Square, World Trade Center, Central Park, Williamsburg
curl "https://api.simplerouting.io/osrm/table/v1/driving/-73.9855,40.7580;-74.0134,40.7127;-73.9718,40.7678;-73.9614,40.7143" \
-H "Authorization: Bearer YOUR_API_KEY"
Coordinates are longitude,latitude pairs separated by semicolons. The response is a JSON object with a durations array (seconds) and a distances array (meters).
$15/month for 100× the free limit, flat. No per-element billing, so a big matrix costs the same as a small one. Compare that with Google's per-element pricing →
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.
The API returns a JSON object with a durations array of arrays (travel time in seconds between each pair) and a distances array of arrays (distance in meters). The diagonal is always 0. Example: durations[0][1] is the travel time from point 0 to point 1.
For most use cases (under 25 points) expect results in well under a second. If you need larger matrices and are hitting limits, email [email protected] and we'll sort it out. Either way, a matrix counts as one request, not one per element — see what that does to the bill compared with Google.
/table API?Yes. The endpoint follows the standard OSRM Table Service specification. If you are already using a self-hosted OSRM instance, switching is a one-line URL change plus an Authorization header.
The free tier covers North America and Europe. Need more regions? Email [email protected] — coverage is added based on demand.