I have a playlist of around 700 of my favourite songs that I like to play in the car. Being a fan of heavy metal though means that these songs often contain swearing and when I'm also transporting kids I'd prefer they're served their regular dose of cybergrind (real genre, look it up) without any swearing in it.
Spotify does mark songs in the UI as explicit but you can't sort by the tag and the thought of scrolling through 700 songs and manually removing them seemed like such an inelegant way to solve the problem, plus I would need to do this again and again as I added more songs to my main playlist. As programmers will often say, why do something manually in 5 minutes when you can write some code to do it programmatically in a mere 2 hours instead?!
I'd signed up to use the Spotify API but had given up fairly quickly due to the imagined slog of writing, debugging and iterating code over a period of weeks to solve what was, really, a fairly inconsequential problem.
No motivation to do it all myself? Sounds like the perfect opportunity to vibe code my way out of this lazy funk!
Optional explainer: what is vibe coding? A software development approach that uses AI to write code from natural language prompts. You don’t write the code, you describe the problem (and optionally the solution) and let the LLM do the rest!
The first prompt I threw at Gemini Pro couldn't have been simpler: 'Write a python script that uses the spotify api to remove explicit songs from a given playlist. Provide instructions about how to generate the client ID and secret and how to get the playlist ID.'
Around a minute later, and much to my amazement, out popped a one-shot solution outlining the Python modules I needed (and how to install them), instructions on how to get a Spotify API account (with a bonus warning not to upload my API client secret to Github) and the all important script itself complete with comprehensive but not overly verbose (quite unlike this sentence - Ed.) comments to help me understand how it functioned.
Running this script asked me for the playlist's ID, looped through the songs, gave me a list of songs marked as explicit and prompted me to confirm that they could be removed.
Wow. That was easy. Feeling ready to become a vibe coding evangelist, I booted up my newly squeaky clean playlist and looked for a good victory song. Hang on. Is that .. Break Stuff by Limp Bizkit? As in, "if my day keeps going this way I just might break your fucking face tonight" Break Stuff? Yeah so this is definitely an explicit song but, curiously, isn't marked as such. I notice that Spotify says it's from the album 'Significant Other (Explicit version)' which is apparently supposed to alert everyone to Fred Durst’s potty mouth rather than using the actual this-is-exactly-what-it-was-designed-for explicit tag instead.
Clearly, I need to find a better way that doesn't just rely on the Spotify metadata.
If I couldn't rely on the Spotify explicit tagging then my next idea was to churn through the lyrics for all of these songs, look for naughty words and then kick those songs out of the playlist. I knew this would take longer but did seem like it would produce the best result. It wouldn't catch any raunchy innuendo but I was happy to let that go, safe in the knowledge that as a child I was completely unaware of the persistent presence of racy jokes flying past my innocent ears during The Simpsons every night.
I prompted Gemini to find a way to scrape lyrics for the songs and it suggested scraping lyrics from azlyrics.com. This would involve modifying the code to guess the azlyrics.com URL slug based on the artist / track name pair, attempting to scrape that page and then searching through the lyrics looking for matches against a list of common swear words I asked it to generate.
While Gemini doesn’t quite display the inventive swearing prowess of the average Englishman; it did manage to muster up a pretty comprehensive list of potential swear words to use. The only editing I had to do was to remove that gravest of all naughty words, ‘hell’.
I was very excited with my (‘Gemini’s’ - Ed.) solution and fired it off. As the scraping began and the script started to report back results I quickly became suspicious. No effin’ and jeffin’ by Eminem? No explicit content from Korn? In fact, no bad words found anywhere in the hundred or so songs it had checked so far? Something was wrong.
Following a hunch, I visited azlyrics.com in my browser and confirmed that my IP address had been completely blocked by the website for violating their scraping terms of use (fair enough) and therefore my script hadn’t been returning any matches because it was only seeing azlyrics.com’s ‘go scrape somewhere else’ message which, strangely enough, doesn’t itself contain any swear words. Nice error handling there Gemini!
Informing Gemini that this wasn’t working because of rate limiting, it breezily responded by telling me that’s exactly what it thought would happen. Would have been nice to know that up front don’t you think?
Having failed me twice, I decided to go on the offensive (pun intended) and generate some ideas of my own, using Gemini as a sounding board.
Google often shows lyrics directly in search results. Is there an API we could use to query those? Or even scrape them? No says Gemini. Lyrics in search results are subject to licensing agreements that don't extend to my use and, strangely enough, Google Gemini politely but firmly reminds me that scraping Google results is a violation of the terms of service.
OK. Spotify has lyrics for karaoke mode. Is there a spotify API for lyrics? It tells me that unfortunately lyrics aren't exposed over an API.
As I sit looking at a blinking cursor I accept that lyrics are a dead end and come back to the explicit tagging. What I really want is explicit tagging that’s better than Spotify’s. So I ask Gemini if there are any API-queryable databases for explicit tags.
Success! Gemini reliably (it turns out) informs me that Apple Music has a free-to-use API that can return explicit tag statuses from its database.
Gemini alters the code so songs now do a double pass: once to see if Spotify marks it as explicit and once to see if iTunes does. I hit run.
I scroll up and down my newly sanitised playlist. Looking good. Everything looks to be in order- hmm ... is that The Faction's cover of California Dreaming still in my playlist? The song where they subtly swapped out some of the poignant, mornful lyrics of the original for 'I went to the store just to get a coke / and all they had was pepsi what a fucking joke'.
Yeah we're not ready for primetime yet.
I double check to see if it's a matching problem when using the iTunes API rather than a data quality issue and I find various versions of the song in the iTunes database, some marked as explicit and some not. Sigh.
OK. I’m going to give up on any kind of comprehensive explicit tagging solution.
Resigned to the fact that if I want it done properly I'm going to have to do it myself, I start to run down the list of remaining songs, mentally fast-forwarding through the lyrics on the hunt for swear words.
Interestingly, I can’t shake the idea that any song I see in the playlist, after being passed through my double filter, shouldn’t contain any swear words. A computer checked this already so why am I working so hard to validate it manually! Uh oh. Despite my extensive experience of sub-standard results from this explicit tagging method, I find myself suffering from a rather heavy dose of automation bias - the propensity to place outsized faith in the output of an automated system, even if it contradicts my own knowledge and experience.
Realising I need to escape this mental trap I despondently duplicate my original playlist and work through it by hand, using the presence or absence of an explicit tag as a suggestion rather than a hard fact.
So if you decide not to go down the multi-hour vibe coding back and forth path, how long does it take to sort through 700 songs manually? Turns out it takes about 6 minutes …
So this wasn’t exactly a roaring success but it really wasn’t Gemini’s fault. It’s was an explicit tag data quality and consistency issue. If Spotify’s tag data had been better, Gemini would have given me a working solution after that very first prompt.
Despite this experience, I truly think that vibe coding will usher in a new era of personalised software. It has never been easier to turn ideas into execution and build one-off solutions for problems that are too personal and niche for someone else to solve or too complex for a non or even hobbyist coder to tackle.
No longer does everyone need to ‘learn to code’ because now it’s more valuable, quicker and easier for people to ‘learn to think like a coder’. Once people understand what is possible with our modern world of APIs, libraries, open databases and low-friction programming environments; and with LLMs doing all the setup, coding and bug fixing - there are limitless possibilities.
Vibe coding, and LLMs’ natural language interface, will unlock the transformative problem solving and automation power of programming that few have been able to harness due to the high barrier to entry of learning a programming language.
The dream of democratising the power of programming has never been closer to reality.
Published 2025-07-01