OSRM Route Optimization API
Handle complex logistics and turn your fleet's toughest routing tasks into efficient delivery plans. Work with time windows, driver skills and custom vehicle constraints.
/api/1/vrpCurrent 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.
Replace YOUR_KEY with your own API key. Paid API requests consume credits; copying this example does not send a request.
Current plans and pricingOverview
The Route Optimization API turns a fleet's toughest planning problems into efficient delivery plans. Give it a set of vehicles and stops and it solves the Vehicle Routing Problem (VRP) — assigning stops to vehicles and ordering them to minimise total drive time and cost. It handles capacity, time windows and multiple depots, so dispatchers stop planning routes by hand and couriers drive fewer kilometres.
API reference
/api/1/vrp| Parameter | Type | Status |
|---|---|---|
| vehicles | array | Optional |
| services | array | Optional |
| shipments | array | Optional |
| profile | string | Optional |
Example request
Credit cost: max(10, ceil(vehicles * task_points * 13 / 15)) creditscurl -X POST "https://osrmroute.com/api/1/vrp" \
-H "Authorization: Bearer YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{"vehicles":[{"vehicle_id":"v1","start":[49.85,40.37]}],"services":[{"id":10,"location":[49.86,40.40]}]}'