Skip to main content

Trip API

Traveling salesman problem (TSP): given several stops, return an approximately optimal visiting order. Great for delivery route previews and multi-stop visit planning. Powered by the OSRM Trip service.
Need richer constraints (multiple vehicles, time windows, capacity)? Use Fleet Optimization instead.

Endpoint

Request Parameters

TSP is NP-hard, so the result is approximately optimal (brute force guarantees the optimum below 10 points). All input coordinates must be connected for the trip to be solvable.

Quickstart

Response

response-example.json

Response fields

The visiting order comes from the waypoints array order — not the order you sent in the request.