返回资讯中心
外部精选
软件工程
#开发者实时流

谷歌发布 Gemini Notebook API 公开预览版

来源标题:Gemini Notebook API

谷歌推出 Gemini Notebook API 与 MCP 服务器的早期访问公开预览版,开发者可通过 REST 接口以编程方式创建和管理笔记本及内容源,支持导入网页、YouTube 视频、纯文本和 Markdown。预览期间仅面向个人 Google 账号开放,暂不支持 Google Workspace 账号。谷歌表示正在完善路线图,并征集功能需求。

Hacker News 最新jonbaer2026/11/4 · 今天8 分钟阅读

以下正文同步自 Hacker News 最新,版权归原站所有,已转换为易读排版。

The Gemini Notebook API is a REST interface for programmatically creating and managing notebooks and sources in Gemini Notebook. Ingest web pages, YouTube videos, plain text, and Markdown into persistent notebooks.

Early Access Public Preview: The Gemini Notebook API and MCP server are in an early access Public Preview, and we're actively working on our roadmap. We'd love to hear what you want the API and MCP server to do. Please file feature requests in our Issue Tracker. We're excited to build this out, and there's more to come!

During the preview, the API is available for personal Google Accounts. Google Workspace accounts are not yet supported.

Just want to get started? Go to the Quickstart, copy the setup prompt, and give it to your coding agent.

import requests

API = "https://notebook.googleapis.com/v1" headers = { "Authorization": f"Bearer {ACCESS_TOKEN}", "x-goog-user-project": PROJECT_ID, "Content-Type": "application/json", }

1. Create a notebook

nb = requests.post(f"{API}/notebooks", headers=headers, json={ "display_name": "My Research" }).json()

2. Add a source

requests.post(f"{API}/{nb['name']}/sources", headers=headers, json={ "display_name": "Gemini API Guide", "web_content": {"url": "https://ai.google.dev/gemini-api/docs"} })

JavaScript

const API = "https://notebook.googleapis.com/v1"; const headers = { "Authorization": Bearer ${ACCESS_TOKEN}, "x-goog-user-project": PROJECT_ID, "Content-Type": "application/json" };

// 1. Create a notebook const nb = await (await fetch(${API}/notebooks, { method: "POST", headers, body: JSON.stringify({ display_name: "My Research" }) })).json();

// 2. Add a source await fetch(${API}/${nb.name}/sources, { method: "POST", headers, body: JSON.stringify({ display_name: "Gemini API Guide", web_content: { url: "https://ai.google.dev/gemini-api/docs" } }) });

REST

1. Create a notebook

NOTEBOOK=$(curl -s -X POST "https://notebook.googleapis.com/v1/notebooks"
-H "Authorization: Bearer $ACCESS_TOKEN"
-H "x-goog-user-project: $PROJECT_ID"
-H "Content-Type: application/json"
-d '{"display_name": "My Research"}')

NOTEBOOK_NAME=$(echo "$NOTEBOOK" | python3 -c "import sys, json; print(json.load(sys.stdin)['name'])")

2. Add a source

curl -s -X POST "https://notebook.googleapis.com/v1/${NOTEBOOK_NAME}/sources"
-H "Authorization: Bearer $ACCESS_TOKEN"
-H "x-goog-user-project: $PROJECT_ID"
-H "Content-Type: application/json"
-d '{ "display_name": "Gemini API Guide", "web_content": {"url": "https://ai.google.dev/gemini-api/docs"} }'

Guides and resources

REST API reference

inventory_2 Notebooks

Add web pages, YouTube videos, plain text, or Markdown to a notebook.

Connect AI coding agents and IDEs to the remote Gemini Notebook MCP server.

Configure OAuth 2.0 access tokens and scopes for API requests.

Review request rate limits, per-source word limits, and tier capacity.

See items on the Gemini Notebook API roadmap.

We'd love to hear what you want the Gemini Notebook API and MCP server to do. See our roadmap for upcoming capabilities, and file feature requests or bug reports in our Issue Tracker.

正文由 探How 从来源站点 RSS 同步,内容未经改写;遇到排版缺失或需要图片、视频时请以原文为准。

打开原文
去社区讨论 →