Skip to main content

Unofficial Python client for Google NotebookLM API

Project description

notebooklm-py

notebooklm-py logo

The missing API for Google NotebookLM. Automate research workflows, generate podcasts from your documents, and integrate NotebookLM into AI agents—all from Python or the command line.

PyPI version Python Version License: MIT Tests

⚠️ 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, or other LLM agents. Ships with Claude Code skills for natural language automation (notebooklm skill install), or build your own integrations with the async Python API.

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

🎙️ Content Generation - Generate Audio Overviews (podcasts), videos, quizzes, flashcards, and study guides. Turn your sources into polished content with a single command.

Three Ways to Use

Method Best For
Python API Application integration, async workflows, custom pipelines
CLI Shell scripts, quick tasks, CI/CD automation
Agent Skills Claude Code, LLM agents, natural language automation

Try It Now

pip install "notebooklm-py[browser]"
notebooklm login                          # Browser auth (one-time)
notebooklm create "Test" && notebooklm ask "Hello!"

See Installation for options or jump to Quick Start.

Installation

# Basic installation
pip install notebooklm-py

# With browser login support (required for first-time setup)
pip install "notebooklm-py[browser]"
playwright install chromium

Quick Start

CLI

# 1. Authenticate (opens browser)
notebooklm login

# 2. Create a notebook
notebooklm create "My Research"
notebooklm use <notebook_id>

# 3. Add sources
notebooklm source add "https://en.wikipedia.org/wiki/Artificial_intelligence"
notebooklm source add "./paper.pdf"

# 4. Chat
notebooklm ask "What are the key themes?"

# 5. Generate a podcast
notebooklm generate audio --wait
notebooklm download audio ./podcast.mp3

Python API

import asyncio
from notebooklm import NotebookLMClient

async def main():
    async with await NotebookLMClient.from_storage() as client:
        # List notebooks
        notebooks = await client.notebooks.list()

        # Create notebook and add source
        nb = await client.notebooks.create("Research")
        await client.sources.add_url(nb.id, "https://example.com")

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

        # Generate podcast
        status = await client.artifacts.generate_audio(nb.id)
        await client.artifacts.wait_for_completion(nb.id, status.task_id)

asyncio.run(main())

Agent Skills (Claude Code)

# Install the skill
notebooklm skill install

# Then use natural language in Claude Code:
# "Create a podcast about quantum computing"
# "Summarize these URLs into a notebook"
# "/notebooklm generate video"

Features

Category Capabilities
Notebooks Create, list, rename, delete, share
Sources URLs, YouTube, files (PDF/TXT/MD/DOCX), Google Drive, pasted text
Chat Questions, conversation history, custom personas
Generation Audio podcasts, video, slides, quizzes, flashcards, reports, infographics, mind maps
Research Web and Drive research agents with auto-import
Downloads Audio, video, slides, infographics
Agent Skills Claude Code skill for LLM-driven automation

Documentation

For Contributors

Platform Support

Platform Status Notes
macOS ✅ Tested Primary development platform
Linux ✅ Tested Fully supported
Windows ⚠️ Untested May work, but not tested in CI

License

MIT License. See LICENSE for details.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

notebooklm_py-0.1.1.tar.gz (883.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

notebooklm_py-0.1.1-py3-none-any.whl (100.7 kB view details)

Uploaded Python 3

File details

Details for the file notebooklm_py-0.1.1.tar.gz.

File metadata

  • Download URL: notebooklm_py-0.1.1.tar.gz
  • Upload date:
  • Size: 883.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.12

File hashes

Hashes for notebooklm_py-0.1.1.tar.gz
Algorithm Hash digest
SHA256 a466823cd966ac3d394cb339bc890655ac311def02a2d977d6dd3babbb055078
MD5 456d1140969ffb00dce2fda5a52ebc60
BLAKE2b-256 487946855d756550133b20c0b3787d5fdd216566a754e860eddc99aaacfbf9e8

See more details on using hashes here.

File details

Details for the file notebooklm_py-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: notebooklm_py-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 100.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.12

File hashes

Hashes for notebooklm_py-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 179bbdc90fd387431db00a0ef83269227b9baf5666fc57e1a373ecc143dadc33
MD5 017ad89e298310c2a2906220c0e1f596
BLAKE2b-256 9caa6889bf86342d64be9653d52bd8864bd05dc089a9cbe89204868575317202

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page