How to find nearest road(API)

This looks like querying for a NODE which has highway=road … that will fail!

Because you have to look for WAYS … and a tag with the key “highway” can have different values, not only “road”

Read much at the OSM wiki, especially at http://wiki.openstreetmap.org/wiki/Elements and http://wiki.openstreetmap.org/wiki/Key:highway

Success?