How do I use Overpass to retrieve just a list matching objects?

Here is an example query that’s close to what I’m looking for:


I get the data, but with all the tags on those objects. I’m looking for just the objects (in any format) - in this case just a list of way IDs, without the tags. There’s probably some variant of “out” that does this but the OSM wiki is unhelpful.

I use something like [out:csv (::id, ::type)] in front of the [date..].

For example:

[out:csv(::id,::type, ::lat,::lon, shop, name, brand,  "addr;housenumber","addr:street",   "addr:city"; true; ",")][date:"2020-01-01T00:00:00"]
{{geocodeArea: Nottingham, England }}->.searchArea;
// print results
out center;

The csv format allows larger volumes of data to be retrieved, presumably because more work is done server side. For instance drop the date clause and change the area to USA and you can get all the shops (~500k).

Edited to remove a union clause "( ... );" which also found nodes of ways (see comments).

1 Like
out ids;