Answered by Borut | Nov. 14, 2023 02:46
Your inquiry is practically the same as the inquiry posted by a gentleman from the Philippines, so I will just c/p my answer with tiny changes:
Since your layover is 19,5 hours long, you are definitely covered by 24 hour visa free transit and you do not need any kind of visa. If you want to exit the airport that is another detail and to do that, you will approach 24/144 hour visa free transit counter upon landing where you will apply for a temporary entry permit. This permit is granted based entirely on discretionary right of the airport authorities on a day and you can expect both outcomes, positive and/or negative. The exit outside the airport is not a passenger right, but more something like a bonus. If you intend to spend a night in Beijing, you will be definitely asked to present an accommodation booking confirmation, so I strongly suggest you to have your booking printed out and at hand. Also, if you want to take a tour, a printout of confirmed tour will be also helpful. This application for a temporary entry permit is free of charge.
I would not be writing this for so long, but Beijing airport authorities tend to be quite by the book, so Beijing airport temporary entry permit is traditionally the hardest to obtain.