Is there any free directions REST API compatible with OpenStreetMap?

There is nothing provided directly by the OpenStreetMap project, but there are other options provided using OpenSteeetMap data such as the MapQuest Open Directions API Service.


You can use the Open Route Service https://openrouteservice.org/

It has an API (docs) that has a comprehensive description and is free.


In reference to your question and Android draw route on openstreetmap I found YOURS api which is free for use.

The routing API is open and freely available for everyone under the condition that you don't overload the server. Overloading the server in this context means: more then 1 request per second for sustained periods of time.

Here is a sample request i used in replacement of Google's Direction Api:

http://www.yournavigation.org/api/1.0/gosmore.php?flat=28.6337465&flon=77.35780799999999&tlat=28.6388179&tlon=77.3606496&format=geojson