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.notes manages user-authored text notes inside a notebook. Notes are plain-text documents with a title and a content body — they appear in the notebook’s Notes panel. Mind maps generated by client.artifacts.generate_mind_map() are also stored as notes internally, but they contain structured JSON content rather than prose. The list() method excludes mind maps automatically; use list_mind_maps() to retrieve them separately.

Methods

list(notebook_id)

Returns all text notes in a notebook. Mind maps are excluded.
async def list(notebook_id: str) -> list[Note]
notebook_id
str
required
The notebook ID.
return
list[Note]
List of Note objects. Mind maps (notes whose content contains "children": or "nodes":) are filtered out.
notes = await client.notes.list(nb_id)
for note in notes:
    print(f"{note.id}: {note.title}")

create(notebook_id, title, content)

Creates a new text note.
async def create(
    notebook_id: str,
    title: str = "New Note",
    content: str = "",
) -> Note
notebook_id
str
required
The notebook ID.
title
str
default:"New Note"
Display title for the note.
content
str
default:"\"\""
Initial text content. Can be updated later with update().
return
Note
The newly created Note object.
note = await client.notes.create(
    nb_id,
    title="Meeting Notes",
    content="Discussion points:\n- Point 1\n- Point 2",
)
print(note.id)

get(notebook_id, note_id)

Retrieves a single note by ID.
async def get(notebook_id: str, note_id: str) -> Note | None
notebook_id
str
required
The notebook ID.
note_id
str
required
The note ID.
return
Note | None
Note object if found, None if the note does not exist.
note = await client.notes.get(nb_id, note.id)
if note:
    print(note.content)

update(notebook_id, note_id, content, title)

Updates the content and/or title of an existing note.
async def update(
    notebook_id: str,
    note_id: str,
    content: str,
    title: str,
) -> None
notebook_id
str
required
The notebook ID.
note_id
str
required
The note ID to update.
content
str
required
The new text content.
title
str
required
The new title.
await client.notes.update(nb_id, note.id, "Updated content here", "Updated Title")

delete(notebook_id, note_id)

Permanently deletes a text note.
async def delete(notebook_id: str, note_id: str) -> bool
notebook_id
str
required
The notebook ID.
note_id
str
required
The note ID to delete.
return
bool
True when deletion succeeds.
await client.notes.delete(nb_id, note.id)

list_mind_maps(notebook_id)

Returns all mind maps stored in the notebook’s notes system.
async def list_mind_maps(notebook_id: str) -> list[Any]
notebook_id
str
required
The notebook ID.
return
list[Any]
List of raw mind map records. Each record is a list where index 0 is the mind map ID.
Mind maps are detected by checking whether the note content contains "children": or "nodes": JSON keys, which indicate a hierarchical mind map data structure rather than plain text.
mind_maps = await client.notes.list_mind_maps(nb_id)
for mm in mind_maps:
    mm_id = mm[0]  # Mind map ID is at index 0
    print(f"Mind map: {mm_id}")

delete_mind_map(notebook_id, mind_map_id)

Permanently deletes a mind map.
async def delete_mind_map(notebook_id: str, mind_map_id: str) -> bool
notebook_id
str
required
The notebook ID.
mind_map_id
str
required
The mind map ID (index 0 of a record from list_mind_maps()).
return
bool
True when deletion succeeds.
await client.notes.delete_mind_map(nb_id, mind_map_id)

Note dataclass

id
str
Unique note identifier.
title
str
Display title of the note.
content
str
Text content of the note.
created_at
datetime | None
Creation timestamp, or None if unavailable.

Complete example

import asyncio
from notebooklm import NotebookLMClient

async def main():
    async with await NotebookLMClient.from_storage() as client:
        nb_id = "your_notebook_id"

        # Create a note
        note = await client.notes.create(
            nb_id,
            title="Meeting Notes",
            content="Discussion points:\n- AI tooling review\n- Q4 roadmap",
        )
        print(f"Created note: {note.id}")

        # List all notes
        notes = await client.notes.list(nb_id)
        for n in notes:
            print(f"  {n.id}: {n.title}")

        # Update the note
        await client.notes.update(
            nb_id,
            note.id,
            content="Updated content with action items",
            title="Meeting Notes (Updated)",
        )

        # Retrieve and verify
        updated = await client.notes.get(nb_id, note.id)
        print(updated.title)

        # Delete
        await client.notes.delete(nb_id, note.id)

        # List and delete mind maps
        mind_maps = await client.notes.list_mind_maps(nb_id)
        for mm in mind_maps:
            mm_id = mm[0]
            print(f"Mind map: {mm_id}")
            await client.notes.delete_mind_map(nb_id, mm_id)

asyncio.run(main())

Build docs developers (and LLMs) love