This is genuinely a check-before-you-book situation, because short-term rental law is one of the most fragmented areas in travel. The spectrum runs from countries where Airbnb operates freely, through cities requiring hosts to register and display a license number on the listing, to caps on nights per year, to districts or entire cities where unlicensed short-term rentals are effectively banned.
As a guest, the practical exposure is usually disruption rather than legal trouble: enforcement targets hosts, but guests of illegal listings have faced last-minute cancellations, and in a few strict places, inspections or being asked to leave.
How to check: search the city name plus short-term rental rules, look at the platform's own responsible hosting page for that country, and skim recent reviews for signs of hosts asking guests to pretend to be friends or avoid neighbors, which is a classic red flag for an unlicensed unit.