Originally Posted by
alawrencenyc
This run is in the past but an important thing to note is that you DO NOT need a visa if you are flying in to Shanghai or Beijing and DO NOT leave the airport. Another words, on a turnaround you are not leaving the international area of the airport and no visa is required. However, you may not even find a place to smoke (if that is a desire) without leaving the international area, so be careful.
Just to confirm, I did this in November 2015 on a run, LGA-DFW-PEK r/t with no problem in LGA and no questions or problems in PEK.
As others have said, OF COURSE YOU NEED A VISA FOR THIS! You got lucky, plain and simple.