After fbtool turned my Facebook groups into data I can query, I wanted the same for YouTube. I often look things up on YouTube (travel tips, owner experiences, tech talks) and end up watching for hours. My idea was to use YouTube as a data source: the harness (Claude Code in my case) does the research, and the transcripts of the relevant videos are then available for analysis. So I wrote yttool, a command-line tool to do that.
It takes a topic, a list of videos, or a channel (its latest uploads, as a digest). For a topic, an LLM plans 3 to 5 YouTube searches, runs them through yt-dlp, and picks the top videos from the metadata. Then it gets the transcripts. Most videos have captions, for the ones without I pass the YouTube link to Gemini, which fetches and transcribes the video on Google’s side. It also downloads the top comment threads, because the comments often hold the correction or the experience the video leaves out.
Each video gets a summary with timestamp links, and the run ends with a report across all videos: what to actually watch, common themes, where the videos disagree, and what the comments add. Quotes are checked against the transcript before they go in, an LLM asked for timestamps directly will make them up. For interviews and podcasts, it labels the speakers by name, and the report can be in another language than the videos (Bulgarian videos summarized in English, for example). Everything lands in a folder per run, so Claude Code can read the transcripts afterwards and answer my questions with links to the exact second.
Google’s NotebookLM (now Gemini Notebook) is the obvious alternative, and it is good at answering questions about videos you add to it. Its research features search the web and your Google Drive, not YouTube, it ignores the comments, and it cannot import a video without captions. yttool does those three, and leaves the chat to the harness.
It works with any OpenAI-compatible model for the summaries and the free Gemini tier for the transcription. One warning: downloading with yt-dlp is against the YouTube ToS, and YouTube does rate-limit transcript requests, so do not run it in bulk.
I am quite happy with it. The code is on GitHub.
