There is a whole list of exceptions to needing a search warrant.
This means that if they can prove that the search fit into one of
the exclusions then the search is lawful. Some of the exceptions
are in plain sight so if they can see it even if its when you open
your door. Another is abandoned property. There is also immediate
danger to society and yourself. There are also different rules for
searches of car in traffic stops.