Is it possible to get a dataset of administrative boundaries available in OSM?

I am relatively new to OSM and understand that you can access administrative regions by their name; for example, this overpass query

area
  ["boundary"="administrative"]
  ["name"="Gaithersburg"]->.a;       
way(area.a)["highway"]; node (w); out body;

gets all nodes on highways in Gaithersburg, MD. Under the hood, I assume there is some kind of key-value store that maps words (e.g. Gaithersburg) to their respective areas.
My question is, is it possible to access a list/dataset of all administrative boundaries in an area, such that an application user could select one from a menu and seamlessly query inside that boundary?

2 posts - 2 participants

Read full topic


Ce sujet de discussion accompagne la publication sur https://community.openstreetmap.org/t/is-it-possible-to-get-a-dataset-of-administrative-boundaries-available-in-osm/108623