OSRM Matrix API
Calculate travel-time and distance matrices between multiple locations. Use road-network results for planning within your plan and request limits.
/api/v1/osrm/table/v1/{profile}/{coordinates}Current plan limits
Free includes Routing, Route Optimization, Geocoding (including reverse lookup and autocomplete) and Matrix APIs within plan limits. Map Matching, Isochrone, Truck Routing, Fuel Estimate and other separate APIs require a paid plan, including PAYG. API access follows the account’s effective plan; a positive balance alone does not override Free restrictions. Road Data and AI retain their separate Business requirements.
Credit and requests-per-minute limits are shared across all account keys. An additional key credit cap cannot enlarge the account budget. Included credits are used first, then purchased credits.
Current plans and pricingOverview
The Matrix API calculates travel times and distances between origins and destinations in one request. It supports optimization, dispatch and driver selection. Limits depend on your plan; processing time varies by region, graph cache and matrix size. Validate your expected workload before production.
API reference
/api/v1/osrm/table/v1/{profile}/{coordinates}| Parameter | Type | Status |
|---|---|---|
| profile | string | Required |
| coordinates | string | Required |
| annotations | string | Optional |
| sources | string | Optional |
| destinations | string | Optional |
Example request
Credit cost: max(1, ceil(cells * 2 / 5))curl "https://osrmroute.com/api/v1/osrm/table/v1/driving/49.85,40.37;49.86,40.40;49.83,40.39?annotations=duration,distance" -H "Authorization: Bearer YOUR_KEY"