Goofing Around With YouTube’s API (and Throwing In a Little AI)

Goofing Around With YouTube’s API (and Throwing In a Little AI)

I discovered the YouTube API this week and I’ve been using it to take out all my frustrations at YouTube’s terrible search offerings. I don’t know mobile, maybe it’s great on mobile, but YouTube’s search is balls on desktop.

First I made a new channel search. Then, a video search. THEN, because I wanted a useful AI tool, I made a feature where you can input a duration, vibes, and statistical importance of various factors and AI-generate a playlist. I’m having to add a little code backup for the duration calculation because I cannot seem to master the “get the Claude API call to count properly” prompt.

A screenshot of my homebrew YouTube playlist generator in action. I've done a search for "bass guitar finger exercises." An overlay shows the "Generate Custom Playlist" option with a minimum and maximum minute count (15 and 22 respectively), along with sliders to specify relative importance of view count, video recency, diversity of channels in the playlist, and like/view ratio importance.


I made this originally with the idea of helping my husband find and make playlists for bass lessons (as you can probably see from the screenshot), but I plan to use it when I do chores. Like, I’m going to take 20 minutes and clean up the kitchen. I’ll go to my tool, do a search for agrivoltaics, generate a 15-minute playlist, and I’m off to sweep the floor and get educated. 👍

I have more I want to add to this but putting it together has given me some YouTube / Wikipedia search ideas… hmmm….

Back To Top