This video shows how to replace the Mass Airflow Sensor on a 2003 Prius. It's a SUPER easy repair. In the video you'll see that I remove it and replace it in about 5 minutes. It's easier than changing a tire. If you have a stubby screwdriver you can do it without even removing the air box.
I replaced this one because a place called "Snappy Lube" in Wilson, NC got it dirty. This is my daughter's car and she took it to Snappy Lube to get her annual safety and emissions inspection done. It was running fine when she pulled in. While she was sitting there one of the "technicians" came to her and told her that her air filter is dirty. She didn't know what to do about it so she called me. I said "Why are they looking at your air filter? They aren't required to check that for a safety/emissions inspection!" She told the guy not to replace it. Her car passed the inspection. But when she drove away it was running terribly. The problems started within 100 yards of the store. She turned around to take it back to them at which time the Check Engine Light came on. Back at Snappy Lube they immediately started claiming it wasn't their fault. It was just a coincidence, blah, blah, blah... They looked at it but they didn't know what was wrong. Fortunately I have AAA and I got it towed back to my house for free (it wouldn't run at all at this point. The engine would start but it would die within 5 seconds).
So back at my house I hooked up my OBDII scan tool and it read a P3191 code. I found a Toyota troubleshooting guide online which helped me narrow it down to the MAF sensor. That code could have indicated some other problems, too, such as a bad fuel pump and some other stuff, but the MAF sensor made the most sense. I bought a new one at Advance Auto Parts for $80, and as soon as I installed it the problem cleared up. I had to reset the code, but I had done that with the old one installed and it didn't fix the problem.
Also, before replacing it you should try cleaning it. I've been told that you should never touch the MAF sensor, but I figured before I spend $80 replacing it I should at least try to clean it. That didn't help. I used carburetor cleaner.
The bottom line is that Snappy Lube screwed it up. The dropped some dirt or sweat or something down into the MAF sensor when they took out the air filter. They had no business taking out the air filter because it isn't a requirement of the NC inspection. They were just trying to make a quick buck by selling a gullible, 19 year old girl a new air filter. In the process they screwed up the MAF sensor, and they are refusing to accept responsibility.