PHP and Javascript examples to connect to the RouteXL routing optimization API
Switch branches/tags
Nothing to show
Clone or download
routexl Stringify result
Solving a violation
Latest commit 168f9c4 Jul 5, 2018
Type Name Latest commit message Commit time
Failed to load latest commit information.
Google Apps Script Add Google Apps Script example Jan 23, 2017
Javascript Stringify result Jul 5, 2018
PHP Adding Javascript example Jan 14, 2016 Adjust readme for Google App Script Jan 23, 2017


Code examples to connect to the RouteXL routing optimization API.

Multi stop routing

The Travelling Salesman Problem (TSP) asks the following question: Given a list of cities and the distances between each pair of cities, what is the shortest possible route that visits each city exactly once and returns to the origin city?

It is an NP-hard problem in combinatorial optimization, important in operations research and theoretical computer science. The problem was first formulated in 1930 and is one of the most intensively studied problems in optimization.

Read more about TSP:


RouteXL ( is an online routing optimization service. RouteXL sorts destinations in the fastest order to drive. Itineraries with multiple stops are optimized to save travel time and fuel costs. Route optimization lowers CO2 and NOx emissions.

The RouteXL API provides programmatic access to optimize multi stop itineraries. Send locations, get distance tables and the optimized order of stops. In the optimization time windows are supported. Responses are in JSON.

Read more about the API: