Had similsr problems and if I had caught it soon enough, all it would have been was a vaccum leak. Drove the car, with the same problems you are having for a couple of weeks, ended up at the stealership, UIM and LIM gaskets, MAF sensor and new IAC (IAC was first thing replaced, but with vaccum leak it went bad again) Check for vaccum leaks first! Codes for O2 sensors were initially coming up

too, but they were fine. How many miles?