teng-lin/notebooklm-pyPublic

Unofficial Python API and agentic skill for Google Gemini Notebook. Full programmatic access to NotebookLM's features—including capabilities the web UI doesn't expose—via Python, CLI, and AI agents like Claude Code, Codex, and OpenClaw.

AI summary: An unofficial Python SDK and agentic skill granting full programmatic access to Google NotebookLM.

Stars
18.5K
+45 today
Forks
2.5K
Watchers
80
Open issues
36
Open PRs
13
Contributors
~31
Commits
1.9K
Branches
73

PythonMITCreated Jan 7, 2026Last push 1d agoLatest release v0.7.3+171 stars this week+171 this month

Star history

since Jan 11, 2026
05K10K15KJan 2026Mar 2026May 2026Aug 2026
18.5K stars as of Aug 6, 2026, tracked back to Jan 11, 2026. Historical curve reconstructed from public GitHub event archives, calibrated to the current total.

Contribution activity

commits per day, last 52 weeks
AugSepOctNovDecJanFebMarAprMayJunJulMonWedFri2025-08-02: 0 commits2025-08-03: 0 commits2025-08-04: 0 commits2025-08-05: 0 commits2025-08-06: 0 commits2025-08-07: 0 commits2025-08-08: 0 commits2025-08-09: 0 commits2025-08-10: 0 commits2025-08-11: 0 commits2025-08-12: 0 commits2025-08-13: 0 commits2025-08-14: 0 commits2025-08-15: 0 commits2025-08-16: 0 commits2025-08-17: 0 commits2025-08-18: 0 commits2025-08-19: 0 commits2025-08-20: 0 commits2025-08-21: 0 commits2025-08-22: 0 commits2025-08-23: 0 commits2025-08-24: 0 commits2025-08-25: 0 commits2025-08-26: 0 commits2025-08-27: 0 commits2025-08-28: 0 commits2025-08-29: 0 commits2025-08-30: 0 commits2025-08-31: 0 commits2025-09-01: 0 commits2025-09-02: 0 commits2025-09-03: 0 commits2025-09-04: 0 commits2025-09-05: 0 commits2025-09-06: 0 commits2025-09-07: 0 commits2025-09-08: 0 commits2025-09-09: 0 commits2025-09-10: 0 commits2025-09-11: 0 commits2025-09-12: 0 commits2025-09-13: 0 commits2025-09-14: 0 commits2025-09-15: 0 commits2025-09-16: 0 commits2025-09-17: 0 commits2025-09-18: 0 commits2025-09-19: 0 commits2025-09-20: 0 commits2025-09-21: 0 commits2025-09-22: 0 commits2025-09-23: 0 commits2025-09-24: 0 commits2025-09-25: 0 commits2025-09-26: 0 commits2025-09-27: 0 commits2025-09-28: 0 commits2025-09-29: 0 commits2025-09-30: 0 commits2025-10-01: 0 commits2025-10-02: 0 commits2025-10-03: 0 commits2025-10-04: 0 commits2025-10-05: 0 commits2025-10-06: 0 commits2025-10-07: 0 commits2025-10-08: 0 commits2025-10-09: 0 commits2025-10-10: 0 commits2025-10-11: 0 commits2025-10-12: 0 commits2025-10-13: 0 commits2025-10-14: 0 commits2025-10-15: 0 commits2025-10-16: 0 commits2025-10-17: 0 commits2025-10-18: 0 commits2025-10-19: 0 commits2025-10-20: 0 commits2025-10-21: 0 commits2025-10-22: 0 commits2025-10-23: 0 commits2025-10-24: 0 commits2025-10-25: 0 commits2025-10-26: 0 commits2025-10-27: 0 commits2025-10-28: 0 commits2025-10-29: 0 commits2025-10-30: 0 commits2025-10-31: 0 commits2025-11-01: 0 commits2025-11-02: 0 commits2025-11-03: 0 commits2025-11-04: 0 commits2025-11-05: 0 commits2025-11-06: 0 commits2025-11-07: 0 commits2025-11-09: 0 commits2025-11-10: 0 commits2025-11-11: 0 commits2025-11-12: 0 commits2025-11-13: 0 commits2025-11-14: 0 commits2025-11-15: 0 commits2025-11-16: 0 commits2025-11-17: 0 commits2025-11-18: 0 commits2025-11-19: 0 commits2025-11-20: 0 commits2025-11-21: 0 commits2025-11-22: 0 commits2025-11-23: 0 commits2025-11-24: 0 commits2025-11-25: 0 commits2025-11-26: 0 commits2025-11-27: 0 commits2025-11-28: 0 commits2025-11-29: 0 commits2025-11-30: 0 commits2025-12-01: 0 commits2025-12-02: 0 commits2025-12-03: 0 commits2025-12-04: 0 commits2025-12-05: 0 commits2025-12-06: 0 commits2025-12-07: 0 commits2025-12-08: 0 commits2025-12-09: 0 commits2025-12-10: 0 commits2025-12-11: 0 commits2025-12-12: 0 commits2025-12-13: 0 commits2025-12-14: 0 commits2025-12-15: 0 commits2025-12-16: 0 commits2025-12-17: 0 commits2025-12-18: 0 commits2025-12-19: 0 commits2025-12-20: 0 commits2025-12-21: 0 commits2025-12-22: 0 commits2025-12-23: 0 commits2025-12-24: 0 commits2025-12-25: 0 commits2025-12-26: 0 commits2025-12-27: 0 commits2025-12-28: 0 commits2025-12-29: 0 commits2025-12-30: 0 commits2025-12-31: 0 commits2026-01-01: 0 commits2026-01-02: 0 commits2026-01-03: 0 commits2026-01-04: 0 commits2026-01-05: 66 commits2026-01-06: 37 commits2026-01-07: 83 commits2026-01-08: 44 commits2026-01-09: 30 commits2026-01-10: 42 commits2026-01-11: 12 commits2026-01-12: 10 commits2026-01-13: 15 commits2026-01-14: 12 commits2026-01-15: 23 commits2026-01-16: 0 commits2026-01-17: 1 commit2026-01-18: 3 commits2026-01-19: 2 commits2026-01-20: 26 commits2026-01-21: 6 commits2026-01-22: 5 commits2026-01-23: 7 commits2026-01-24: 4 commits2026-01-25: 0 commits2026-01-26: 1 commit2026-01-27: 2 commits2026-01-28: 0 commits2026-01-29: 0 commits2026-01-30: 0 commits2026-01-31: 0 commits2026-02-01: 0 commits2026-02-02: 0 commits2026-02-03: 0 commits2026-02-04: 0 commits2026-02-05: 0 commits2026-02-06: 0 commits2026-02-07: 0 commits2026-02-08: 0 commits2026-02-09: 0 commits2026-02-10: 0 commits2026-02-11: 0 commits2026-02-12: 0 commits2026-02-13: 0 commits2026-02-14: 0 commits2026-02-15: 0 commits2026-02-16: 0 commits2026-02-17: 0 commits2026-02-18: 0 commits2026-02-19: 0 commits2026-02-20: 0 commits2026-02-21: 0 commits2026-02-22: 1 commit2026-02-23: 0 commits2026-02-24: 0 commits2026-02-25: 0 commits2026-02-26: 0 commits2026-02-27: 0 commits2026-02-28: 7 commits2026-03-01: 3 commits2026-03-02: 7 commits2026-03-03: 3 commits2026-03-04: 3 commits2026-03-05: 2 commits2026-03-06: 0 commits2026-03-07: 0 commits2026-03-08: 1 commit2026-03-09: 10 commits2026-03-10: 17 commits2026-03-11: 26 commits2026-03-12: 4 commits2026-03-13: 3 commits2026-03-14: 7 commits2026-03-15: 0 commits2026-03-16: 0 commits2026-03-17: 0 commits2026-03-18: 0 commits2026-03-19: 2 commits2026-03-20: 0 commits2026-03-21: 0 commits2026-03-22: 0 commits2026-03-23: 0 commits2026-03-24: 0 commits2026-03-25: 0 commits2026-03-26: 0 commits2026-03-27: 8 commits2026-03-28: 2 commits2026-03-29: 22 commits2026-03-30: 0 commits2026-03-31: 0 commits2026-04-01: 6 commits2026-04-02: 5 commits2026-04-03: 0 commits2026-04-04: 24 commits2026-04-05: 5 commits2026-04-06: 0 commits2026-04-07: 0 commits2026-04-08: 0 commits2026-04-09: 0 commits2026-04-10: 0 commits2026-04-11: 0 commits2026-04-12: 0 commits2026-04-13: 0 commits2026-04-14: 1 commit2026-04-15: 0 commits2026-04-16: 1 commit2026-04-17: 8 commits2026-04-18: 7 commits2026-04-19: 0 commits2026-04-20: 0 commits2026-04-21: 0 commits2026-04-22: 0 commits2026-04-23: 2 commits2026-04-24: 0 commits2026-04-25: 0 commits2026-04-26: 0 commits2026-04-27: 0 commits2026-04-28: 0 commits2026-04-29: 0 commits2026-04-30: 0 commits2026-05-01: 0 commits2026-05-02: 0 commits2026-05-03: 10 commits2026-05-04: 0 commits2026-05-05: 0 commits2026-05-06: 0 commits2026-05-07: 0 commits2026-05-08: 2 commits2026-05-09: 17 commits2026-05-10: 0 commits2026-05-11: 10 commits2026-05-12: 22 commits2026-05-13: 25 commits2026-05-14: 88 commits2026-05-15: 104 commits2026-05-16: 35 commits2026-05-17: 79 commits2026-05-18: 13 commits2026-05-19: 23 commits2026-05-20: 1 commit2026-05-21: 46 commits2026-05-22: 51 commits2026-05-23: 13 commits2026-05-24: 11 commits2026-05-25: 5 commits2026-05-26: 24 commits2026-05-27: 38 commits2026-05-28: 54 commits2026-05-29: 42 commits2026-05-30: 36 commits2026-05-31: 20 commits2026-06-01: 23 commits2026-06-02: 13 commits2026-06-03: 23 commits2026-06-04: 19 commits2026-06-05: 23 commits2026-06-06: 11 commits2026-06-07: 3 commits2026-06-08: 4 commits2026-06-09: 7 commits2026-06-10: 29 commits2026-06-11: 7 commits2026-06-12: 14 commits2026-06-13: 2 commits2026-06-14: 0 commits2026-06-15: 8 commits2026-06-16: 8 commits2026-06-17: 1 commit2026-06-18: 3 commits2026-06-19: 2 commits2026-06-20: 6 commits2026-06-21: 5 commits2026-06-22: 0 commits2026-06-23: 0 commits2026-06-24: 2 commits2026-06-25: 0 commits2026-06-26: 3 commits2026-06-27: 4 commits2026-06-28: 5 commits2026-06-29: 24 commits2026-06-30: 16 commits2026-07-01: 2 commits2026-07-02: 13 commits2026-07-03: 13 commits2026-07-04: 14 commits2026-07-05: 11 commits2026-07-06: 3 commits2026-07-07: 2 commits2026-07-08: 0 commits2026-07-09: 13 commits2026-07-10: 0 commits2026-07-11: 0 commits2026-07-12: 8 commits2026-07-13: 11 commits2026-07-14: 2 commits2026-07-15: 9 commits2026-07-16: 28 commits2026-07-17: 14 commits2026-07-18: 7 commits2026-07-19: 0 commits2026-07-20: 0 commits2026-07-21: 0 commits2026-07-22: 0 commits2026-07-23: 0 commits2026-07-24: 0 commits2026-07-25: 0 commits2026-07-26: 2 commits2026-07-27: 0 commits2026-07-28: 0 commits2026-07-29: 0 commits2026-07-30: 0 commits2026-07-31: 0 commits2026-08-01: 0 commits
1,804 commits in the last yearLessMore

