How to produce an .osm file containing county borders

Hi folks–
For an already existing in-house process, I need to refresh a very out-dated file.
What I need is a .osm file containing the boundaries for all US counties. (I need this in order to resolve county FIPS codes (aka SAME codes) into boundaries.)
One approach that I’ve tried is to iterate over a list of the FIPS codes that I need to resolve, and for every code, retrieve the boundaries, e.g (in pseudo-code):

for every fips_code:
    query the overpass-api for:    
            out geom;

This approach would result in over 3000 hits against the overpass-api, and has other downsides as well.

The second approach would be a single query for all admin-level=6 objects in the U.S., which is something like:

{{geocodeArea:UnitedStates (?) }}->.searchArea;
out geom;

This approach would have the effect of asking for a large dataset all at once (looking beyond the fact I don’t currently know how to correctly ask for “all county-level objects in the United States.”

Are there better alternatives?

(I’ve found websites offering up various extracts from OSM that would probably contain what I need, but none of them seem to be in the .osm format that our current process needs. And if we can devise a query that successfully pulls the data we want, we slightly prefer that approach.)

Thanks for any advice/info/guidance,

Phil Walsh

A third approach, that I did not expect to work but actually does, it to create a script calling out each individual fips-code, and retrieving them all in a union. This is surprisingly fast:

[...3000 lines deleted...]
out geom;

and doesn’t even require anything other than the default values for ‘timeout’ and ‘maxsize.’

I can generate the lines of the script and execute it in python, so barring some other hurdles, this seems to be very workable.