{"id":40962774,"url":"https://github.com/teng-lin/notebooklm-py","last_synced_at":"2026-03-03T21:03:17.835Z","repository":{"id":331965106,"uuid":"1129786550","full_name":"teng-lin/notebooklm-py","owner":"teng-lin","description":"Unofficial Python API for Google NotebookLM","archived":false,"fork":false,"pushed_at":"2026-01-27T13:56:24.000Z","size":24759,"stargazers_count":1615,"open_issues_count":1,"forks_count":154,"subscribers_count":17,"default_branch":"main","last_synced_at":"2026-01-28T00:53:30.811Z","etag":null,"topics":["api","claude","notebookln","python","sdk","skills"],"latest_commit_sha":null,"homepage":"https://github.com/teng-lin/notebooklm-py","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/teng-lin.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-01-07T15:27:19.000Z","updated_at":"2026-01-28T00:33:32.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/teng-lin/notebooklm-py","commit_stats":null,"previous_names":["teng-lin/notebooklm-py"],"tags_count":8,"template":false,"template_full_name":null,"purl":"pkg:github/teng-lin/notebooklm-py","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/teng-lin%2Fnotebooklm-py","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/teng-lin%2Fnotebooklm-py/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/teng-lin%2Fnotebooklm-py/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/teng-lin%2Fnotebooklm-py/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/teng-lin","download_url":"https://codeload.github.com/teng-lin/notebooklm-py/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/teng-lin%2Fnotebooklm-py/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28939485,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-31T10:18:23.202Z","status":"ssl_error","status_checked_at":"2026-01-31T10:18:22.693Z","response_time":128,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["api","claude","notebookln","python","sdk","skills"],"created_at":"2026-01-22T06:00:39.930Z","updated_at":"2026-03-03T21:03:17.828Z","avatar_url":"https://github.com/teng-lin.png","language":"Python","funding_links":[],"categories":["Python","CLIs","AI 相关","精选技能","6 つのトラック","A01_文本生成_文本对话","Code \u0026 Developer Tools","Open-Source LLM \u0026 Agent Projects","Repos"],"sub_categories":["Usage","Skills","产品使用","Tier 1：事業診断コア","大语言对话模型及数据"],"readme":"# notebooklm-py\n\u003cp align=\"left\"\u003e\n  \u003cimg src=\"https://raw.githubusercontent.com/teng-lin/notebooklm-py/main/notebooklm-py.png\" alt=\"notebooklm-py logo\" width=\"128\"\u003e\n\u003c/p\u003e\n\n**Comprehensive Python API for Google NotebookLM.** Full programmatic access to NotebookLM's features—including capabilities the web UI doesn't expose—from Python or the command line.\n\n[![PyPI version](https://img.shields.io/pypi/v/notebooklm-py.svg)](https://pypi.org/project/notebooklm-py/)\n[![Python Version](https://img.shields.io/badge/python-3.10%20%7C%203.11%20%7C%203.12%20%7C%203.13%20%7C%203.14-blue)](https://pypi.org/project/notebooklm-py/)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n[![Tests](https://github.com/teng-lin/notebooklm-py/actions/workflows/test.yml/badge.svg)](https://github.com/teng-lin/notebooklm-py/actions/workflows/test.yml)\n\n**Source \u0026 Development**: \u003chttps://github.com/teng-lin/notebooklm-py\u003e\n\n\u003e **⚠️ Unofficial Library - Use at Your Own Risk**\n\u003e\n\u003e This library uses **undocumented Google APIs** that can change without notice.\n\u003e\n\u003e - **Not affiliated with Google** - This is a community project\n\u003e - **APIs may break** - Google can change internal endpoints anytime\n\u003e - **Rate limits apply** - Heavy usage may be throttled\n\u003e\n\u003e Best for prototypes, research, and personal projects. See [Troubleshooting](docs/troubleshooting.md) for debugging tips.\n\n## What You Can Build\n\n🤖 **AI Agent Tools** - Integrate NotebookLM into Claude Code or other LLM agents. Ships with [Claude Code skills](#agent-skills-claude-code) for natural language automation (`notebooklm skill install`), or build your own integrations with the async Python API.\n\n📚 **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.\n\n🎙️ **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.\n\n📥 **Downloads \u0026 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.\n\n## Three Ways to Use\n\n| Method | Best For |\n|--------|----------|\n| **Python API** | Application integration, async workflows, custom pipelines |\n| **CLI** | Shell scripts, quick tasks, CI/CD automation |\n| **Agent Skills** | Claude Code, LLM agents, natural language automation |\n\n## Features\n\n### Complete NotebookLM Coverage\n\n| Category | Capabilities |\n|----------|--------------|\n| **Notebooks** | Create, list, rename, delete |\n| **Sources** | URLs, YouTube, files (PDF, text, Markdown, Word, audio, video, images), Google Drive, pasted text; refresh, get guide/fulltext |\n| **Chat** | Questions, conversation history, custom personas |\n| **Research** | Web and Drive research agents (fast/deep modes) with auto-import |\n| **Sharing** | Public/private links, user permissions (viewer/editor), view level control |\n\n### Content Generation (All NotebookLM Studio Types)\n\n| Type | Options | Download Format |\n|------|---------|-----------------|\n| **Audio Overview** | 4 formats (deep-dive, brief, critique, debate), 3 lengths, 50+ languages | MP3/MP4 |\n| **Video Overview** | 2 formats, 9 visual styles (classic, whiteboard, kawaii, anime, etc.) | MP4 |\n| **Slide Deck** | Detailed or presenter format, adjustable length; individual slide revision | PDF, PPTX |\n| **Infographic** | 3 orientations, 3 detail levels | PNG |\n| **Quiz** | Configurable quantity and difficulty | JSON, Markdown, HTML |\n| **Flashcards** | Configurable quantity and difficulty | JSON, Markdown, HTML |\n| **Report** | Briefing doc, study guide, blog post, or custom prompt | Markdown |\n| **Data Table** | Custom structure via natural language | CSV |\n| **Mind Map** | Interactive hierarchical visualization | JSON |\n\n### Beyond the Web UI\n\nThese features are available via API/CLI but not exposed in NotebookLM's web interface:\n\n- **Batch downloads** - Download all artifacts of a type at once\n- **Quiz/Flashcard export** - Get structured JSON, Markdown, or HTML (web UI only shows interactive view)\n- **Mind map data extraction** - Export hierarchical JSON for visualization tools\n- **Data table CSV export** - Download structured tables as spreadsheets\n- **Slide deck as PPTX** - Download editable PowerPoint files (web UI only offers PDF)\n- **Slide revision** - Modify individual slides with natural-language prompts\n- **Report template customization** - Append extra instructions to built-in format templates\n- **Save chat to notes** - Save Q\u0026A answers or conversation history as notebook notes\n- **Source fulltext access** - Retrieve the indexed text content of any source\n- **Programmatic sharing** - Manage permissions without the UI\n\n## Installation\n\n```bash\n# Basic installation\npip install notebooklm-py\n\n# With browser login support (required for first-time setup)\npip install \"notebooklm-py[browser]\"\nplaywright install chromium\n```\n\n### Development Installation\n\nFor contributors or testing unreleased features:\n\n```bash\npip install git+https://github.com/teng-lin/notebooklm-py@main\n```\n\n⚠️ The main branch may contain unstable changes. Use PyPI releases for production.\n\n## Quick Start\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://asciinema.org/a/767284\" target=\"_blank\"\u003e\u003cimg src=\"https://asciinema.org/a/767284.svg\" width=\"600\" /\u003e\u003c/a\u003e\n  \u003cbr\u003e\n  \u003cem\u003e16-minute session compressed to 30 seconds\u003c/em\u003e\n\u003c/p\u003e\n\n### CLI\n\n```bash\n# 1. Authenticate (opens browser)\nnotebooklm login\n\n# 2. Create a notebook and add sources\nnotebooklm create \"My Research\"\nnotebooklm use \u003cnotebook_id\u003e\nnotebooklm source add \"https://en.wikipedia.org/wiki/Artificial_intelligence\"\nnotebooklm source add \"./paper.pdf\"\n\n# 3. Chat with your sources\nnotebooklm ask \"What are the key themes?\"\n\n# 4. Generate content\nnotebooklm generate audio \"make it engaging\" --wait\nnotebooklm generate video --style whiteboard --wait\nnotebooklm generate quiz --difficulty hard\nnotebooklm generate flashcards --quantity more\nnotebooklm generate slide-deck\nnotebooklm generate infographic --orientation portrait\nnotebooklm generate mind-map\nnotebooklm generate data-table \"compare key concepts\"\n\n# 5. Download artifacts\nnotebooklm download audio ./podcast.mp3\nnotebooklm download video ./overview.mp4\nnotebooklm download quiz --format markdown ./quiz.md\nnotebooklm download flashcards --format json ./cards.json\nnotebooklm download slide-deck ./slides.pdf\nnotebooklm download mind-map ./mindmap.json\nnotebooklm download data-table ./data.csv\n```\n\n### Python API\n\n```python\nimport asyncio\nfrom notebooklm import NotebookLMClient\n\nasync def main():\n    async with await NotebookLMClient.from_storage() as client:\n        # Create notebook and add sources\n        nb = await client.notebooks.create(\"Research\")\n        await client.sources.add_url(nb.id, \"https://example.com\", wait=True)\n\n        # Chat with your sources\n        result = await client.chat.ask(nb.id, \"Summarize this\")\n        print(result.answer)\n\n        # Generate content (podcast, video, quiz, etc.)\n        status = await client.artifacts.generate_audio(nb.id, instructions=\"make it fun\")\n        await client.artifacts.wait_for_completion(nb.id, status.task_id)\n        await client.artifacts.download_audio(nb.id, \"podcast.mp3\")\n\n        # Generate quiz and download as JSON\n        status = await client.artifacts.generate_quiz(nb.id)\n        await client.artifacts.wait_for_completion(nb.id, status.task_id)\n        await client.artifacts.download_quiz(nb.id, \"quiz.json\", output_format=\"json\")\n\n        # Generate mind map and export\n        result = await client.artifacts.generate_mind_map(nb.id)\n        await client.artifacts.download_mind_map(nb.id, \"mindmap.json\")\n\nasyncio.run(main())\n```\n\n### Agent Skills (Claude Code)\n\n```bash\n# Install via CLI or ask Claude Code to do it\nnotebooklm skill install\n\n# Then use natural language:\n# \"Create a podcast about quantum computing\"\n# \"Download the quiz as markdown\"\n# \"/notebooklm generate video\"\n```\n\n## Documentation\n\n- **[CLI Reference](docs/cli-reference.md)** - Complete command documentation\n- **[Python API](docs/python-api.md)** - Full API reference\n- **[Configuration](docs/configuration.md)** - Storage and settings\n- **[Troubleshooting](docs/troubleshooting.md)** - Common issues and solutions\n- **[API Stability](docs/stability.md)** - Versioning policy and stability guarantees\n\n### For Contributors\n\n- **[Development Guide](docs/development.md)** - Architecture, testing, and releasing\n- **[RPC Development](docs/rpc-development.md)** - Protocol capture and debugging\n- **[RPC Reference](docs/rpc-reference.md)** - Payload structures\n- **[Changelog](CHANGELOG.md)** - Version history and release notes\n- **[Security](SECURITY.md)** - Security policy and credential handling\n\n## Platform Support\n\n| Platform | Status | Notes |\n|----------|--------|-------|\n| **macOS** | ✅ Tested | Primary development platform |\n| **Linux** | ✅ Tested | Fully supported |\n| **Windows** | ✅ Tested | Tested in CI |\n\n## License\n\nMIT License. See [LICENSE](LICENSE) for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fteng-lin%2Fnotebooklm-py","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fteng-lin%2Fnotebooklm-py","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fteng-lin%2Fnotebooklm-py/lists"}