NotebookLM Enterprise API
Programmatically create and manage NotebookLM Enterprise notebooks, add sources from Google Drive, web URLs, or local files, and share notebooks with team members using Google Cloud's Discovery Engine API. Use when you need to automate notebook setup, batch upload documents, or manage NotebookLM resources programmatically.
/plugin marketplace add jongwony/cc-plugin/plugin install google@cc-pluginThis skill inherits all available tools. When active, it can use any tool Claude has access to.
references/notebooks-api.mdreferences/sources-api.mdreferences/supported-formats.mdscripts/notebooklm-api.shProgrammatically manage NotebookLM Enterprise notebooks and data sources via the Discovery Engine REST API.
Before using this skill:
gcloud auth print-access-tokengcloud auth login --enable-gdrive-accesshttps://{ENDPOINT_LOCATION}-discoveryengine.googleapis.com/v1alpha/projects/{PROJECT_NUMBER}/locations/{LOCATION}/...
| Parameter | Description | Values |
|---|---|---|
ENDPOINT_LOCATION | Multi-region prefix | us-, eu-, global- |
PROJECT_NUMBER | GCP project number | Numeric ID |
LOCATION | Data store location | global, us, eu |
projects/{PROJECT}/locations/{LOCATION}/notebooks/{NOTEBOOK_ID}projects/{PROJECT}/locations/{LOCATION}/notebooks/{NOTEBOOK_ID}/sources/{SOURCE_ID}curl -X POST \
-H "Authorization: Bearer $(gcloud auth print-access-token)" \
-H "Content-Type: application/json" \
"https://global-discoveryengine.googleapis.com/v1alpha/projects/${PROJECT_NUMBER}/locations/global/notebooks" \
-d '{"title": "My Notebook"}'
Response includes notebookId for subsequent operations.
Sources can be added via sources:batchCreate:
| Source Type | Key Fields |
|---|---|
| Google Docs/Slides | googleDriveContent.documentId, mimeType |
| Raw Text | textContent.content, sourceName |
| Web URL | webContent.url, sourceName |
| YouTube | videoContent.url |
For file uploads, use sources:uploadFile with multipart form data.
Supported File Types:
.pdf, .txt, .md, .docx, .pptx, .xlsx.mp3, .wav, .m4a, .ogg, etc..png, .jpg, .jpeg| Operation | Method | Endpoint |
|---|---|---|
| Get | GET | /notebooks/{id} |
| List Recent | GET | /notebooks:listRecentlyViewed |
| Delete | POST | /notebooks:batchDelete |
| Share | POST | /notebooks/{id}:share |
Generate AI-powered audio summaries:
CreateAudioOverview - Generate audio overviewDeleteAudioOverview - Remove audio overview# Set environment variables
export PROJECT_NUMBER="123456789"
export LOCATION="global"
export ENDPOINT="global-discoveryengine.googleapis.com"
# Create notebook
curl -X POST \
-H "Authorization: Bearer $(gcloud auth print-access-token)" \
-H "Content-Type: application/json" \
"https://${ENDPOINT}/v1alpha/projects/${PROJECT_NUMBER}/locations/${LOCATION}/notebooks" \
-d '{"title": "Research Notes"}'
curl -X POST \
-H "Authorization: Bearer $(gcloud auth print-access-token)" \
-H "Content-Type: application/json" \
"https://${ENDPOINT}/v1alpha/projects/${PROJECT_NUMBER}/locations/${LOCATION}/notebooks/${NOTEBOOK_ID}/sources:batchCreate" \
-d '{
"userContents": [{
"webContent": {
"url": "https://example.com/article",
"sourceName": "Example Article"
}
}]
}'
curl -X POST \
--data-binary "@/path/to/document.pdf" \
-H "Authorization: Bearer $(gcloud auth print-access-token)" \
-H "X-Goog-Upload-File-Name: My Document" \
-H "X-Goog-Upload-Protocol: raw" \
-H "Content-Type: application/pdf" \
"https://${ENDPOINT}/upload/v1alpha/projects/${PROJECT_NUMBER}/locations/${LOCATION}/notebooks/${NOTEBOOK_ID}/sources:uploadFile"
curl -X POST \
-H "Authorization: Bearer $(gcloud auth print-access-token)" \
-H "Content-Type: application/json" \
"https://${ENDPOINT}/v1alpha/projects/${PROJECT_NUMBER}/locations/${LOCATION}/notebooks/${NOTEBOOK_ID}:share" \
-d '{
"accountAndRoles": [
{"email": "user@example.com", "role": "PROJECT_ROLE_WRITER"}
]
}'
Roles: PROJECT_ROLE_OWNER, PROJECT_ROLE_WRITER, PROJECT_ROLE_READER, PROJECT_ROLE_NOT_SHARED
Use @scripts/notebooklm-api.sh for common operations:
# Create notebook
./notebooklm-api.sh create "My Notebook"
# Add web source
./notebooklm-api.sh add-web <notebook_id> "https://example.com" "Source Name"
# Upload file
./notebooklm-api.sh upload <notebook_id> /path/to/file.pdf
# List notebooks
./notebooklm-api.sh list
# Share notebook
./notebooklm-api.sh share <notebook_id> user@example.com writer
gcloud auth print-access-tokengcloud auth login --enable-gdrive-accessFor detailed API specifications:
references/notebooks-api.md - Complete notebooks API referencereferences/sources-api.md - Sources management API detailsreferences/supported-formats.md - Supported file types and MIME typesBefore executing API calls, confirm required variables:
# Required environment variables
echo "PROJECT_NUMBER: ${PROJECT_NUMBER:-NOT SET}"
echo "LOCATION: ${LOCATION:-global}"
# Test authentication
gcloud auth print-access-token > /dev/null && echo "Auth: OK" || echo "Auth: FAILED"
When variables are missing, use AskUserQuestion to gather project configuration.
This skill should be used when the user asks to "create a hookify rule", "write a hook rule", "configure hookify", "add a hookify rule", or needs guidance on hookify rule syntax and patterns.
Create distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.