explaingit

teng-lin/notebooklm-py

13,163PythonAudience · vibe coderComplexity · 2/5Setup · moderate

TLDR

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.

Mindmap

mindmap
  root((repo))
    What it does
      Control NotebookLM by code
      Export hidden features
      AI agent skill file
    Tech Stack
      Python library
      CLI tool
      Undocumented Google APIs
    Features
      Notebook management
      Audio and video export
      Quiz and slide export
    Audience
      Developers
      AI agents
      Researchers
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

Things people build with this

USE CASE 1

Automate NotebookLM to create notebooks, import documents, and download audio summaries as MP3 files without opening a browser.

USE CASE 2

Export quiz answers from NotebookLM as structured JSON for use in your own study app or workflow.

USE CASE 3

Download slide decks from NotebookLM as editable PowerPoint files, a feature unavailable through the website.

USE CASE 4

Use the library as a skill file so an AI agent like Claude can create and query NotebookLM notebooks in natural language.

Tech stack

Python

Getting it running

Difficulty · moderate Time to first run · 30min

Requires a Google account sign-in via a browser popup on first run to authenticate the session.

In plain English

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.

Copy-paste prompts

Prompt 1
Using notebooklm-py, write a Python script that creates a new notebook, imports a PDF from my computer, and downloads the audio overview as an MP3.
Prompt 2
I want to export all my NotebookLM quiz answers as a JSON file using notebooklm-py. Show me the exact Python code.
Prompt 3
Using notebooklm-py from the command line, how do I import a YouTube video as a source and generate a podcast-style audio overview?
Prompt 4
Set up notebooklm-py as a Claude Code skill file so my AI agent can create and search NotebookLM notebooks automatically.
Prompt 5
Write a notebooklm-py script that imports 5 URLs, generates a mind map, and saves it locally as JSON.
Open on GitHub → Explain another repo

← teng-lin on gitmyhub — every repo by this author, as a profile.

Verify against the repo before relying on details.