OSRM Matrix API
Ultra FastHosted OSRM (Open Source Routing Machine) · Table Service — production-ready API, no self-hosting.
Fast distance computation at scale: instantly compute the time and distance matrix between hundreds of points at once. Speed up your optimization algorithms based on real road networks.
Overview
The Matrix API computes the travel time and distance between many origins and destinations in a single call. Instead of thousands of separate routing requests, get the full N×N cost matrix at once — the essential input for optimisation, dispatching and nearest-driver logic. Computed on real road networks and returned in milliseconds, it scales to hundreds of points per request.
API reference
GET
/api/v1/osrm/table/v1/{profile}/{coordinates}| Parameter | Type | Status |
|---|---|---|
| profile | string | Required |
| coordinates | string | Required |
| annotations | string | Optional |
Example request
Credit cost: 1 credit / 10 cellscurl "https://osrmroute.com/api/v1/osrm/table/v1/driving/49.85,40.37;49.86,40.40;49.83,40.39?annotations=duration,distance&key=YOUR_KEY"
Other services
Routing APIRoute Optimization APIGeocoding APIPlaces APIIsochrones APIMap Matching APINearest APITrip API (TSP)Location ClusteringDirections APIAlternative Routes APISnap to Road APIAutocomplete APIBatch Geocoding APITimezone APIElevation APIBoundary Lookup APIGeofencing APIElevation Profile APISolar APIGeometry Utilities APICoordinate Conversion APICountry Info API