Signals and awards

derived from tracked data
  • Widely adopted

    18,497 stars

  • Very active

    1,804 commits in 52 weeks

  • Well documented

    High community health score

  • Permissive license

    MIT

  • Continuous integration

    Automated checks passing

What notebooklm-py does

This project provides a comprehensive, unofficial Python API for interacting with Google NotebookLM (now Gemini Notebook), bypassing the limitations of the web-only interface. It allows developers to programmatically upload documents, query notebooks, and extract insights using Python scripts or CLI commands. Crucially, it exposes underlying backend capabilities that are hidden in the official UI, such as advanced audio generation features. Furthermore, it is packaged as an 'agentic skill', meaning autonomous AI coding agents like OpenClaw or Claude Code can directly integrate with NotebookLM to read its curated knowledge bases during their workflows.

Designed for Python developers, AI researchers, and automation enthusiasts who want to integrate Google's powerful RAG capabilities into their own applications. Requires familiarity with Python and managing API authentication tokens.

  • Complete Python SDK: Wraps the undocumented NotebookLM backend APIs into clean, usable Python functions.
  • Hidden feature access: Unlocks capabilities present in the API but not yet exposed in the official Google web interface.
  • Agentic skill integration: Formatted so AI agents can dynamically call NotebookLM to retrieve highly specific project context.
  • CLI interface: Allows terminal users to interact with their notebooks without writing custom scripts.
  • Programmatic audio generation: Exposes the highly popular 'podcast generation' feature for automated audio creation.

