Stack Exchange
Get tag information from openstreetmap, specifically tag info
I have some code giving me information about the geotag of an image I have obtained from flickr. The code is the following:
geolocator = Nominatim()
location = geolocator.reverse("{}, {}".format(lat, lon))
print(location.address)
print url
print(location.raw)
dict = location.raw
osmid = dict.get('osm_id', 'default_value_if_null_here')
osmtype = dict.get('osm_type', 'default_value_if_null_here')
print osm_type

I am obtaining the lat, lon and url variables from the image I obtain. Then using the geopy package I receive back the following results
5, Linnaeusweg, Paardenveld, IJsselstein, Bestuur Regio Utrecht, Utrecht, Nederland, 3401MS, Nederland
https://farm2.staticflickr.com/1456/24640378196_c096ea190b_m.jpg
{u'display_name': u'5, Linnaeusweg, Paardenveld, IJsselstein, Bestuur Regio Utrecht, Utrecht, Nederland, 3401MS, Nederland', u'place_id': u'37712154', u'lon': u'5.0540829', u'osm_type': u'node', u'licence': u'Data \xa9 OpenStreetMap contributors, ODbL 1.0. http://www.openstreetmap.org/copyright', u'osm_id': u'2919181986', u'lat': u'52.0175634', u'address': {u'town': u'IJsselstein', u'industrial': u'Paardenveld', u'house_number': u'5', u'country': u'Nederland', u'county': u'Bestuur Regio Utrecht', u'suburb': u'IJsselstein', u'state': u'Utrecht', u'postcode': u'3401MS', u'country_code': u'nl', u'road': u'Linnaeusweg'}}
node

The ultimate goal of my code is to somehow use openstreetmap to see if this location corresponds to some landmark. However for now my question is as follows.
If I take all the results that come back as osm_type node, how would I input the info I have received to openstreetmap to get info about the node such as the following example I found
< node id =" 592637238 " lat =" 47.1675211 " lon =" 9.5089882 "
       version ="2" changeset =" 6628391 "
       user =" phinret " uid =" 135921 "
       timestamp =" 2010 -12 -11 T19:20:16Z " >
   < tag k=" amenity " v=" bar " / >
   < tag k=" name " v=" Black Pearl " / >


If I could get this data maybe then I could use the tags to see if it is a landmark. I have looked into osmapi but I do not know how to use it
Sorry for how rambling my question is I am new to python also openstreetmap so any help would be so appreciated!

You can download the node details via the API, example for your node with ID 2919181986: http://www.openstreetmap.org/api/0.6/node/2919181986. However keep in mind that Nominatim returns nodes, ways and relations, each element will need a slightly different API call. Another issue is that the corresponding landmark might be further away (e.g. when photographing a large building or mountain), so the nearest result must not be the correct one.
Another approach is to skip Nominatim completely and use Overpass API instead for returning all data around the coordinates in question. This way you can look at all results and weight them by importance and distance. Also you will only need a single call for each coordinate because Overpass API already returns all tags.
