Last summer I could spend some time in Beijing, the capital of China.
I usually used to go out around the city in a group of five so it was sometimes difficult to take taxis, as they are all for maximum 4 people.
What do you do when you don't want to pay for two taxis every time?
It is true that the law states the limit of four people in a car, but, to be honest, this isn't applied in real life. Just stop taxis and negotiate with them for an extra fee (usually around 20 yuans more).
Not all will accept it, but after a few tries you sure will find someone to take you.
Negotiate with them the price of the journey. Note that, for around 20 minutes you usually pay between 20-25 yuans. As noted before you may have to pay a little extra if you are five.
As we know, tourists can sometimes been taken advantage of by locals, specially taxis. As I experienced in first person, if you happen to get a taxi in less than 2 minutes for five people (specially in busy zones like sanlitun) don't trust them fully. They may start asking for extra fees during the journey, and believe me, they will get them. I was once blocked in a taxi because we were refusing to pay an extra fee on top of what we already agreed before, and it was pretty scary.
It is way preferable to stay a little more in the public transport against being scammed by a taxi.