This pipeline connects Claude Code to Google's NotebookLM via an unofficial Python API (notebooklm-py). Give it a topic → it scrapes YouTube → pushes videos to NotebookLM → generates deep analysis, infographics, podcasts, and study guides automatically.
Original system by Steve Arneson (stevearneson.com/notebook) · Python library by Teng Lin (github.com/teng-lin/notebooklm-py) · Compiled by Krish Chhatrala | K for Kreative | March 2026
Key Capabilities
- YouTube Research: Automated scraping of metadata (titles, views, author, duration, URLs) on any topic
- Cross-Source Analysis: NotebookLM processes all sources at once for deep cross-referencing and pattern detection
- Podcast Briefings: Auto-generated audio overviews and summaries you can listen to on the go
- Visual Deliverables: Infographics, slide decks, flashcards, and study guides on demand
Use Cases for Agency Owners
- Competitive intelligence on client industries
- Market research for proposals and pitches
- Content trend analysis for social media strategies
- Client onboarding research
- Staying ahead of industry shifts
Prerequisites — You Need 2 Things
Claude Code (Pro or Max)
Download at claude.ai/download. Free plan won't work — you need Pro ($20/mo) or Max. Claude Code handles all installs including Python.
Google Account + NotebookLM
NotebookLM is free at notebooklm.google.com. Sign in once to confirm your account works before running setup.
Step 1 — Paste This Into Claude Code
This single prompt builds the YouTube research skill, installs NotebookLM-PY, and wires everything together. No other files needed. Copy the entire block and paste it into Claude Code.
I want to set up an automated research pipeline connecting Claude Code to
NotebookLM. Please perform the following steps and I will 'accept' all
your proposed changes:
1. Build a YouTube Research Skill: Create a custom Python-based skill
using the yt-dlp dependency. This skill should be able to scrape
YouTube metadata, including video titles, views, author, duration,
and URLs based on a search query.
2. Integrate NotebookLM-PY: I want to use the unofficial Python API for
NotebookLM created by Teng Lin. Repository:
https://github.com/teng-lin/notebooklm-py
Install necessary packages and set up a skill to:
- Create new notebooks
- Upload YouTube URLs as sources
- Request analysis and deliverables like infographics, slide decks,
and flashcards
3. Guide me through Authentication: Once the tools are installed, remind
me to open a separate terminal window to run the notebooklm login
command so I can authenticate with my Google account.
4. Confirm Readiness: Once everything is installed and the skills are
recognized, let me know you are ready for a test run.
The goal is that once finished, I should be able to give a single command
like: "Use the yt-research skill to find the 25 latest trending videos on
[YOUR TOPIC]. Once we have those videos, send them over to NotebookLM
using the notebooklm skill. Give me its analysis on top findings, then
have NotebookLM create an infographic in a handwritten/chalkboard style."
Important: If I give the research command without specifying a topic,
ask me what topic I want to research before proceeding.
The 4-Step Workflow (After Pasting)
- Accept Everything: Claude Code writes Python scripts and creates skills. When it asks permission to run commands or install packages, hit Y or Enter. If Python isn't installed, Claude Code handles that too.
- Authenticate (Separate Terminal): When Claude tells you to authenticate, open a COMPLETELY SEPARATE terminal window — not inside Claude Code. Run
notebooklm login→ browser opens → log into Google → done. See the Login Fix section below for the full tested process. - Claude Confirms Ready: Claude Code tells you skills are installed and recognized. It will ask for your research topic, or you can jump straight to the research command.
- Run Your First Research: Give Claude Code the research command. It scrapes YouTube, pushes videos to NotebookLM, analyzes findings, and generates your deliverable.
Step 2 — Run Your First Research Command
Once setup is confirmed, give Claude Code this command. Replace [YOUR TOPIC] with your research subject.
Use the yt-research skill to find the 25 latest trending videos on
[YOUR TOPIC]. Once we have those videos, send them over to NotebookLM
using the notebooklm skill. Give me its analysis on the top findings,
then have NotebookLM create an infographic in a handwritten / chalkboard
style depicting that analysis.
Pro Tip: Replace [YOUR TOPIC] with anything: "AI avatar content for health coaches", "competitor analysis for Shopify stores", "latest trends in social media marketing India". If you forget the topic, Claude will ask.
NotebookLM Login — The Working Method
The original guide's login instructions are incomplete. The basic pip install doesn't include browser support needed for login. Here's the full tested process that actually works:
# Step 1: Install with browser support (critical — do NOT skip [browser])
pip install "notebooklm-py[browser]"
# Step 2: Install Chromium for Playwright
playwright install chromium
# If this fails with TypeError, run first:
# playwright install-deps chromium
# Step 3: Open a FRESH SEPARATE terminal (NOT inside Claude Code)
# Mac: Cmd+Space → type Terminal → Enter
# Windows: Win+R → type cmd → Enter
# Step 4: Login
notebooklm login
# Browser opens → log in with Google → wait for SUCCESS message
# For Edge SSO orgs: notebooklm login --browser msedge
# Step 5: Verify
notebooklm auth check --test
notebooklm list # Should show notebooks or empty list
# If "Unauthorized" → re-run login
# Session saved at ~/.notebooklm/storage_state.json
# Sessions expire every 1–2 weeks — re-run login when needed
Key Insight: Playwright is ONLY needed for thenotebooklm logincommand. Every other operation uses standard HTTP. You can copy a valid~/.notebooklm/storage_state.jsonto servers without installing Playwright there.
Troubleshooting
| Problem | Solution |
|---|---|
| Browser doesn't open on login | Run in a fresh terminal (not Claude Code). Ensure pip install "notebooklm-py[browser]" and playwright install chromium completed. |
| Install fails with errors | Paste exact error into Claude Code. It diagnoses and fixes automatically. Keep accepting changes. |
| Skills not recognized | Ask Claude Code: "Can you verify the yt-research and notebooklm skills are installed?" Also run: notebooklm skill status |
| Rate limit / infographic fails | Wait 5 min and retry. Use: notebooklm generate audio --retry 3. Add 2s delays between URL additions. |
| Unauthorized / redirect errors | Cookies expired (1–2 weeks). Re-run: notebooklm login then notebooklm auth check --test |
| Google blocking automation | Debug: NOTEBOOKLM_DEBUG_RPC=1 notebooklm list. If RPC IDs changed, report on GitHub. |
| Audio/video silently fails | Use: notebooklm generate audio --wait. Or poll: notebooklm artifact poll <task_id>. Retry usually works. |
NotebookLM CLI Cheat Sheet
# ── Authentication ──────────────────────────────────────────
notebooklm login # Browser login
notebooklm login --browser msedge # Edge for SSO orgs
notebooklm auth check --test # Verify auth
# ── Notebook Management ─────────────────────────────────────
notebooklm list # List all notebooks
notebooklm create "My Research" # Create notebook
notebooklm use <notebook_id> # Select active
notebooklm metadata --json # Export metadata
# ── Sources ─────────────────────────────────────────────────
notebooklm source add "https://..." # Add URL
notebooklm source add "./paper.pdf" # Add local file
notebooklm source add-research "AI" # Web research + import
# ── Chat & Analysis ─────────────────────────────────────────
notebooklm ask "Key themes?" # Chat with sources
notebooklm ask "Summarize" --sources s1 # Query specific sources
# ── Generate Deliverables ───────────────────────────────────
notebooklm generate audio # Podcast overview
notebooklm generate audio --retry 3 # Auto-retry
notebooklm generate audio --wait # Wait for completion
notebooklm generate video --retry 5 # Video overview
notebooklm artifact poll <task_id> # Poll status
# ── Agent Skills ────────────────────────────────────────────
notebooklm agent show claude # Claude skill template
notebooklm agent show codex # Codex instructions
notebooklm skill status # Check installation
# ── Debug ───────────────────────────────────────────────────
NOTEBOOKLM_LOG_LEVEL=INFO notebooklm list # Info logging
NOTEBOOKLM_LOG_LEVEL=DEBUG notebooklm list # Full debug
NOTEBOOKLM_DEBUG_RPC=1 notebooklm list # Check RPC IDs
Important Disclaimer: NotebookLM-PY uses undocumented Google APIs that can change without notice. This is a community project, not affiliated with Google. Best for prototypes, research, and personal projects. APIs may break if Google changes internal endpoints.
Compiled by Krish Chhatrala | K for Kreative | March 2026