OSRM Route Optimization API
PremiumHosted OSRM (Open Source Routing Machine) — production-ready API, no self-hosting.
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.
Overview
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.
Time windows
Capacity constraints
Driver working-hour limits
Computation in milliseconds
API reference
POST
/api/1/vrp| Parameter | Type | Status |
|---|---|---|
| vehicles | array | Required |
| services | array | Required |
Example request
Credit cost: 10 credits + 1 per stopcurl -X POST "https://osrmroute.com/api/1/vrp?key=YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{"vehicles":[{"id":1,"start":[49.85,40.37]}],"services":[{"id":10,"location":[49.86,40.40]}]}'Other services
Routing APIGeocoding APIPlaces APIMatrix 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