2007 Mazda Mazda3 vibrating at idle

my 07 mazda 3 5 speed vibrates when at idle. Sometimes it even feels like it will stall out. What could be the issue?

Is the check engine light on? How many miles on the car? What transmission type?

5 speed, 250,000 miles, no check engine. car ran perfectly up til about 3 months ago. still runs fine once it’s underway. getting good gas mileage. oil changed every 5,000 miles.

Clean the throttle body.

Check for vacuum leaks (cracked hoses).

The charcoal canister purge valve is a common failure on this car. It sticks open and causes a rough idle.