Searching for and accessing copyrighted music without permission is illegal in many jurisdictions.
Is it legal? Generally, performing the search itself is not a crime; you are simply using a search engine’s built-in advanced features. However, the ethical and legal lines get blurry quickly: