I would use an extraction machine but not sure the best brand. I have used one rented from Home Depot that worked well.
I think it is very important to not use too much cleaner or water. I would not put cleaner through the machine. I would spray a carpet cleaning product on the carpet, Light mist, let it work for a little while, then extract.
If you have spots, spray the spot and scrub toward the center of the spot, in a circular motion toward the center. Pick up the spot with a rag by pressing straight down (no scrubbing) so you do not spread the spot. The spot remover will depend on the type of stain, water or petroleum based. It is likely that the carpet product will work on the spot. So, before purchasing a special spot cleaner, try the carpet cleaning product.
Hope this helps.