notebooklm
An async Rust client for a local Gemini Notebook (NotebookLM) server: citation-backed answers, passage search that spends no generation allowance, the indexed text of any source, and the UTCP manual describing all 56 operations.
[]
= "4.6"
= { = "1", = ["macros", "rt-multi-thread"] }
use ;
async
It needs a server, and that is the point
Google ships no public API for the consumer product. Everything any tool does rides on the endpoints the web app itself calls, and those need a logged-in Google session. Getting one means driving a real browser through a real login; keeping one means three things that are easy to underestimate:
- the session is bound to the machine it was created on — copied cookies are refused even while their local expiry still looks valid;
- Google expires sessions server-side while those cookies look fine, so the only reliable check is navigating and seeing where you land;
- an unpatched automated browser gets flagged, and the patches have to be maintained against a moving target.
This crate deliberately does not own a browser. It talks to a process that does:
The server listens on loopback and needs no token there. As soon as you expose
it, it refuses to start without one — pass it with
[ClientBuilder::api_key].
What it covers
| Call | What it does |
|---|---|
health |
whether a Google session exists, and how many chats are open |
library |
the notebooks registered with this server |
ask |
a question, with the quotations behind the answer |
search_passages |
retrieval only: the indexed passages, no allowance spent |
sources / source |
a notebook's sources, and the exact indexed text |
manual |
the UTCP manual: all 56 operations, named |
The server exposes 56 operations in all. manual returns the
UTCP document describing every one of them, which a
UTCP client can call natively without any of the types in this crate.
Features
rustls(default) /native-tls— which TLS stack to use.blocking— a synchronous façade, for programs with no async runtime.
Links
MIT.