you need to know the exact bosch part number on the afm, then look here..
http://www.maf-shop.com/index.php/cat/c8_BMW.html
you wont find it new for cheaper..
if you can find it second hand just make sure you can return it if it does not work, afm's are fragile and a second hand is always a gamble
ps. DONT buy anything other than a bosch, you will regret it