You can extract particular types of features from OpenStreetMap data to give you a dataset that only includes the features you're interested in, and not others. You can filter the data based purely on a combination of primitive type and tags, and you can combine multiple filters to produce a set of data to fit your exact requirements.
The tag filter task works on a single primitive type per task, and can include or exclude those primitives from the pipeline based on the tags used. It leaves other types of primitive untouched.
To extract all nodes from our United Kingdom extract tagged with
shop=*, we'd use the following command:
osmosis --read-xml file="united_kingdom.osm.bz2" --tag-filter acceptnodes ...