Skip to main content
POST
Find Similar

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

tenant
string | null
required

The domain of the customer

Example:

"example.com"

Body

application/json
document_id
string | null

The document ID to find similar documents for. Mutually exclusive with text.

attachment_filters
AttachmentFilter · object[] | null

List of attachment filters within the document to consider for finding similar documents. If provided then only the attachments matching one of the rules are used otherwise all attachments will be used. It can be used only if the document_id field is provided.

text
string | null

Finds similar documents to this text. Mutually exclusive with document_id.

libraries
LibraryFilter · object[] | null

List of libraries to limit the search for similar documents. If None, then all libraries will be searched.

similarity_threshold
number
default:0.7

The similarity threshold (between 0 and 1) above which documents are considered similar. Higher values mean more similar documents. Ignored when 'absolute_duplicates_only' is true.

Required range: 0 <= x <= 1
absolute_duplicates_only
boolean
default:false

If true, return only absolute duplicates (documents sharing an attachment MD5 checksum with the source document); 'similarity_threshold' is ignored. If false, absolute duplicates are returned first and semantically-similar matches are used to fill any remaining result slots up to 'max_results'. Can only be used together with 'document_id'.

max_results
integer
default:10

The maximum number of similar documents to return.

include
DocumentSimilarityInclude · object

Which fields to include in the results

Response

Successful Response

similar_documents
SimilarDocument · object[]
required

List of similar documents found.