This is what I purchased, but you have plenty of options to choose from. On Amazon, select "Automotive Parts and Accessories" to the left of the search bar. Search for "washer pump" or "washer pump grommet with filter" and put in the make, model, and year of your Z4. I have Amazon Prime so I selected only those available for Prime.
Pump:
https://smile.amazon.com/gp/product/...?ie=UTF8&psc=1. The cost for this is now $9.18.
Filter:
https://smile.amazon.com/gp/product/...?ie=UTF8&psc=1. The cost for this is now $7.08! Still cheap, but more than 3 times the price I paid!