OSRMRoute

Trip API (TSP)

Round Trips

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}
ParameterTypeStatus
profilestringRequired
coordinatesstringRequired
sourcestringOptional
destinationstringOptional

Example request

Credit cost: 5 credits
curl "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