Query OSM to retrieve the time of a journey given two coordinates

Hi all,
the piece of information i would like to retrieve is just a simple vector latitude1, longitude1, latitude2, longitude2, time to travel (the user would select driving, cycling, public transports etc…).
The two points are given by the user.
It looks like a very easy problem to solve, but i’ve just started with this idea and i would like to start on the right “route”. :slight_smile:
What would be the best solution in your opinion?
Thank you guys!

Do you want to use and existing router or write a new one?

If use an existing router, have a look at the routing options on the OSM front page. When you request a route, there’s a link to whichever router you select, such as http://project-osrm.org/ , and you can have a look to see what APIs are available, such as https://github.com/Project-OSRM/osrm-backend/wiki/Server-api . Any API will likely have terms of use, such as https://github.com/Project-OSRM/osrm-backend/wiki/Api-usage-policy . Other routers are available, and will have similar options.

If writing a new one, good luck! Especially with public transport, the data for which is mostly not in OSM.

Marisho, have a look at http://wiki.openstreetmap.org/wiki/Routing in general!