gitmyhub

notebooklm-py

Python ★ 17k updated 19h ago

Unofficial Python API and agentic skill for Google NotebookLM. 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.

Unofficial Python library and CLI that lets you control Google NotebookLM through code, including exporting audio, quizzes, slides, and mind maps that the website itself does not expose.

Pythonsetup: moderatecomplexity 2/5

notebooklm-py is an unofficial Python library that lets you control Google NotebookLM through code instead of through the browser. NotebookLM is a Google product that lets you upload documents, ask questions about them, and generate study materials like audio summaries, quizzes, and flashcards. This library gives developers and AI agents programmatic access to those features, including some that the NotebookLM website itself does not expose.

The project is clear that it is a community effort, not affiliated with Google. It works by calling undocumented internal APIs, which means it could break without warning if Google changes its backend. The authors recommend it for prototypes, personal projects, and research rather than production systems that need guaranteed reliability.

You can use the library in three ways: as a Python package you import in code, as a command-line tool you call from a terminal, or as a skill file that AI agents (such as Claude Code or Codex) can discover and use to control NotebookLM in natural language. The README specifically targets AI agents as the primary audience.

On the feature side, the library covers creating and managing notebooks, importing sources from URLs, YouTube videos, Google Drive, PDFs, and other file types, running chat queries, and generating content. Content generation includes audio overviews in podcast format, video overviews, slide decks (downloadable as PDF or editable PowerPoint), infographics, quizzes, flashcards, reports, data tables, and mind maps. It can also download all of these locally in formats like MP3, MP4, JSON, Markdown, and CSV.

Notably, several of the download and export features are not available through the NotebookLM website at all, such as exporting quiz answers as structured JSON, downloading slide decks as PowerPoint files, or extracting mind map data. Authentication works by opening a browser window for a Google sign-in, after which the session is saved for future use.

Where it fits