How to find the nearest city for a POI in a OpenStreetMap/PostGIS data

I’m interested in finding additional data for the POIs in OSM database.

Currently I can use the following SQL for getting the name+long+lat for all the POIs

SELECT name,
x(transform(way, 4326)) AS lon,
y(transform(way, 4326)) AS lat
FROM planet_osm_point
WHERE tourism=‘museum’
UNION
SELECT name,
x(centroid(transform(way, 4326))) AS lon,
y(centroid(transform(way, 4326))) AS lat
FROM planet_osm_polygon
WHERE tourism=‘museum’

I would also like to have the name of the nearest town/city or the town/city the POI is situated in.
Thank you,
Catalin

If you are aware of SQL queries that you have listed, then you should have a look at the http://wiki.openstreetmap.org/wiki/Overpass_API and all its features.

But I don’t know whethet that API can solve your special task that you are aiming at. So tell us about success or failure.

Thank you,

Nominatim gives back the details I wanted using a more simple request - using just the coordinates and not a box

Thank you again,
Catalin