The editing API is not going to be what you want in any case.
In general you should either use an extract service/extract the data yourself, or use the Overpass (or similar) read-only API Overpass - OpenStreetMap Wiki . This is, assuming you want to build a routable graph yourself and use it with you own implementation of a routing algorithm.
If you don’t want to do that, simply use one of the many routing APIs/engines: Routing - OpenStreetMap Wiki