NotebookLM-py

πŸš€ Description

teng-lin/notebooklm-py β€” an unofficial Python API + CLI + MCP server + agent skill for Google NotebookLM, giving programmatic access to features the web UI doesn’t expose. Uses undocumented Google endpoints β€” use at your own risk: not affiliated with Google, APIs can break without notice, rate limits apply. Best for prototypes, research, personal projects.

The core idea: NotebookLM is a grounded engine β€” Gemini reads your sources and answers with citations. Let it do the expensive server-side reasoning while your agent (Claude Code, Codex, …) orchestrates and handles the final mile. A zero-token synthesis + memory layer an agent drives in a loop, plus bulk structured export out.

🧩 Ways to use

MethodBest for
CLIshell scripts, quick tasks, CI/CD
Python APIapp integration, async pipelines
MCP serverClaude Desktop/Code, Codex β€” local stdio or self-hosted remote connector (Cloudflare/Tailscale tunnel β†’ claude.ai + ChatGPT, mobile included)
REST serverlocal automation over guarded HTTP routes
Agent skillnotebooklm skill install β†’ ~/.claude/skills, ~/.agents/skills; or npx skills add teng-lin/notebooklm-py

🧩 What it covers

  • Sources β€” bulk import URLs, YouTube, PDFs/Word/EPUB/audio/video/images, Google Drive, pasted text; web/Drive research agents (fast/deep) with auto-import
  • Chat β€” cited Q&A (ask --json), personas, save answers/history as notes
  • Generation β€” Audio Overview (podcast), video, slide deck, infographic, quiz, flashcards, report, data table, mind map
  • Beyond the web UI β€” batch downloads, quiz/flashcard export (JSON/MD/HTML), mind-map JSON extraction, data-table CSV, slide deck PPTX/PDF + per-slide revision, programmatic sharing
  • Auth β€” interactive Playwright login, import cookies from a signed-in browser, or a durable master token that self-heals expired sessions unattended (servers, CI, remote MCP)

Reasoning for

The recipe worth stealing: knowledge distillation β†’ permanent skill β€” run Deep Research or load a doc corpus, let Gemini condense it, bake the result into a SKILL.md the agent loads at startup (build once, reuse with zero runtime tokens). Related patterns: a β€œMaster Brain” notebook as persistent cross-session memory queried from CLAUDE.md; a source-grounded troubleshooting oracle over a fast-moving tool’s docs; and Obsidian sync β€” run the CLI from the vault root so reports/mind-map JSON/transcripts land as files, with community skills resolving NotebookLM citations into [[wikilinks]].

Install: uv tool install "notebooklm-py[browser]" then notebooklm login (auto-downloads Chromium). On Windows plain pip install also works (not externally-managed).

Alternatives considered

  • Open Notebook β€” self-hostable open-source NotebookLM clone (own inference, runs local via Ollama). NotebookLM-py is the opposite tack: drive the real hosted NotebookLM via undocumented APIs. Clone = own your stack; py = Gemini’s quality + features, at API-break risk.
  • Standing up your own vector DB + embedding pipeline β€” the zero-infra alternative NotebookLM-py’s grounded-memory recipe replaces
  • Manual clicking in the NotebookLM web app β€” no batch, no scriptable export, no mind-map JSON

Template: tool