Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/teng-lin/notebooklm-py/llms.txt

Use this file to discover all available pages before exploring further.

client.notebooks gives you complete CRUD control over your NotebookLM notebooks. Every method is a coroutine — you must await it inside an async function. Notebooks are identified by a string notebook_id that you receive when you create or list them. The API also exposes AI-generated descriptions and flexible sharing helpers to build publishing workflows.

Methods

list()

Returns all notebooks accessible to the authenticated account.
async def list() -> list[Notebook]
return
list[Notebook]
List of Notebook objects, each containing id, title, created_at, sources_count, and is_owner.
notebooks = await client.notebooks.list()
for nb in notebooks:
    print(f"{nb.id}: {nb.title} ({nb.sources_count} sources)")

create(title)

Creates a new notebook with the given title.
async def create(title: str) -> Notebook
title
str
required
Display title for the new notebook.
return
Notebook
The newly created Notebook object.
Raises: NotebookLimitError when you have reached the account’s maximum notebook count.
nb = await client.notebooks.create("My Research Project")
print(f"Created: {nb.id}")

get(notebook_id)

Fetches details for a single notebook.
async def get(notebook_id: str) -> Notebook
notebook_id
str
required
The ID of the notebook to retrieve.
return
Notebook
Notebook object with current metadata.
nb = await client.notebooks.get("notebook_abc123")
print(nb.title)

delete(notebook_id)

Permanently deletes a notebook and all its sources, notes, and artifacts.
async def delete(notebook_id: str) -> bool
notebook_id
str
required
The ID of the notebook to delete.
return
bool
True when deletion succeeds. Raises RPCError on failure.
deleted = await client.notebooks.delete(nb.id)

rename(notebook_id, new_title)

Renames a notebook. Fetches and returns the updated notebook after the rename.
async def rename(notebook_id: str, new_title: str) -> Notebook
notebook_id
str
required
The ID of the notebook to rename.
new_title
str
required
The replacement title.
return
Notebook
The updated Notebook object with the new title.
nb = await client.notebooks.create("Draft")
nb = await client.notebooks.rename(nb.id, "Final Version")
print(nb.title)  # "Final Version"

get_description(notebook_id)

Returns an AI-generated summary and list of suggested questions for the notebook. This is the parsed form of the summary shown in the Chat panel when you open a notebook.
async def get_description(notebook_id: str) -> NotebookDescription
notebook_id
str
required
The notebook ID to summarize.
return
NotebookDescription
Object with summary (str) and suggested_topics (list of SuggestedTopic). Each SuggestedTopic has question and prompt string fields.
desc = await client.notebooks.get_description(nb.id)
print(desc.summary)
for topic in desc.suggested_topics:
    print(f"  - {topic.question}")

get_summary(notebook_id)

Returns the raw summary text without parsing it into topics. Use get_description() when you need the structured form with suggested questions.
async def get_summary(notebook_id: str) -> str
notebook_id
str
required
The notebook ID.
return
str
Raw summary text string. Empty string if no summary is available yet.
get_summary vs get_description: get_summary() returns a plain string; get_description() returns a NotebookDescription with the same text plus a list of SuggestedTopic objects for suggested follow-up questions.
summary = await client.notebooks.get_summary(nb.id)
print(summary)

get_metadata(notebook_id)

Fetches notebook details and its source list concurrently, returning a combined object useful for exports and audits.
async def get_metadata(notebook_id: str) -> NotebookMetadata
notebook_id
str
required
The notebook ID.
return
NotebookMetadata
Object with a notebook field (Notebook) and a sources field (list[SourceSummary]). SourceSummary has kind, title, and url.
metadata = await client.notebooks.get_metadata(nb.id)
print(f"Notebook: {metadata.notebook.title}")
print(f"Sources: {len(metadata.sources)}")

import json
print(json.dumps(metadata.to_dict(), indent=2))

share(notebook_id, public, artifact_id)

Enables or disables public link sharing for a notebook. When artifact_id is provided, the returned URL deep-links to that artifact.
For full user-permission management (adding editors, viewers by email), use client.sharing instead.
async def share(
    notebook_id: str,
    public: bool = True,
    artifact_id: str | None = None,
) -> dict
notebook_id
str
required
The notebook ID.
public
bool
default:"True"
True to enable sharing; False to disable.
artifact_id
str | None
default:"None"
Optional artifact ID to embed in the share URL as ?artifactId=....
return
dict
Dict with keys public (bool), url (str or None), and artifact_id (str or None).
result = await client.notebooks.share(nb.id, public=True)
print(result["url"])

# Deep-link to a specific artifact
result = await client.notebooks.share(nb.id, public=True, artifact_id="audio_xyz")
print(result["url"])  # https://notebooklm.google.com/notebook/<id>?artifactId=audio_xyz

get_share_url(notebook_id, artifact_id)

Returns the share URL format without toggling sharing state. Call share() first to enable sharing.
def get_share_url(
    notebook_id: str,
    artifact_id: str | None = None,
) -> str
notebook_id
str
required
The notebook ID.
artifact_id
str | None
default:"None"
Optional artifact ID for a deep-link URL.
return
str
URL string of the form https://notebooklm.google.com/notebook/<id> (or with ?artifactId=... appended).
await client.notebooks.share(nb.id, public=True)
url = client.notebooks.get_share_url(nb.id)
print(url)

remove_from_recent(notebook_id)

Removes the notebook from the account’s recently viewed list without deleting it.
async def remove_from_recent(notebook_id: str) -> None
notebook_id
str
required
The notebook ID to remove from recents.
await client.notebooks.remove_from_recent(nb.id)

get_raw(notebook_id)

Returns the raw API response for a notebook. Use this to access data that is not yet surfaced by the typed Notebook dataclass.
async def get_raw(notebook_id: str) -> Any
notebook_id
str
required
The notebook ID.
return
Any
Unprocessed list structure from the NotebookLM RPC response.
raw = await client.notebooks.get_raw(nb.id)
# Inspect structure for debugging or accessing unlisted fields
import json
print(json.dumps(raw, indent=2, default=str))

Complete example

import asyncio
from notebooklm import NotebookLMClient

async def main():
    async with await NotebookLMClient.from_storage() as client:
        # List all notebooks
        notebooks = await client.notebooks.list()
        for nb in notebooks:
            print(f"{nb.id}: {nb.title} ({nb.sources_count} sources)")

        # Create and rename
        nb = await client.notebooks.create("Draft")
        nb = await client.notebooks.rename(nb.id, "Final Version")

        # Get AI-generated description with suggested topics
        desc = await client.notebooks.get_description(nb.id)
        print(desc.summary)
        for topic in desc.suggested_topics:
            print(f"  - {topic.question}")

        # Enable public sharing and get the URL
        await client.notebooks.share(nb.id, public=True)
        url = client.notebooks.get_share_url(nb.id)
        print(url)

asyncio.run(main())

Notebook dataclass

id
str
Unique notebook identifier.
title
str
Display title of the notebook.
created_at
datetime | None
Creation timestamp, or None if unavailable.
sources_count
int
Number of sources currently in the notebook.
is_owner
bool
True when the authenticated user owns this notebook.

Build docs developers (and LLMs) love