NotebookLM without the browser: automate AI podcasts from your terminal or your chatbot
Google NotebookLM makes genuinely impressive audio overviews. Two AI hosts discussing your sources, with natural back-and-forth, questions, tangents. It’s the kind of thing that makes you pause and think “wait, this was generated?”
The problem is everything around it. You open the web UI. You paste in a URL. You click through the menus. You wait. You download the MP3 manually. Want to do ten of these? That’s ten rounds of copy-paste-click-wait. There’s no API. No batch processing. No way to wire it into anything else.
notebooklm-py fixes that. It’s an unofficial Python library that wraps NotebookLM’s undocumented internal APIs, giving you full programmatic access through a CLI, an async Python API, and — this is the interesting part — AI agent skills that let you control NotebookLM from Claude Code or ChatGPT with plain English.
What you actually get
The library covers everything the web UI does, plus some things it doesn’t:
- Notebook management — create, list, rename, delete notebooks programmatically
- Source ingestion — URLs, YouTube videos, PDFs, text files, Markdown, Word docs, Google Drive documents
- Content generation — audio overviews, video overviews, slide decks, quizzes, flashcards, infographics, mind maps, data tables, reports
- Structured exports — download quizzes as JSON, mind maps as hierarchical data, slides as PPTX, audio as MP3
- Batch operations — download every artifact from a notebook in one command
That last category is where the gap between the web UI and the library really shows. Try exporting a quiz as structured JSON from the NotebookLM website. You can’t.
Three-minute setup
Install the package, log in through your browser once, and you’re done:
pip install "notebooklm-py[browser]"
playwright install chromium
notebooklm loginThe login command opens a Chromium window where you authenticate with your Google account. Credentials are stored locally so you don’t need to repeat this.
Now the CLI works:
# Create a notebook and add some sources
notebooklm create "AI Safety Research"
notebooklm use <notebook_id>
notebooklm source add "https://arxiv.org/abs/2401.12345"
notebooklm source add ./local-paper.pdf
# Generate a podcast and download it
notebooklm generate audio "make it engaging and accessible" --wait
notebooklm download audio ./ai-safety-podcast.mp3That’s a podcast generated from research papers, downloaded to your machine, in six commands. No browser required after the initial login.
The real trick: AI agents as the interface
Here’s where notebooklm-py gets interesting for people who don’t want to memorize CLI flags.
The library ships with installable “skills” for AI coding agents. Run one command:
notebooklm skill installThis drops a SKILL.md file into your Claude Code configuration. From that point on, you can just talk to Claude in natural language:
“Create a notebook about climate change, add these three URLs, and generate a podcast”
Claude reads the skill definition, calls the right CLI commands behind the scenes, and handles the whole workflow. You never touch a terminal.
This isn’t limited to Claude Code
Here’s the broader context that makes this worth paying attention to. In December 2025, OpenAI quietly adopted the same skills format that Anthropic created for Claude Code. The SKILL.md convention now works across Claude Code, OpenAI’s Codex CLI, and ChatGPT’s Code Interpreter. Cursor and GitHub Copilot support it too.
That means a skill written for Claude Code can work in ChatGPT. The notebooklm-py skill is one example, but the pattern is what matters: you write one plain-text skill definition and it works across multiple AI assistants. No SDK differences, no platform-specific code. Just a Markdown file that describes what the tool can do.
For non-technical users, this is the real unlock. You don’t need to learn Python or CLI syntax. You open your preferred AI chatbot, describe what you want, and the chatbot handles the tool. “Take this YouTube video and turn it into a quiz with 20 questions” becomes a real request you can make in a conversation.
Beyond podcasts
Audio overviews get the attention, but NotebookLM generates a surprising range of content types. With notebooklm-py you can access all of them:
Video overviews come in nine visual styles including anime, whiteboard, and documentary. The library lets you specify the style programmatically:
notebooklm generate video "explain like a whiteboard lecture" --wait
notebooklm download video ./explainer.mp4Quizzes and flashcards export as JSON or Markdown, which is genuinely useful for building study tools or feeding into other systems:
notebooklm generate quiz "focus on key concepts, hard difficulty" --wait
notebooklm download quiz ./quiz.jsonSlide decks download as PPTX with the ability to revise individual slides through natural language — something the web UI doesn’t offer at all.
If you’re using the Python API instead of the CLI, the async interface gives you more control:
import asyncio
from notebooklm import NotebookLMClient
async def main():
async with await NotebookLMClient.from_storage() as client:
nb = await client.notebooks.create("Research Project")
await client.sources.add_url(nb.id, "https://example.com/paper.pdf", wait=True)
# Chat with your sources
result = await client.chat.ask(nb.id, "What are the key findings?")
print(result.answer)
# Generate content
await client.generate.audio(nb.id, "casual and conversational", wait=True)
asyncio.run(main())The caveats you should know
This library uses undocumented Google APIs. That’s worth saying clearly, because it shapes when and how you should use it.
It could break at any time. Google can change their internal endpoints without notice. The maintainers have been responsive about fixing breakages, but there’s no guarantee of uptime. If you’re building something that needs to work reliably next month, this isn’t the foundation to build on.
Authentication is browser-based. You log in through a real Chromium instance. This works fine on your laptop, but it means you can’t easily run this in a headless CI/CD pipeline or a server without a display.
Rate limiting exists. Heavy usage may hit Google’s internal rate limits. The library doesn’t document specific thresholds, and Google isn’t going to publish them for an unofficial client.
It’s not affiliated with Google. This is a community project reverse-engineering internal APIs. Google could send a cease-and-desist, change their auth flow, or simply make the internal APIs incompatible.
For personal projects, research, and prototyping? It’s excellent. For anything you’d put in front of paying customers? Probably not.
When to use this vs. just opening the website
If you need a single podcast from a couple of sources, the web UI is fine. notebooklm-py starts making sense when:
- You want to process multiple documents or URLs in batch
- You need structured exports (JSON quizzes, PPTX slides, CSV data tables)
- You’re building a workflow that chains NotebookLM with other tools
- You want non-technical team members to generate content through an AI chatbot instead of learning the NotebookLM UI
- You’re experimenting with different generation parameters across multiple runs
The AI agent skill angle is what I keep coming back to. There’s something satisfying about the idea that a CLI tool — traditionally the domain of developers comfortable with terminals — becomes accessible to anyone through a chatbot conversation. You don’t need to know what pip install means. You just need access to Claude or ChatGPT with the right skill installed, and someone who set it up for you.
That pattern is going to show up everywhere. notebooklm-py is just an early, concrete example.