Hi HN,
I’ve been using NotebookLM heavily, but the manual "drag-and-drop" workflow was a bottleneck. I wanted to build automated pipelines (like auto-generating podcasts from a folder of PDFs), but the lack of an official API made this impossible.
The Solution: By mapping the internal RPC endpoints used by the web frontend, I built a native Python client that interacts directly with the backend. This bypasses the overhead and brittleness of browser automation tools like Selenium.
Demo:
Watch Claude Code use the CLI to automate a workflow in the terminal:
https://asciinema.org/a/767284
What you can do with it:
Deep Research & Content Automation: Automate the entire research loop. You can programmatically create a new notebook, import deep research on specific topics, and then trigger the generation of both an Audio Overview (podcast) and a Slide Deck, downloading the final assets in one go.
RAG Pipelines: Use NotebookLM as a grounded backend for agents (query a notebook -> get cited answers).
CLI for Humans & LLMs: The package includes a comprehensive CLI designed for both end-users and agents. It even features a command to auto-install itself as a "Skill" for Claude Code, letting you control NotebookLM via natural language in your terminal.
Stability & Testing:
Unofficial APIs are risky. To mitigate silent breakage, I treated this package like a production product. The repo includes a triple-layer test suite (Unit, Integration, and Daily E2E Cron tests). If Google changes their definitions, my CI fails immediately, and we’ll know before users do.
Auth Note:
The library runs on pure Python (ideal for headless servers), but it requires a valid session cookie to start. The CLI makes this easy: just run notebooklm-py login to perform the one-time extraction (it briefly opens a browser via Playwright). Once you have the token, you can deploy it anywhere without a browser.
Repo:
https://github.com/teng-lin/notebooklm-py
Happy to answer questions!