notebooklm-py
teng-lin · teng-lin/notebooklm-py
API Python không chính thức và kỹ năng tác nhân này cung cấp quyền truy cập lập trình vào các tính năng của Google Gemini Notebook cho các tác nhân AI như Claude Code.
API Python không chính thức và kỹ năng tác nhân cho Google Gemini Notebook. Quyền truy cập lập trình đầy đủ vào các tính năng của NotebookLM — bao gồm cả những khả năng mà giao diện người dùng web không hiển thị — thông qua Python, CLI và các tác nhân AI như Claude Code, Codex và OpenClaw.
Xem trước
Bạn có thể làm gì với nó
- Tự động nhập hàng loạt các nguồn nghiên cứu (URL, PDF) vào Gemini Notebook cho một tác nhân.
- Yêu cầu một tác nhân AI truy vấn Gemini Notebook để lấy thông tin chi tiết và tóm tắt từ các tài liệu đã tải.
- Tự động hóa việc tạo các pipeline nghiên cứu nơi tác nhân trích xuất và tổ chức thông tin từ nhiều nguồn khác nhau.
Kiểm tra an toàn
Dùng được, nhưng nên đọc ghi chú trước.
- ●Trình cài đặt tải script từ xa và chạy thẳng bằng shell.
README.md
Quét tự động các file trong repo. Luôn xem lại code trước khi chạy.
Trích từ README
notebooklm-py
A Comprehensive Google Gemini Notebook Skill & Unofficial Python API. Full programmatic access to NotebookLM's features—including capabilities the web UI doesn't expose—via Python, CLI, and AI agents like Claude Code, Codex, and OpenClaw.
Note (July 2026): Google rebranded NotebookLM to Gemini Notebook. It remains the same standalone product (now also reachable inside the Gemini app), existing links redirect automatically, and this library drives the same underlying service and works unchanged. The package keeps the
notebooklm-pyname.
Source & Development: https://github.com/teng-lin/notebooklm-py
⚠️ Unofficial Library - Use at Your Own Risk
This library uses undocumented Google APIs that can change without notice.
- Not affiliated with Google - This is a community project
- APIs may break - Google can change internal endpoints anytime
- Rate limits apply - Heavy usage may be throttled
Best for prototypes, research, and personal projects. See Troubleshooting for debugging tips.
What You Can Build
🤖 AI Agent Tools - Integrate NotebookLM into Claude Code, Codex, and other LLM agents. Ships with a root NotebookLM skill for GitHub and npx skills add discovery, local notebooklm skill install support for Claude Code and .agents skill directories, and repo-level Codex guidance in AGENTS.md.
📚 Research Automation - Bulk-import sources (URLs, PDFs, YouTube, Google Drive), run web/Drive research queries with auto-import, and extract insights programmatically. Build repeatable research pipelines.
🎙️ Content Generation - Generate Audio Overviews (podcasts), videos, slide decks, quizzes, flashcards, infographics, data tables, mind maps, and study guides. Full control over formats, styles, and output.
📥 Downloads & Export - Download all generated artifacts locally (MP3, MP4, PDF, PNG, CSV, JSON, Markdown). Export to Google Docs/Sheets. Features the web UI doesn't offer: batch downloads, quiz/flashcard export in multiple formats, mind map JSON extraction.
Use Cases & Recipes
NotebookLM is a grounded engine: Gemini does the heavy reading and answers from your sources with citations. The winning pattern is to let it do the expensive analysis while your agent (Claude Code, Codex, …) orchestrates and handles the final mile — using NotebookLM as a zero-token synthesis + memory layer an agent drives in a loop, and pulling structured artifacts out in bulk and in richer, scriptable formats. Recipes people build on top of this library, grouped by what they use NotebookLM as:
Spend fewer tokens — let NotebookLM do the expensive thinking:
- 🪙 Zero-token research offload — Throw 30 documents into a notebook, let Gemini do the heavy analysis, and have your agent spend tokens only on the final polish. The agent just orchestrates (
create→source add→ask); the reasoning happens server-side. In the wild: a four-workflow guide to stop Claude Code burning tokens on NotebookLM. - 🧠 Knowledge distillation → a permanent skill — Run Deep Research (
source add-research "your topic" --mode deep) or load a doc corpus, let NotebookLM's Gemini condense it, and bake the result into aSKILL.mdyour agent loads at startup — build once, reuse with zero runtime tokens or network calls, git-versioned and immune to UI drift. A packaged domain expert without hand-curating sources. (Dumping raw docs into a skill flattens the hierarchy; NotebookLM condensing first is what makes it work.) - ✅ Self-validating skills — Have NotebookLM generate the eval set — a quiz straight from your sources — to grade an agent skill against ground truth instead of test questions you'd bias yourself. Build the skill, run it against the NotebookLM-authored evals, iterate to a pass. In the wild: a skill that scored 4/10 on the first pass and 10/10 after one iteration, graded by a NotebookLM-generated quiz.
Give your agent memory — persistent, grounded recall:
- 💾 Persistent cross-session memory — Keep a "Master Brain" notebook; a wrap-up step appends each session's decisions and fixes as notes (
note create/ask --save-as-note), and a line in yourCLAUDE.mdqueries it (ask) at the start of the next session. Storage and recall live on Google's infrastructure. - 🧩 Grounded memory for coding agents — Expose a notebook of your internal docs/RFCs/architecture over the MCP server (or plain
ask) so an agent answers from your code with citations rather than plausible-sounding guesses — a zero-infra alternative to standing up your own vector DB and embedding pipeline. In the wild: turning a notebook into the source-grounded "project brain" a coding agent consults before it writes code. - 🪞 Query your own notes / journal — Load years of daily notes, meeting logs, or a journal and
askfor cited answers across your own history — surfacing long-term patterns a keyword search can't (e.g. a weekly summary synthesized from 282 daily notes, every claim linked back to the entry it came from). In the wild: chatting with a year of daily notes as a cited knowledge base.
Turn your sources into answers & artifacts — cited responses, generated media, and exports:
- 📞 Grounded knowledge base / troubleshooting oracle (RAG) — Load product docs, FAQs, RFCs, and past tickets, then
ask --jsonfor source-grounded, cited answers for support, on-call, or internal Q&A.