ask-notebooklm-client

Operate a Cloudflare Worker and container bridge to Google NotebookLM via one POST endpoint.

74|11|Updated Jul 4, 2024
One-click install
npx skills add https://github.com/OpenSourceAGI/qwksearch-research-agent --skill ask-notebooklm-client-opensourceagi
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: ask-notebooklm-client
Source: https://github.com/OpenSourceAGI/qwksearch-research-agent/tree/main/skills/ask-notebooklm-client
Command: npx skills add https://github.com/OpenSourceAGI/qwksearch-research-agent --skill ask-notebooklm-client-opensourceagi

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Google NotebookLM has no public API, so integrating it into an app requires browser automation and session management. This Skill explains how the notebooklm-api-client package bridges that gap with a Cloudflare Worker, a Puppeteer-driven Google login, and a container running notebooklm-py behind a single authenticated POST endpoint. ## Core Features & Use Cases - Single POST API: Route six actions (login, list, create, ask, summarize, delete) through one endpoint secured by a Bearer API_TOKEN. - Automated Google Login: Drive Puppeteer through the Google sign-in flow, handle 2FA security codes, and persist cookies and localStorage to the container's auth file. - Container Lifecycle Management: Understand the NotebookRunner Durable Object container that sleeps after 5 minutes idle and shares one auth state across all traffic. - Use Case: You want your app to ask questions against a NotebookLM notebook. Deploy the Worker with wrangler, POST a login action to capture the Google session, then POST ask actions with a notebookId and prompt to get answers. ## Quick Start Ask the assistant to deploy the notebooklm-api-client Worker with wrangler and send a login action followed by an ask action against a notebook.

Frequently Asked Questions about ask-notebooklm-client

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I use the Google NotebookLM API from my app?

NotebookLM has no public API, so this package bridges it with a Cloudflare Worker and a container running notebooklm-py. Send a POST request with an action field such as login, list, create, ask, summarize, or delete, authenticated with a Bearer API_TOKEN.

How do I authenticate NotebookLM with Google sign-in?

POST a login action and the Worker drives a Puppeteer browser through Google sign-in using the GOOGLE_EMAIL and GOOGLE_PASSWORD bindings, retrying with a securityCode for 2FA. It then stores the captured cookies and localStorage in the container's auth file.

Why does the NotebookLM worker return 401 Unauthorized?

The Authorization header must be exactly Bearer followed by your API_TOKEN, compared by string equality. Also confirm the token is set as a wrangler secret rather than a plain variable, and that the request uses POST since other methods return 405.

Why is the first NotebookLM request slow after idle time?

The NotebookRunner container sets sleepAfter to five minutes, so it cold-starts after idle periods. This is expected behavior; send a warm ping periodically if latency matters for your use case.

Can multiple users share one NotebookLM container instance?

By default all traffic is pinned to one container via idFromName("default"), so concurrent users share one Google account and see each other's notebooks. Derive the Durable Object name per user to isolate sessions.