Extracting and geocoding data from OSM

There is any simple solution to extract data from OSM, and sort them by geographical location? For example, I would like to list all historical places or caves in my country, and sort them by province, county and municipality where they are located. I know about Overpass, but it could only do a half of job (data extraction). How later match places with administrative areas?

Once you’ve got the .osm file with the scope you need, you can convert it into the .shp file using one of the available tools. Then use a GIS software, e.g. Quantum GIS (it’s open source) to manage your data in the way you want to - there are lots of possibilities, among other selecting objects by their location. As far as I know it’s possible to select objects in that way in JOSM and then export them to new .osm file, but I don’t know if this will satisfy you.

Maybe you need a geo database with special queries … have a certain object and find out what boundary it is in.

Or do a systematical query at overpassAPI:
Create a list with all admin areas that are important. Then do a single query at overpass limited by the “area” parameter for each county etc.

there was an example at help.osm.org … search for overpass and area there

EDIT: found https://help.openstreetmap.org/questions/20053/locating-an-osm-object-eg-finding-town-relation-name

Thanks for answers! I will try with Quantum GIS first, later with script to querying OverpassAPI. I would like to avoid install and populate geo database just for single report.