Where teams use it

Automating knowledge retrieval

An AI coding agent hits the API to query a massive, pre-indexed library of documentation stored in NotebookLM before writing a script.

Batch document processing

A researcher writes a Python script to automatically upload hundreds of PDFs to a notebook and extract specific summaries.

Automated podcast generation

A developer builds a cron job that pulls the daily news, pushes it to NotebookLM, and downloads the generated audio discussion.

Integrating with custom dashboards

A team builds an internal tool that seamlessly queries their company's NotebookLM knowledge base via the unofficial API.

Getting started: pip install notebooklm-py

README

main branch

notebooklm-py

notebooklm-py logo

A Comprehensive NotebookLM Skill & Unofficial Python API. Full programmatic access to NotebookLM's features—including capabilities the web UI doesn't expose—via Python, CLI, and AI agents like Claude Code, Codex, and OpenClaw.

Note (July 2026): Google rebranded NotebookLM to Gemini Notebook. It remains the same standalone product (now also reachable inside the Gemini app), existing links redirect automatically, and this library drives the same underlying service and works unchanged. The package keeps the notebooklm-py name.

PyPI version Python Version License: MIT Tests

teng-lin%2Fnotebooklm-py | Trendshift

Source & Development: https://github.com/teng-lin/notebooklm-py

⚠️ Unofficial Library - Use at Your Own Risk

This library uses undocumented Google APIs that can change without notice.

  • Not affiliated with Google - This is a community project
  • APIs may break - Google can change internal endpoints anytime
  • Rate limits apply - Heavy usage may be throttled

Best for prototypes, research, and personal projects. See Troubleshooting for debugging tips.

What You Can Build

🤖 AI Agent Tools - Integrate NotebookLM into Claude Code, Codex, and other LLM agents. Ships with a root NotebookLM skill for GitHub and npx skills add discovery, local notebooklm skill install support for Claude Code and .agents skill directories, and repo-level Codex guidance in AGENTS.md.

📚 Research Automation - Bulk-import sources (URLs, PDFs, YouTube, Google Drive), run web/Drive research queries with auto-import, and extract insights programmatically. Build repeatable research pipelines.

🎙️ Content Generation - Generate Audio Overviews (podcasts), videos, slide decks, quizzes, flashcards, infographics, data tables, mind maps, and study guides. Full control over formats, styles, and output.

📥 Downloads & Export - Download all generated artifacts locally (MP3, MP4, PDF, PNG, CSV, JSON, Markdown). Export to Google Docs/Sheets. Features the web UI doesn't offer: batch downloads, quiz/flashcard export in multiple formats, mind map JSON extraction.

Use Cases & Recipes

NotebookLM is a grounded engine: Gemini does the heavy reading and answers from your sources with citations. The winning pattern is to let it do the expensive analysis while your agent (Claude Code, Codex, …) orchestrates and handles the final mile — using NotebookLM as a zero-token synthesis + memory layer an agent drives in a loop, and pulling structured artifacts out in bulk and in richer, scriptable formats. Recipes people build on top of this library, grouped by what they use NotebookLM as:

Spend fewer tokens — let NotebookLM do the expensive thinking:

  • 🪙 Zero-token research offload — Throw 30 documents into a notebook, let Gemini do the heavy analysis, and have your agent spend tokens only on the final polish. The agent just orchestrates (createsource addask); the reasoning happens server-side. In the wild: a four-workflow guide to stop Claude Code burning tokens on NotebookLM.
  • 🧠 Knowledge distillation → a permanent skill — Run Deep Research (source add-research "your topic" --mode deep) or load a doc corpus, let NotebookLM's Gemini condense it, and bake the result into a SKILL.md your agent loads at startup — build once, reuse with zero runtime tokens or network calls, git-versioned and immune to UI drift. A packaged domain expert without hand-curating sources. (Dumping raw docs into a skill flattens the hierarchy; NotebookLM condensing first is what makes it work.)
  • ✅ Self-validating skills — Have NotebookLM generate the eval set — a quiz straight from your sources — to grade an agent skill against ground truth instead of test questions you'd bias yourself. Build the skill, run it against the NotebookLM-authored evals, iterate to a pass. In the wild: a skill that scored 4/10 on the first pass and 10/10 after one iteration, graded by a NotebookLM-generated quiz.

