nblm-rs
Unofficial NotebookLM Enterprise API client
🦀 Rust CLI: Command-line tool for shell scripting and automation 🐍 Python SDK: Python bindings for integration in Python applications
[!IMPORTANT] This project targets the NotebookLM Enterprise API only. Google hasn’t published an API for the consumer edition or general Google Workspace tenants as of 2025-10-25.
Known API Issues
[!NOTE] The NotebookLM API is currently in alpha and has several known limitations. See API Limitations for details.
Motivation
In September 2025, Google released the NotebookLM Enterprise API, enabling programmatic access to NotebookLM features for the first time.
While you can interact with the API using simple curl commands, this approach has several limitations that this project addresses:
Challenges with Direct API Calls
-
Authentication complexity
- Problem: Managing OAuth tokens, handling token refresh, and ensuring secure credential storage
- Solution: Seamless
gcloudCLI integration with automatic token caching and refresh
-
Manual request construction
- Problem: Writing JSON payloads by hand, managing resource names, and handling API versioning
- Solution: Type-safe CLI flags and Python SDK with intelligent defaults and validation
-
Error handling
- Problem: Cryptic HTTP error codes without context or recovery suggestions
- Solution: Clear, actionable error messages with automatic retries for transient failures
-
Batch operations
- Problem: Writing loops to process multiple items, managing API call sequences
- Solution: Built-in batch commands with simplified syntax for multiple operations
-
Output parsing
- Problem: Manual JSON parsing and extracting specific fields from responses
- Solution: Structured output formats and JSON mode for easy integration with
jqand other tools
Project Goals
This project provides production-ready tools that make the NotebookLM API accessible and reliable:
- Rust CLI: Fast, cross-platform binary for shell scripting and automation
- Python SDK: Idiomatic Python bindings for application integration
- Type safety: Compile-time checks prevent common API usage errors
- Developer experience: Intuitive commands and clear documentation
Features (Verified as of 2025-10-25)
[!NOTE] The NotebookLM API is currently in alpha. Some features may not work as documented due to API limitations. See Known API Issues for details.
Notebooks
| Feature | CLI | Python | Status | Notes |
|---|---|---|---|---|
| Create notebook | ◯ | ◯ | Working | |
| List recent notebooks | ◯ | ◯ | Working | Pagination not implemented by API |
| Delete notebook(s) | ◯ | ◯ | Working | Sequential deletion (API limitation) |
Sources
| Feature | CLI | Python | Status | Notes |
|---|---|---|---|---|
| Add web URL | ◯ | ◯ | Working | |
| Add text content | ◯ | ◯ | Working | |
| Add video (YouTube) | ◯ | ◯ | Working | Uses youtubeUrl field |
| Add Google Drive | ◯ | ✗ | Not Working | API returns HTTP 500 |
| Upload file | ◯ | ◯ | Working | |
| Delete source(s) | ◯ | ◯ | Working | |
| Get source by ID | ◯ | ◯ | Working |
Audio Overview
| Feature | CLI | Python | Status | Notes |
|---|---|---|---|---|
| Create audio overview | ◯ | ◯ | Working | Config fields not supported |
| Delete audio overview | ◯ | ◯ | Working |
Sharing
| Feature | CLI | Python | Status | Notes |
|---|---|---|---|---|
| Share notebook | ◯ | ✗ | Untested | Requires additional users |
Installation
CLI (Rust)
# From crates.io
# Or build from source
Python SDK
Prerequisites: Google Cloud project with NotebookLM API enabled
Detailed Installation Guide: See Installation Documentation for platform-specific instructions and troubleshooting.
Quick Start
CLI
# 1. Authenticate
# 2. Set environment variables
# Get from GCP console
# 3. Create a notebook
# 4. Add a source
Python
# Initialize client
=
# Create a notebook
=
# Add sources
=
Platform Support
| Platform | CLI | Python SDK |
|---|---|---|
| Linux | ||
| macOS | ||
| Windows |
Documentation
Complete guides and API references:
- Getting Started - Installation, authentication, configuration
- CLI Reference - All commands, options, and examples
- Python SDK Reference - API reference and usage patterns
- API Limitations - Known issues and workarounds
Related Resources
- NotebookLM API Documentation - Official API documentation
- NotebookLM API Reference - API reference
Contributing
Contributions are welcome! See CONTRIBUTING.md for development setup and guidelines.
[!IMPORTANT] All pull requests must pass
cargo make all(Rust) andcargo make py-all(Python) before being merged.
License
MIT