Retrieve chat history
September 29, 2026
Table of contents
Read the questions and answers of a notebook’s chat, live from Google, oldest turn first. Without conversation you get the notebook’s latest conversation, which includes chats held in the Gemini Notebook web app. Up to 100 turns are returned.
Each turn has a role (user for a question, assistant for an answer) and its text. The text is what Google stores for the turn: answers come back as plain text without the Markdown and the [1] citation markers of the POST /chat answer, and can include the quoted passages of the sources they cite.
When the notebook has no conversation yet, conversation is null and turns is []. Save a conversation as a note with the conversation parameter of POST /notes, or clear it with DELETE /chat.
https://api.useapi.net/v1/gemini-notebook/chat?notebook=
notebook&conversation=conversation
Request Headers
Authorization: Bearer {API token}
API tokenis required, see Setup useapi.net for details.
Query Parameters
notebookis required, the notebook id returned by POST /notebooks or GET /notebooks. URL-encode it (it contains:and@). The id names its account, so noemailis needed.conversationis optional, a conversation id from POST /chat.
Default: the notebook’s latest conversation.
Responses
-
Answers shortened.
{ "notebook": "user:[email protected]:d02c903b-17f8-4241-a263-2be9e7359d55", "conversation": "fd20f12d-611f-4008-9e61-94e02af005a9", "turns": [ { "role": "user", "text": "What were the 1202 alarms?" }, { "role": "assistant", "text": "The 1202 program alarms during lunar descent indicated \"executive overflows,\" meaning the guidance computer was overloaded and had to postpone lower-priority tasks to maintain real-time processing..." }, { "role": "user", "text": "Who told the crew it was safe to continue?" }, { "role": "assistant", "text": "Inside Mission Control, computer engineer Jack Garman informed Guidance Officer Steve Bales that the computer alarms were non-fatal..." } ] } -
A missing notebook id, or a
conversationthat is not a conversation id.{ "error": "Parameter notebook is required", "code": 400 } -
Invalid API token.
{ "error": "useapi.net ⁝ Unauthorized", "code": 401 } -
The id was issued to a different API token.
{ "error": "user:[email protected]:d02c903b-17f8-4241-a263-2be9e7359d55 does not belong to this API token", "code": 403 } -
The notebook was deleted, or its account is no longer configured.
{ "error": "Not found on account [email protected] (Google hPTbtc grpc 5)", "code": 404 } -
596 Account Error
Google reported the account as signed out. While we re-check it, the answer is the first message below. Retry in about a minute. If it stays signed out, the account is paused, you receive an email, and the answer becomes the second message until you re-add it via Setup Gemini Notebook.
{ "error": "Google reported this account as signed out. We are re-checking it — please retry in about a minute. If it stays signed out, you will receive a re-add email.", "code": 596 }{ "error": "Account [email protected]: Google signed this account out. Re-add it at https://useapi.net/docs/start-here/setup-gemini-notebook", "code": 596 } -
Google is temporarily unavailable or is challenging our network. Retry in a few minutes. A
502means Google answered with an unexpected error.{ "error": "Google is temporarily unavailable (khqZz grpc 14), please retry", "code": 503 }
Model
{ // TypeScript, all fields are optional
notebook: string
conversation: string | null // null when the notebook has no conversation
turns: { // oldest first, up to 100
role: 'user' | 'assistant'
text: string
}[]
error: string // error responses only
code: number // error responses only, the HTTP status
}
Examples
-
curl -G "https://api.useapi.net/v1/gemini-notebook/chat" \ -H "Authorization: Bearer …" \ --data-urlencode "notebook=user:[email protected]:d02c903b-17f8-4241-a263-2be9e7359d55" -
const token = "API token"; const notebook = "user:[email protected]:d02c903b-17f8-4241-a263-2be9e7359d55"; const apiUrl = `https://api.useapi.net/v1/gemini-notebook/chat?notebook=${encodeURIComponent(notebook)}&conversation=fd20f12d-611f-4008-9e61-94e02af005a9`; const response = await fetch(apiUrl, { headers: { "Authorization": `Bearer ${token}`, }, }); const result = await response.json(); console.log("response", {response, result}); -
import requests token = "API token" notebook = "user:[email protected]:d02c903b-17f8-4241-a263-2be9e7359d55" apiUrl = "https://api.useapi.net/v1/gemini-notebook/chat" headers = { "Authorization" : f"Bearer {token}" } response = requests.get(apiUrl, headers=headers, params={"notebook": notebook}) print(response, response.json())