Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I need a routing service with an API callable from a web or desktop application. I have several points: a start, an end, and intermediate points in the disorder. I expect the routing service to send me the shortest path between the start and the end, via every intermediate point. Do you know such a service ?

share|improve this question

OSRM has an routing API that can do that. You can find the documentation for the API here. But you have to put them in the order of appearance beforehand.

To route via certain coordinates list them in the query string in the order of appearance (currently limited to 25 max points and to vehicle routing only):,lon1&loc=lat2,lon2&loc=lat3,lon3&loc=lat4,lon4&...&latX,lonX

Please have a look at the API Usage Policy before you use it.

share|improve this answer
Thanks for this reply. I just tried, but the result is the route between every point, in the order they are specified in the URL. I also tried the API and the result is the same. I need a router which find a path going through each point in the best order. – superrache Feb 27 '14 at 16:27
Yeah that's right. Like I said you have to but them in order beforehand. Sorry that this doesn't help. – ustroetz Feb 27 '14 at 16:34

A bit late but there is another candidate. The Routing API of the GraphHopper Directions API has an optimize=true parameter and supports several dozens of locations (dependent on the purchased package). And with the Route Optimization API you can solve a lot more complex problems with time windows, capacity restrictions, multiple vehicles etc

Disclaimer: I'm the co-founder of GraphHopper

share|improve this answer
I just want to mention which is also based on OSM data. – stephan75 Jun 11 at 6:42
up vote 1 down vote accepted

MapQuest Open Directions API Web Service has an "Optimized routing" feature:

All the power of the routing function, plus we'll re-order the stops for you to provide the most efficient route to get to all your stops. Great for planning out the best way to get round multiple places you need to visit in a single journey.

There is also Google Directions API, in which you have to specify both origin and destination points, more waypoints with the "optimize:true" option to get the best waypoint order.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.