Skip to main content
GET
Read or search a small Google Docs passage without loading the whole document into model context

Authorizations

x-api-key
string
header
required

Organization API key passed as the x-api-key header. The raw key is the header value; do not prefix it with Bearer.

Path Parameters

documentId
string
required
Required string length: 1 - 512
Pattern: ^[A-Za-z0-9_-]+$

Query Parameters

tabId
string
required

A tab ID returned by getGoogleDocumentOutline, including child tabs.

Required string length: 1 - 512
startIndex
integer
default:1

Google UTF-16 offset. For another page, use nextStartIndex with the same revisionId and query.

Required range: 1 <= x <= 10000000
maxCharacters
integer
default:6000

Maximum total UTF-16 text characters returned to the assistant.

Required range: 256 <= x <= 12000
query
string

Optional literal, case-insensitive search within body paragraphs and tables in this tab. Returns matching excerpts, not the whole document.

Required string length: 1 - 500
revisionId
string

Pass the revision from the previous page to stop if the saved document changed. Null on read-only accounts; those reads cannot guarantee stable pagination.

Required string length: 1 - 512

Response

Google-confirmed result.

ok
boolean
required
documentId
string
required
Required string length: 1 - 512
Pattern: ^[A-Za-z0-9_-]+$
title
string
required
revisionId
string | null
required
Required string length: 1 - 512
bodyTextOnly
boolean
required
suggestionsOmitted
boolean
required
tabId
string
required
Required string length: 1 - 512
passages
object[]
required
nextStartIndex
integer | null
required
Required range: -9007199254740991 <= x <= 9007199254740991