Thanks for the help, but also for the charming sarcasm. Assuming I searched was correct. Assuming I searched exactly for “return the slug” would however be false. Try searching for only “the slug” and see how many of the useful posts from your search turn up on the first results page.
Nope, not exactly. I don’t need the permalink, e.g. https://www.mysite.com/about-the-birds-on-the-roof/, I only need the slug, e.g. about-the-birds-on-the-roof.