Give your agent memory — persistent, grounded recall:

  • 💾 Persistent cross-session memory — Keep a "Master Brain" notebook; a wrap-up step appends each session's decisions and fixes as notes (note create / ask --save-as-note), and a line in your CLAUDE.md queries it (ask) at the start of the next session. Storage and recall live on Google's infrastructure.
  • 🧩 Grounded memory for coding agents — Expose a notebook of your internal docs/RFCs/architecture over the MCP server (or plain ask) so an agent answers from your code with citations rather than plausible-sounding guesses — a zero-infra alternative to standing up your own vector DB and embedding pipeline. In the wild: turning a notebook into the source-grounded "project brain" a coding agent consults before it writes code.
  • 🪞 Query your own notes / journal — Load years of daily notes, meeting logs, or a journal and ask for cited answers across your own history — surfacing long-term patterns a keyword search can't (e.g. a weekly summary synthesized from 282 daily notes, every claim linked back to the entry it came from). In the wild: chatting with a year of daily notes as a cited knowledge base.

Turn your sources into answers & artifacts — cited responses, generated media, and exports:

  • 📞 Grounded knowledge base / troubleshooting oracle (RAG) — Load product docs, FAQs, RFCs, and past tickets, then ask --json for source-grounded, cited answers for support, on-call, or internal Q&A. Or have an agent point it at an entire fast-moving tool's docs — more than the agent can hold in context — as a troubleshooting oracle it queries the moment it hits an error. In the wild: OpenClaw drove the library to scrape all 524 pages of docs.openclaw.ai, dedupe the duplicate translations, and audit it down to 269 clean sources (missing/extra/duplicate = 0).
  • 🔁 Multi-format content repurposing — One source set, every format: generate audio (podcast), generate video, generate slide-deck, plus a generate report blog draft, generate quiz, and generate flashcards — fan a single notebook out across channels.
  • 📤 Bulk, scriptable exports — Pull mind maps as JSON, flashcards/quizzes as JSON/Markdown/HTML, data tables as CSV, and reports as Markdown — in bulk, to local files, straight into Anki, your mind-mapping tool, or a repo (download <type> / download <type> --all). The programmatic "get data out" half of the library, not just "put sources in."
  • 🕸️ Obsidian / knowledge-graph sync — Run the CLI from your vault root so downloaded artifacts (reports, mind-map JSON, transcripts) land as files in your knowledge graph; community skills built on this library even resolve NotebookLM's citation markers into Obsidian [[wikilinks]]. Pair with a podcast overview for an audio digest of your notes. In the wild: "Claude Code + NotebookLM + Obsidian = GOD MODE".

