NotebookLM-py: The Complete Guide to the Unofficial Python API for Google NotebookLM
NotebookLM-py is the unofficial Python API for Google NotebookLM — automate notebook creation, source import, podcast/video/quiz generation, and artifact downloads programmatically. CLI, async Python SDK, and Claude Code agent skills. 10+ features beyond the web UI. 4,100+ stars, Python, MIT.
What Is NotebookLM-py?
Google NotebookLM lets you upload sources and interact with them through AI. NotebookLM-py gives you programmatic access to everything NotebookLM can do — and more. Create notebooks, import sources, generate podcasts, videos, quizzes, flashcards, and download everything locally.
- Stars: 4,100+ ⭐
- Forks: 501
- Releases: 7
- Language: Python
- License: MIT
- npm/pip:
notebooklm - Topics: notebooklm, podcast-generator, quiz-generator, flashcards, audio-overview, study-tools
What You Can Build
🤖 AI Agent Tools
Integrate NotebookLM into Claude Code or other LLM agents. Ships with Claude Code skills for natural language automation:
notebooklm skill install
# Then: "Create a podcast about quantum computing"
📚 Research Automation
Bulk-import sources (URLs, PDFs, YouTube, Google Drive), run web/Drive research queries with auto-import, extract insights programmatically. Build repeatable research pipelines.
🎙️ Content Generation
Generate all NotebookLM content types:
- Audio Overviews (podcasts)
- Videos (whiteboard style)
- Slide Decks (PPTX)
- Quizzes (with difficulty levels)
- Flashcards (with quantity control)
- Infographics (portrait/landscape)
- Mind Maps
- Data Tables
- Study Guides
📥 Downloads & Export
Download all artifacts locally: MP3, MP4, PDF, PNG, CSV, JSON, Markdown, PPTX. Export to Google Docs/Sheets.
10+ Features Beyond the Web UI
| Feature | Web UI | NotebookLM-py |
|---|---|---|
| Batch downloads | ❌ | ✅ |
| Quiz/Flashcard export (JSON/MD/HTML) | ❌ Interactive only | ✅ |
| Mind map JSON extraction | ❌ | ✅ |
| Data table CSV export | ❌ | ✅ |
| Slide deck as PPTX | ❌ PDF only | ✅ Editable |
| Slide revision (NL prompts) | ❌ | ✅ |
| Report template customization | ❌ | ✅ |
| Save chat to notes | ❌ | ✅ |
| Source fulltext access | ❌ | ✅ |
| Programmatic sharing | ❌ | ✅ |
Quick Start
CLI
# Authenticate
notebooklm login
# Create notebook + add sources
notebooklm create "My Research"
notebooklm source add "https://en.wikipedia.org/wiki/AI"
notebooklm source add "./paper.pdf"
# Chat with sources
notebooklm ask "What are the key themes?"
# Generate content
notebooklm generate audio "make it engaging" --wait
notebooklm generate video --style whiteboard --wait
notebooklm generate quiz --difficulty hard
notebooklm generate flashcards --quantity more
notebooklm generate slide-deck
notebooklm generate mind-map
# Download artifacts
notebooklm download audio ./podcast.mp3
notebooklm download quiz --format markdown ./quiz.md
notebooklm download mind-map ./mindmap.json
Python API (Async)
from notebooklm import NotebookLMClient
async with await NotebookLMClient.from_storage() as client:
nb = await client.notebooks.create("Research")
await client.sources.add_url(nb.id, "https://example.com", wait=True)
result = await client.chat.ask(nb.id, "Summarize this")
status = await client.artifacts.generate_audio(nb.id, instructions="make it fun")
await client.artifacts.wait_for_completion(nb.id, status.task_id)
await client.artifacts.download_audio(nb.id, "podcast.mp3")
Claude Code Agent Skills
notebooklm skill install
# "Create a podcast about quantum computing"
# "Download the quiz as markdown"
NotebookLM-py vs Alternatives
Category: This is an unofficial API/SDK for Google NotebookLM.
| Feature | NotebookLM-py | NotebookLM Web UI | Podcastfy | ElevenLabs |
|---|---|---|---|---|
| Focus | Full NotebookLM API | Official web app | Podcast generation | Audio/voice |
| Stars | 4.1K ⭐ | N/A (Google) | ~2K ⭐ | N/A (SaaS) |
| Programmatic Access | ✅ CLI + SDK | ❌ Browser only | ✅ | ✅ API |
| Notebook Management | ✅ | ✅ | ❌ | ❌ |
| Source Import (URL/PDF/YT) | ✅ Bulk | ✅ Manual | Limited | ❌ |
| Audio/Podcast | ✅ | ✅ | ✅ | ✅ |
| Video Generation | ✅ | ✅ | ❌ | ❌ |
| Quiz/Flashcards | ✅ Export | ✅ View only | ❌ | ❌ |
| Mind Map Export | ✅ JSON | ❌ | ❌ | ❌ |
| Slide Deck PPTX | ✅ Editable | PDF only | ❌ | ❌ |
| Batch Downloads | ✅ | ❌ | ❌ | ❌ |
| Agent Skills | ✅ Claude Code | ❌ | ❌ | ❌ |
| Research Pipelines | ✅ | ❌ | ❌ | ❌ |
When to choose NotebookLM-py: You want to automate Google NotebookLM — bulk operations, research pipelines, content generation, and artifact export programmatically.
When to choose NotebookLM Web UI: You want manual, interactive notebook usage.
When to choose Podcastfy: You want a standalone podcast generator without NotebookLM.
Conclusion
NotebookLM-py unlocks Google NotebookLM's full potential programmatically. With 10+ features the web UI doesn't offer — batch downloads, PPTX export, mind map JSON, quiz export — plus CLI, async Python SDK, and Claude Code agent skills, it turns NotebookLM from an interactive tool into an automation engine for research, content generation, and study materials. 4.1K stars and growing.
Explore NotebookLM-py on GitHub
