OSRM Trip API (TSP)
Round TripsHosted OSRM (Open Source Routing Machine) · Trip Service — production-ready API, no self-hosting.
Solve the travelling-salesman problem: order a set of stops into the shortest round trip. Ideal for delivery loops and multi-stop errands.
Overview
The Trip API solves the travelling-salesman problem (TSP): given a set of stops, it orders them into the shortest possible round trip. Perfect for delivery loops, field-service visits and multi-stop errands where the start can be fixed and the vehicle returns to base. One call replaces manual sequencing and cuts total drive time.
API reference
GET
/api/v1/osrm/trip/v1/{profile}/{coordinates}| Parameter | Type | Status |
|---|---|---|
| profile | string | Required |
| coordinates | string | Required |
| source | string | Optional |
| destination | string | Optional |
Example request
Credit cost: 5 creditscurl "https://osrmroute.com/api/v1/osrm/trip/v1/driving/49.85,40.37;49.86,40.40;49.83,40.39?source=first&key=YOUR_KEY"
Other services
Routing APIRoute Optimization APIGeocoding APIPlaces APIMatrix APIIsochrones APIMap Matching APINearest APILocation ClusteringDirections APIAlternative Routes APISnap to Road APIAutocomplete APIBatch Geocoding APITimezone APIElevation APIBoundary Lookup APIGeofencing APIElevation Profile APISolar APIGeometry Utilities APICoordinate Conversion APICountry Info API