Find Relevant Snippets

This endpoint accepts a text query as a parameter and returns the top matches from documents. Each match includes details such as the name, summary, uri, type, and text snippet of the document.

Body Params
string

A text string that represents your query

integer

The maximum number of results to return

number

A value between 0 and 1 that determines the minimum similarity score that must be met between retrieved documents and the provided query.

documentIds
array of strings

An optional list of document IDs to search within. This is mutually exclusive with documentNames and takes precedence over it. If you're filtering a Google Sheet, provide the ID of the tab rather than the ID of the entire sheet.

documentIds
documentNames
array of strings

An optional list of document names to search within. This is mutually exclusive with documentIds. Names are case insensitive.

documentNames
Responses

400

Bad request

404

Documents with the provided IDs or names not found

500

Internal error

Language
Response
Choose an example:
application/json