My kitchen and bathroom carpets washing instructions say they can be put in the washing machine !!!!!
If the carpet area is small use carpet cleaner foam and LIGHTLY scrub . Larger carpet think about hiring a carpet cleaning machine or buying one if you think that would be better value.