Duplicate Detection — MDDB API

Find duplicate and similar documents #

POST /v1/find-duplicates

Scans a collection for duplicate and similar documents using content hashes and embedding vectors. Exact mode groups documents with identical content hashes. Similar mode compares embedding vectors pairwise and clusters documents above the similarity threshold using transitive clustering. Minhash mode groups documents whose text overlaps (word shingles) and needs no embeddings; its groups come back in minhashGroups with the pair count in minhashPairs.

Authorization: BearerAuth or APIKeyAuth or none

Request body #

Required.

Content type application/json: FindDuplicatesRequest

{
  "collection": "string",
  "distanceMetric": "cosine",
  "includeContent": false,
  "maxDocs": 5000,
  "mode": "both",
  "threshold": 0.9
}

Responses #

Status Description Body
200 Duplicate detection results FindDuplicatesResponse (application/json)
400 Invalid request ErrorResponse (application/json)
503 (v2.19.8, GO-053) Every search slot (MDDB_SEARCH_MAX_CONCURRENT) stayed taken for MDDB_SEARCH_QUEUE_TIMEOUT_MS. The query did not run; retry after Retry-After seconds. The same limit covers gRPC (RESOURCE_EXHAUSTED), GraphQL (the body below in the error's extensions) and MCP (a tool error with the body below as structuredContent). SearchBusy (application/json)