Filtering osm data for overpass-api

Hi there,
I am pretty new to osm but I really enjoy it ;). I am working on app that queries osm overpass-api. So I have managed to run overpass api on aws ec2 cloud servers. Everything works awesome but I have pretty huge osm db (and it is pretty expensive) and I do not need most of included information. Is it possible to somehow cut all unwanted data (and still obtain regular updates)? My query looks something like:*[maxspeed=*][bbox=17.00714,48.09589,17.20714,48.19589]

Everything what I need to get are coordinates with maxspeed, name (of street) and highway tags for way? Is it possible to use cut osm db to work with overpass-api? Is it possible to cut out everything but maxspeed, name and highway? Thank you very much

So you want to use an own instance of overpass-api, which uses an already filtered database?

via there is a link to the overpass-api mailinglist … try to ask there.

and you know the overview via ?

Hi Stephan,
thank you for your answer ;). I have already run overpass api intance with data downloaded from Everything works fine but it is very uncomfortable to have almost 700GB db size for planet file. I do not need most of the data so I wonder if it is possible to filter data before I uncompress them on my remote server - so lets say I wanna uncompress czech republic osm file which will have cca 15GB uncompressed on server - is it possible to “filter out” unwanted data from .bz2 file before uncompression? How to achieve this?
Thank you and have a nice day!


Hello Franta,
you know that there are tools like and osmconvert that work on raw OSM data?

Try these tools with small planet extracts first … if you have found right parameters to filter, then use them on czech republoch OSM file. … Success?

Thank you for your answer - I have already used omsosis to filter data where I get cca 50% data decrease. OSMFilter looks good - maybe I could even get better storage efficiency with it. I will give it a chance ;). Thank you for your pieces of advice.

PS: In case somebody will solve similar question in the future I attach my osmosis script.

--read-xml pathToSRCXML.osm 
--tag-filter reject-relations 
--tag-filter accept-ways maxspeed=* 
--write-xml PathToOutput.osm