OSRM Trip API (TSP)
Round TripsHosted OSRM (Open Source Routing Machine) — a production API without self-hosting.
Order multiple stops into a driving trip using the TSP service. Explore route geometry, visit order and request limits for multi-stop journeys.
GET
/api/v1/osrm/trip/v1/{profile}/{coordinates}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 |
|---|---|---|
| geometries | string | Optional |
| 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&geometries=geojson&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