Find documents similar to a document.
The documents whose text (match_type textual, with the matching snippet) or pages (match_type visual, with the page) look like the seed's, as the Explorer's Find similar shows them, best score first (score 0 to 1). text_limit (1 to 100, default 20) and visual_limit (1 to 50, default 10) cap each kind before the list is paged. Every match is read through the caller's document access. Needs Find Similar Documents, View Document Metadata, View Document Text and View Document Content. Needs the organisation's document embeddings: without them the list is empty. match_type narrows the list to one kind.
| |
|---|
| Scope | documents:read |
| Asynchronous | No |
| MCP tool | list_document_similar_documents |
| Portal permissions | find_similar_documents, view_document_metadata, view_document_text, view_document_content |
| Paging | snapshot |
| Default order | -score, document_id |
| Sort fields | score, document_id |
| Filters | match_type |
Parameters
| Name | In | Type | Required | Description |
|---|
document_id | path | string | Required | |
text_limit | query | integer or null | Optional | How many textual matches to read, 1 to 100; 20 when left out. |
visual_limit | query | integer or null | Optional | How many visual matches to read, 1 to 50; 10 when left out. |
limit | query | integer | Optional | Default: 50; ≥ 1 |
cursor | query | string | Optional | |
sort | query | string | Optional | Comma-separated sort fields, - for descending. |
match_type | query | array of string | Optional | |
Docwize-Version | header | string (date) | Optional | |
If-None-Match | header | string | Optional | Answers 304 when the representation is unchanged (resources that publish an ETag). |
Responses
200 body
| Field | Type | Required | Description |
|---|
items | array of SimilarDocument | Required | |
next_cursor | string or null | Required | |
warnings | array of object | Required | |
Errors
The problem codes this operation can answer with. Each code links to its page.
Schemas
SimilarDocument
| Field | Type | Required | Description |
|---|
description | string or null | Required | |
document_id | string | Required | |
image_type | string or null | Required | The file type the Portal stored for the document. |
match_type | string | Required | textual or visual. |
page | integer or null | Required | For a visual match: the page that matched. |
reference_number | string or null | Required | |
score | number | Required | 0 to 1, higher is more alike. |
snippet | string or null | Required | For a textual match: the passage that matched. |