Run it unattended, at scale, or on the go — scheduled, headless, and remote:

  • 🚨 Incident runbook generator — On an alert, spin up a notebook of the relevant docs, ask targeted diagnostic questions, and generate a briefing-doc report (generate report --format briefing-doc --wait, then download report) as an automated runbook.
  • 📚 Curriculum / study-set builder — Scrape a syllabus or developer roadmap, create one notebook per topic (with deliberate pacing to dodge rate limits), and bulk-generate podcasts, quizzes, and flashcards for each.
  • 📰 Scheduled audio briefings — Pair auth refresh --quiet (cron/launchd/systemd) with generate audio to publish a fresh personalized briefing to a podcast feed on a schedule.
  • 📱 NotebookLM from your phone, agent-driven — Self-host the remote MCP connector behind a Cloudflare/Tailscale tunnel and add it as a custom connector on the web (claude.ai Connectors, or ChatGPT with Developer Mode). Then drive the full toolset — deep research, source ingestion, studio generation, cited Q&A — from the claude.ai mobile app on the go (ChatGPT's MCP connectors are web-only), chained with your other MCP tools, instead of app-hopping.

These combine ordinary library primitives — see the CLI Reference and Python API. The agent-side glue (skills, scheduling, vault layout) lives in your own setup, not this package. Per-notebook source counts depend on your Google account tier — split across notebooks if you hit a cap.

New here? Start with a walkthrough: Claude Code + NotebookLM = CHEAT CODE (video) · 5 demos + 50 use cases, with prompts.

Ways to Use

Method Best For
Python API Application integration, async workflows, custom pipelines
CLI Shell scripts, quick tasks, CI/CD automation
MCP Server Claude Desktop/Code, Codex, etc. — locally via stdio, or as a self-hosted remote connector (behind a Cloudflare/Tailscale tunnel) reachable from claude.ai and ChatGPT, mobile included.
REST Server Local automation over guarded HTTP routes without spawning a CLI process per call
Agent Integration Claude Code, Codex, LLM agents, natural language automation

Features

Complete NotebookLM Coverage

Category Capabilities
Notebooks Create, list, rename, delete
Sources URLs, YouTube, files (PDF, text, Markdown, Word, EPUB, audio, video, images), Google Drive, pasted text; refresh, get guide/fulltext
Chat Questions, conversation history, custom personas, suggested starter prompts
Notes Create, list, rename, delete, save chat answers, save conversation history
Source Labels AI-generated or manual topic labels; add/remove source membership; filter sources by label
Research Web and Drive research agents (fast/deep modes) with auto-import
Sharing Public/private links, user permissions (viewer/editor), view level control

Content Generation (All Artifact Types)

Type Options Download Format
Audio Overview 4 formats (deep-dive, brief, critique, debate), 3 lengths, 50+ languages MP3
Video Overview 4 formats (explainer, brief, cinematic, short), 8 visual styles (+ auto/custom), plus a dedicated cinematic-video CLI alias MP4
Slide Deck Detailed or presenter format, adjustable length; individual slide revision PDF, PPTX
Infographic 3 orientations, 3 detail levels PNG
Quiz Configurable quantity and difficulty JSON, Markdown, HTML
Flashcards Configurable quantity and difficulty JSON, Markdown, HTML
Report Briefing doc, study guide, blog post, or custom prompt Markdown
Data Table Custom structure via natural language CSV
Mind Map Hierarchical node tree — two kinds: note-backed JSON or the newer interactive studio map (--kind / MindMapKind) JSON

Beyond the Web UI

Programmatic, batch, and local-file capabilities the API/CLI make easy — several in richer formats, or at a scale, than clicking through the web app:

  • Batch downloads - Download all artifacts of a type at once
  • Quiz/Flashcard export - Get structured JSON, Markdown, or HTML files
  • Mind map data extraction - Export hierarchical JSON for visualization tools
  • Data table CSV export - Download structured tables as spreadsheets
  • Slide deck as PPTX or PDF - Download editable PowerPoint or PDF files
  • Slide revision - Modify individual slides with natural-language prompts
  • Report template customization - Append extra instructions to built-in format templates
  • Save chat history to notes - Persist a whole Q&A conversation (not just a single answer) as a notebook note
  • Source fulltext access - Retrieve the indexed text content of any source
  • Programmatic sharing - Manage permissions without the UI

Installation

The full install guide — six personas (agent, end-user, library, headless, contributor, power-user), optional extras matrix, platform notes — lives in docs/installation.md.

Quickest start (CLI users and AI agents) — install the CLI with uv tool (recommended) or pipx:

uv tool install "notebooklm-py[browser]"   # or: pipx install "notebooklm-py[browser]"
notebooklm login                           # first run auto-downloads Chromium (~170 MB), then Google sign-in
notebooklm auth check --test --json        # verify: expect "status": "ok"

Why uv tool / pipx? They install the CLI into its own isolated environment and put notebooklm on your PATH — no dependency clashes with other tools, a one-line upgrade (uv tool upgrade notebooklm-py) or uninstall, and, crucially, they work on modern macOS (Homebrew Python) and Debian/Ubuntu where a system-wide pip install is blocked with error: externally-managed-environment (PEP 668). No uv yet? curl -LsSf https://astral.sh/uv/install.sh | sh (or brew install uv / winget install astral-sh.uv).

Prefer plain pip? It works the same inside a virtualenv (and directly on Windows, where Python isn't externally-managed):

python3 -m venv .venv && source .venv/bin/activate   # Windows: .venv\Scripts\activate
pip install "notebooklm-py[browser]"

As a library (embedded in your app — no Playwright, no Chromium):

uv add notebooklm-py                    # or, inside a virtualenv: pip install notebooklm-py

If playwright install chromium fails on Linux with TypeError: onExit is not a function, see the Linux workaround. Contributors: see CONTRIBUTING.md.

Authentication & Access

Flexible auth for local dev, headless servers, and multi-tenant setups:

  • Three ways to get cookies - Interactive Playwright login (default), import from an already-signed-in browser (login --browser-cookies chrome, no Playwright), or a durable master token.
  • Master-token auth - Mints fresh web cookies on demand with no per-session browser (login --master-token --account you@example.com), so it self-heals expired sessions unattended — the auth model for servers, CI, and the remote MCP connector (claude.ai / ChatGPT).
  • Multi-account profiles - Switch between Google accounts without re-authenticating.

Agent Setup

Option 1 — CLI install:

notebooklm skill install

Installs the skill into ~/.claude/skills/notebooklm and ~/.agents/skills/notebooklm.

Option 2 — npx install (via the open skills ecosystem):

npx skills add teng-lin/notebooklm-py

Fetches the canonical SKILL.md directly from GitHub.

Quick Start


16-minute session compressed to 30 seconds

CLI

# 1. Authenticate (opens browser)
notebooklm login
# Or use Microsoft Edge (for orgs that require Edge for SSO)
# notebooklm login --browser msedge
# Or reuse cookies from an already-logged-in browser session
# notebooklm login --browser-cookies chrome
# notebooklm login --browser-cookies 'chrome::Profile 1'  # one Chromium profile
# (combine with --profile to populate a specific profile;
#  use --account / --all-accounts after auth inspect when several
#  Google accounts are signed in)

# 2. Create a notebook and add sources
notebooklm create "My Research"
notebooklm use <notebook_id>
notebooklm source add "https://en.wikipedia.org/wiki/Artificial_intelligence"
notebooklm source add "./paper.pdf"

# 3. Chat with your sources
notebooklm ask "What are the key themes?"
notebooklm ask --prompt-file ./long_question.txt  # Read question from file

# 4. Generate content (use --prompt-file for long prompts)
notebooklm generate audio "make it engaging" --wait
notebooklm generate video --style whiteboard --wait
notebooklm generate cinematic-video "documentary-style summary" --wait
notebooklm generate quiz --difficulty hard
notebooklm generate flashcards --quantity more
notebooklm generate slide-deck
notebooklm generate infographic --orientation portrait
notebooklm generate mind-map                       # interactive studio map (default); --kind note-backed for the JSON tree
notebooklm generate data-table "compare key concepts"

# 5. Download artifacts
notebooklm download audio ./podcast.mp3
notebooklm download video ./overview.mp4
notebooklm download cinematic-video ./documentary.mp4
notebooklm download quiz --format markdown ./quiz.md
notebooklm download flashcards --format json ./cards.json
notebooklm download slide-deck ./slides.pdf
notebooklm download infographic ./infographic.png
notebooklm download mind-map ./mindmap.json
notebooklm download data-table ./data.csv

Other useful CLI commands:

notebooklm auth check --test         # Diagnose auth/cookie issues
notebooklm auth refresh --quiet      # One-shot cookie keepalive (for cron / launchd / systemd)
notebooklm auth refresh --browser-cookies chrome  # Re-extract and repair account routing
notebooklm auth inspect --browser 'chrome::Profile 1'  # Preview one Chromium profile
notebooklm agent show codex          # Print bundled Codex instructions
notebooklm agent show claude         # Print bundled Claude Code skill template
notebooklm language list             # List supported output languages
notebooklm metadata --json           # Export notebook metadata and sources
notebooklm share status              # Inspect sharing state
notebooklm source add-research "AI" --import-all  # web research + import found sources
notebooklm skill status              # Check local agent skill installation
notebooklm profile list              # List all Google account profiles
notebooklm profile switch work       # Switch active account profile

Use --prompt-file PATH with ask, prompt-based generate commands, and source add-research when the text is too long for the shell command line. This reads prompt/query text from a file and is separate from source add ./file.pdf, which still uploads that file as a NotebookLM source.

Python API

import asyncio
from notebooklm import NotebookLMClient, MindMapKind

async def main():
    async with NotebookLMClient.from_storage() as client:
        # Create notebook and add sources
        nb = await client.notebooks.create("Research")
        await client.sources.add_url(nb.id, "https://example.com", wait=True)

        # Chat with your sources
        result = await client.chat.ask(nb.id, "Summarize this")
        print(result.answer)

        # Generate content (podcast, video, quiz, etc.)
        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")

        # Generate quiz and download as JSON
        status = await client.artifacts.generate_quiz(nb.id)
        await client.artifacts.wait_for_completion(nb.id, status.task_id)
        await client.artifacts.download_quiz(nb.id, "quiz.json", output_format="json")

        # Generate a mind map via the unified client.mind_maps API (issue #1256) —
        # two kinds: the newer MindMapKind.INTERACTIVE studio map (shown; polled to
        # completion by default) or MindMapKind.NOTE_BACKED JSON. Both export via:
        mm = await client.mind_maps.generate(nb.id, kind=MindMapKind.INTERACTIVE)
        await client.artifacts.download_mind_map(nb.id, "mindmap.json", mm.id)

asyncio.run(main())

Documentation

For Contributors

License

MIT License. See LICENSE for details.

View on GitHub

Recent activity

commits and pull requests

Recent open issues

view all

Discussions

all 3

Releases and announcements

26 total
  1. v0.8.0rc1v0.8.0rc1Jul 22, 2026pre-release25 downloads

    This is a **release-candidate pre-release** in the 0.8.0 line. Changes since `v0.8.0b5`: ### Fixed - **MCP OAuth state is keyed on the base URL, not the served profile.** Prevents state collisions across profiles during the OAuth handshake ([#1982](https://github.com/teng-lin/notebooklm-py/issues/1982)). - **`source add` honors an explicit `--title` for YouTube/Drive/web imports.** The supplied title is no longer overridden by the fetched source name ([#1960](https://github.com/teng-lin/notebooklm-py/issues/1960)). - **From-source Docker images bake in the git commit** so `server_info` reports accurate build provenance ([#1990](https://github.com/teng-lin/notebooklm-py/issues/1990)). --- Install with `pip install --pre notebooklm-py==0.8.0rc1`. Full 0.8.0 cycle changelog: [CHANGELOG.md](https://github.com/teng-lin/notebooklm-py/blob/v0.8.0rc1/CHANGELOG.md).

  2. v0.8.0b5v0.8.0b5Jul 17, 2026pre-release27 downloads

    This is a **beta pre-release** in the 0.8.0 line. Change since `v0.8.0b4`: ### Fixed - **Fresh conversations are no longer reported as follow-ups.** A null-conversation ask now checks whether the server-assigned current conversation has any turns before setting `AskResult.is_follow_up` ([#1973](https://github.com/teng-lin/notebooklm-py/issues/1973)). --- Install with `pip install --pre notebooklm-py==0.8.0b5`. Full 0.8.0 cycle changelog: [CHANGELOG.md](https://github.com/teng-lin/notebooklm-py/blob/v0.8.0b5/CHANGELOG.md).

  3. v0.8.0b4v0.8.0b4Jul 17, 2026pre-release17 downloads

    This is a **beta pre-release** in the 0.8.0 line. Changes since `v0.8.0b3`: ### Fixed - **MCP `source_add` bytes upload no longer defaults to an extensionless `upload.bin`.** Passing `bytes_base64` without an explicit `filename` used to spool the file as `upload.bin`, which NotebookLM rejected with an HTTP 400 ("file type unsupported") even for plain text. The filename/extension is now seeded from the `title` and/or `mime_type` (falling back to `upload.bin` only when neither yields one), so a bytes upload succeeds without a caller-supplied filename ([#1955](https://github.com/teng-lin/notebooklm-py/issues/1955)). - **Research import is now idempotent.** Re-importing a completed research task no longer duplicates its sources: `import_sources_with_verification` (and the MCP `research_import` tool that drives it) pre-filters requested sources whose URL already exists in the notebook on *every* attempt, not only on the timeout-retry path. A repeat import adds nothing and reports the skipped sources — the MCP result gains `newly_imported` / `already_present` (with the existing source ids) and a `status` of `already_imported`. Pass `allow_duplicate=True` (MCP)

  4. v0.8.0b3v0.8.0b3Jul 16, 2026pre-release16 downloads

    This is a **beta pre-release** in the 0.8.0 line. Changes since `v0.8.0b2`: ### Added - **MCP file upload now records and can verify a SHA-256 of the uploaded bytes.** The `/files/ul` route computes the digest of exactly the received bytes and stores it in the completion record (`{source_id, name, size, mime, sha256}`), which `await_upload` surfaces. An optional `?sha256=<hex>` lets a client assert transit integrity — a mismatch returns a clean `400` before the source is added (the single-use token rolls back and stays retryable) ([#1889](https://github.com/teng-lin/notebooklm-py/issues/1889)). - **MCP `await_upload` emits progress keepalives while it polls**, so an MCP host no longer treats a long upload wait as a stalled call (`ctx.report_progress` at start and on each ~2s tick; best-effort, and a no-op without a client progress token) ([#1889](https://github.com/teng-lin/notebooklm-py/issues/1889)). - **MCP remote `studio_download` returns the report / data-table body inline** (bounded, alongside the signed link) so a remote host can read a generated report without a second fetch ([#1911](https://github.com/teng-lin/notebooklm-py/issues/1911)). - **`stu

  5. v0.8.0b2v0.8.0b2Jul 15, 2026pre-release9 downloads

    ## [0.8.0] The headline of 0.8.0 is **integrations**: NotebookLM is now reachable from AI agents and HTTP clients through two new adapters built over the shared `_app/` core (ADR-0021) — an **MCP server** and an experimental **single-tenant REST API server** — plus a **remote MCP connector** you can self-host for **claude.ai** (and Claude Desktop / Code / Cursor) behind a Cloudflare Tunnel or Tailscale Funnel, gated by a single password. 0.8.0 also lands the **breaking half** of the ADR-0019 error contract (the [#1346](https://github.com/teng-lin/notebooklm-py/issues/1346) umbrella): "absence and refusal **raise**; only success and async-lifecycle state are returned." Every flip previewed under `NOTEBOOKLM_FUTURE_ERRORS` in v0.7.0 is now the default, and the preview flag — together with the dict-subscript / get-returns-None / kwarg-alias deprecation machinery — has been **removed** (#1365). See the [Upgrading to v0.8.0](docs/upgrading-to-0.8.0.md) guide and the **Breaking** section below. > **⚠ `NOTEBOOKLM_FUTURE_ERRORS` is gone.** It was the v0.7.0 forward-compat > preview gate; its target behavior is now unconditional, so the flag is a no-op > (setting it changes nothing). Rem

Commits per week

last 52 weeks
3020Week of 2025-08-02: 0 commitsWeek of 2025-08-09: 0 commitsWeek of 2025-08-16: 0 commitsWeek of 2025-08-23: 0 commitsWeek of 2025-08-30: 0 commitsWeek of 2025-09-06: 0 commitsWeek of 2025-09-13: 0 commitsWeek of 2025-09-20: 0 commitsWeek of 2025-09-27: 0 commitsWeek of 2025-10-04: 0 commitsWeek of 2025-10-11: 0 commitsWeek of 2025-10-18: 0 commitsWeek of 2025-10-25: 0 commitsWeek of 2025-11-01: 0 commitsWeek of 2025-11-09: 0 commitsWeek of 2025-11-16: 0 commitsWeek of 2025-11-23: 0 commitsWeek of 2025-11-30: 0 commitsWeek of 2025-12-07: 0 commitsWeek of 2025-12-14: 0 commitsWeek of 2025-12-21: 0 commitsWeek of 2025-12-28: 0 commitsWeek of 2026-01-04: 302 commitsWeek of 2026-01-11: 73 commitsWeek of 2026-01-18: 53 commitsWeek of 2026-01-25: 3 commitsWeek of 2026-02-01: 0 commitsWeek of 2026-02-08: 0 commitsWeek of 2026-02-15: 0 commitsWeek of 2026-02-22: 8 commitsWeek of 2026-03-01: 18 commitsWeek of 2026-03-08: 68 commitsWeek of 2026-03-15: 2 commitsWeek of 2026-03-22: 10 commitsWeek of 2026-03-29: 57 commitsWeek of 2026-04-05: 5 commitsWeek of 2026-04-12: 17 commitsWeek of 2026-04-19: 2 commitsWeek of 2026-04-26: 0 commitsWeek of 2026-05-03: 29 commitsWeek of 2026-05-10: 284 commitsWeek of 2026-05-17: 226 commitsWeek of 2026-05-24: 210 commitsWeek of 2026-05-31: 132 commitsWeek of 2026-06-07: 66 commitsWeek of 2026-06-14: 28 commitsWeek of 2026-06-21: 14 commitsWeek of 2026-06-28: 87 commitsWeek of 2026-07-05: 29 commitsWeek of 2026-07-12: 79 commitsWeek of 2026-07-19: 0 commitsWeek of 2026-07-26: 2 commitsAug 2, 2025Jul 26, 2026
1.8K commits in the last 52 weeks.

When work happens

weekday and hour
SunMonTueWedThuFriSat036912151821Sun 0:00 — 12 commitsSun 1:00 — 4 commitsSun 2:00 — 5 commitsSun 3:00 — 3 commitsSun 4:00 — 3 commitsSun 5:00 — 4 commitsSun 6:00 — 11 commitsSun 7:00 — 20 commitsSun 8:00 — 10 commitsSun 9:00 — 12 commitsSun 10:00 — 5 commitsSun 11:00 — 4 commitsSun 12:00 — 13 commitsSun 13:00 — 21 commitsSun 14:00 — 7 commitsSun 15:00 — 10 commitsSun 16:00 — 2 commitsSun 17:00 — 4 commitsSun 18:00 — 2 commitsSun 19:00 — 1 commitsSun 20:00 — 17 commitsSun 21:00 — 20 commitsSun 22:00 — 8 commitsSun 23:00 — 3 commitsMon 0:00 — 1 commitsMon 1:00 — 4 commitsMon 2:00 — 1 commitsMon 3:00 — 2 commitsMon 4:00 — 3 commitsMon 5:00 — 3 commitsMon 6:00 — 7 commitsMon 7:00 — 7 commitsMon 8:00 — 18 commitsMon 9:00 — 7 commitsMon 10:00 — 20 commitsMon 11:00 — 14 commitsMon 12:00 — 9 commitsMon 13:00 — 8 commitsMon 14:00 — 12 commitsMon 15:00 — 7 commitsMon 16:00 — 11 commitsMon 17:00 — 8 commitsMon 18:00 — 16 commitsMon 19:00 — 11 commitsMon 20:00 — 7 commitsMon 21:00 — 12 commitsMon 22:00 — 8 commitsMon 23:00 — 1 commitsTue 0:00 — 3 commitsTue 1:00 — 3 commitsTue 2:00 — 1 commitsTue 3:00 — 0 commitsTue 4:00 — 0 commitsTue 5:00 — 10 commitsTue 6:00 — 9 commitsTue 7:00 — 7 commitsTue 8:00 — 13 commitsTue 9:00 — 10 commitsTue 10:00 — 6 commitsTue 11:00 — 22 commitsTue 12:00 — 6 commitsTue 13:00 — 6 commitsTue 14:00 — 4 commitsTue 15:00 — 5 commitsTue 16:00 — 13 commitsTue 17:00 — 6 commitsTue 18:00 — 10 commitsTue 19:00 — 11 commitsTue 20:00 — 21 commitsTue 21:00 — 16 commitsTue 22:00 — 18 commitsTue 23:00 — 19 commitsWed 0:00 — 10 commitsWed 1:00 — 10 commitsWed 2:00 — 7 commitsWed 3:00 — 16 commitsWed 4:00 — 6 commitsWed 5:00 — 10 commitsWed 6:00 — 10 commitsWed 7:00 — 11 commitsWed 8:00 — 8 commitsWed 9:00 — 13 commitsWed 10:00 — 11 commitsWed 11:00 — 7 commitsWed 12:00 — 11 commitsWed 13:00 — 5 commitsWed 14:00 — 17 commitsWed 15:00 — 9 commitsWed 16:00 — 8 commitsWed 17:00 — 13 commitsWed 18:00 — 7 commitsWed 19:00 — 15 commitsWed 20:00 — 15 commitsWed 21:00 — 14 commitsWed 22:00 — 18 commitsWed 23:00 — 15 commitsThu 0:00 — 19 commitsThu 1:00 — 5 commitsThu 2:00 — 7 commitsThu 3:00 — 3 commitsThu 4:00 — 3 commitsThu 5:00 — 10 commitsThu 6:00 — 15 commitsThu 7:00 — 27 commitsThu 8:00 — 32 commitsThu 9:00 — 20 commitsThu 10:00 — 27 commitsThu 11:00 — 23 commitsThu 12:00 — 9 commitsThu 13:00 — 13 commitsThu 14:00 — 16 commitsThu 15:00 — 14 commitsThu 16:00 — 15 commitsThu 17:00 — 17 commitsThu 18:00 — 17 commitsThu 19:00 — 9 commitsThu 20:00 — 6 commitsThu 21:00 — 11 commitsThu 22:00 — 18 commitsThu 23:00 — 23 commitsFri 0:00 — 11 commitsFri 1:00 — 4 commitsFri 2:00 — 5 commitsFri 3:00 — 18 commitsFri 4:00 — 6 commitsFri 5:00 — 13 commitsFri 6:00 — 19 commitsFri 7:00 — 16 commitsFri 8:00 — 24 commitsFri 9:00 — 36 commitsFri 10:00 — 17 commitsFri 11:00 — 13 commitsFri 12:00 — 19 commitsFri 13:00 — 8 commitsFri 14:00 — 20 commitsFri 15:00 — 29 commitsFri 16:00 — 14 commitsFri 17:00 — 7 commitsFri 18:00 — 4 commitsFri 19:00 — 9 commitsFri 20:00 — 3 commitsFri 21:00 — 7 commitsFri 22:00 — 17 commitsFri 23:00 — 5 commitsSat 0:00 — 9 commitsSat 1:00 — 16 commitsSat 2:00 — 8 commitsSat 3:00 — 4 commitsSat 4:00 — 2 commitsSat 5:00 — 6 commitsSat 6:00 — 4 commitsSat 7:00 — 12 commitsSat 8:00 — 15 commitsSat 9:00 — 12 commitsSat 10:00 — 16 commitsSat 11:00 — 9 commitsSat 12:00 — 14 commitsSat 13:00 — 5 commitsSat 14:00 — 7 commitsSat 15:00 — 13 commitsSat 16:00 — 8 commitsSat 17:00 — 5 commitsSat 18:00 — 12 commitsSat 19:00 — 11 commitsSat 20:00 — 8 commitsSat 21:00 — 11 commitsSat 22:00 — 23 commitsSat 23:00 — 12 commits
Commit volume by weekday and hour (UTC). Larger dots mean more commits.

Who is committing

last 52 weeks
Maintainer commits1,697 (91%)
Community commits177 (9%)

1,874 commits in total over the last year.

DateListRankStars gained
Jan 14, 2026daily#24+135
  • public-apis/public-apis

    A collective list of free APIs

    454.9K stars · Python

  • donnemartin/system-design-primer

    Learn how to design large-scale systems. Prep for the system design interview. Includes Anki flashcards.

    362.2K stars · Python

  • practical-tutorials/project-based-learning

    Curated list of project-based tutorials

    277.2K stars · Python

  • obra/superpowers

    An agentic skills framework & software development methodology that works.

    268.6K stars · Shell

  • affaan-m/ECC

    The agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.

    238.5K stars · JavaScript

  • affaan-m/ECC

    The agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.

    234.7K stars · JavaScript