I have found that by mixing a ratio of 5 lbs white cornmeal and 2 lbs of cornstarch together will make a very nice carpet cleaner. I sprinkle it on using my small mesh strainer and scrub it in with a long handled brush. Wait at least one hour, 2 is better; and then vacuum it up. I was using an expensive dry cleaner and I found that this was better. No chemicals either. Safe to walk on and for pets.
1 cup borax 2 cup corn meal 1/2 cup baking soda works most time. For heavy stains may need an acid wash.