List of all 3,143 osm_ids for U.S. Counties

Does anyone know if a list of all the OSM Reference Id’s for U.S. Counties exists anywhere, or how one might be created ?

OverpassAPI might be your friend:

Counties in MI

For whole USA I get 3270 admin_level=6-relations, so you might need to check for some issues in the resulting data…

EDIT: added ["boundary"="administrative"] to the code.


Wow, this was great ! and EXACTLY what I was looking for. For each state, the county name and it’s OSM Relation-Id. Thanks SO Much.

1 Like

If you are happy with this solution, please click the “solved” button below the reply of @aighes … thanks, mate.

Just be careful with these results @Rick_Teitelman, as an entity in the USA that is admin_level=6 is often a county (or a parish in Louisiana or a division in Alaska), but in the case of non-states (territories, commonwealths…) these are not “counties” at all, rather, they are known as “municipalities” and have various flavors of these in each territory or commonwealth (different names of municipalities like District, Island, Municipio, while they are all categorized as municipalities at admin_level=6).

See our United States admin level - OpenStreetMap Wiki wiki.

1 Like