Calculate travel times and distances between any set of locations in a single API call
Powered by OSRM and OpenStreetMap.
✅ No credit card required 🇪🇺 Hosted in the EU
Get Free API KeyA 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" \
-H "Authorization: Bearer 988b35cc-6183-4922-bbc0-857e1a1d318d"
This is a live demo with a real API key (feel free to steal it).
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).
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.
/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.