Gemini Notebook API | Google for Developers

Open original

This is Google's reference page for the Gemini Notebook API, a REST interface for creating notebooks and ingesting web pages, YouTube videos, plain text, and Markdown into them. It includes working Python, JavaScript, and curl examples for creating a notebook and adding a source to it.

  • Notebooks and sources are created with plain REST calls to notebook.googleapis.com, authenticated with an OAuth 2.0 bearer token and an x-goog-user-project header.
  • The basic flow is two requests: create a notebook with a display name, then POST a web_content URL to its sources endpoint.
  • Usage is governed by request rate limits, per-source word limits, and tier capacity, which the docs cover separately.

The Gemini Notebook API is a REST interface for creating and managing notebooks in Gemini Notebook from code. You make a POST to notebooks.googleapis.com/v1/notebooks with a display name to create a notebook, then POST to that notebook's sources endpoint to attach material. The page shows the same two-step flow in Python, JavaScript, and curl, and each call needs an OAuth 2.0 bearer token plus an x-goog-user-project header tied to a Google Cloud project. The sources you can ingest are web pages, YouTube videos, plain text, and Markdown, and each one lands in a persistent notebook rather than a one-off query. The example just points at the Gemini API docs, but the same pattern works for any public URL. The practical value is in automating research setup. Instead of clicking through the interface to load a dozen reference pages before asking questions, a script can build the notebook, load every source, and hand it off. The page also points to a Model Context Protocol server, which lets AI coding agents and IDEs connect to Gemini Notebook directly. That matters if you want an agent to populate a notebook as part of a larger task. For anyone building that kind of workflow, the setup prompt in the Quickstart is a shortcut to getting a coding agent running with the right auth. Before you build on it, check the limits. The article links to a page on rate limits, per-source word limits, and tier capacity, and those numbers will decide whether a large ingestion job fits. It also links an authentication page covering OAuth scopes, and a roadmap that the team says is still changing. The rest of the page is reference material: notebook and source endpoints, and a feedback channel through the Issue Tracker for feature requests and bugs.

Ask about this article