idstringrequired
The unique identifier ([primary key](https://www.meilisearch.com/docs/learn/getting_started/primary_key) value) of the target document.
Meilisearch will find and return documents that are semantically
similar to this document based on their vector embeddings. This is a
required parameter.
embedderstringrequired
The name of the embedder to use for finding similar documents. This
must match one of the embedders configured in your index settings. The
embedder determines how document similarity is calculated based on
vector embeddings.
offsetinteger
Number of similar documents to skip in the response. Use together with
`limit` for pagination through large result sets. For example, to get
similar documents 21-40, set `offset=20` and `limit=20`. Defaults to
`0`.
Default 0
limitinteger
Maximum number of similar documents to return in a single response. Use
together with `offset` for pagination. Higher values return more
results but may increase response time. Defaults to `20`.
Default 20
attributes_to_retrievearray<string>
Comma-separated list of document attributes to include in the response.
Use `*` to retrieve all attributes. By default, all attributes listed
in the `displayedAttributes` setting are returned. Example:
`title,description,price`.
retrieve_vectorsboolean
When `true`, includes the vector embeddings for each returned document.
Useful for debugging or when you need to inspect the vector data. Note
that this can significantly increase response size. Defaults to
`false`.
filterstring
Filter expression to narrow down which documents can be returned as
similar. Uses the same syntax as search filters. Only documents
matching this filter will be considered when finding similar documents.
Example: `genres = action AND year > 2000`.
show_ranking_scoreboolean
When `true`, includes a global `_rankingScore` field in each document
showing how similar it is to the target document. The score is a value
between 0 and 1, where higher values indicate greater similarity.
Defaults to `false`.
show_ranking_score_detailsboolean
When `true`, includes a detailed `_rankingScoreDetails` object in each
document breaking down how the similarity score was calculated. Useful
for debugging and understanding why certain documents are considered
more similar. Defaults to `false`.
show_performance_detailsboolean
When `true`, includes a `_performanceDetails` object showing the
performance details of the search.
ranking_score_thresholdnumber (float)
Minimum ranking score threshold (between 0.0 and 1.0) that documents
must meet to be included in results. Documents with a similarity score
below this threshold will be excluded. Useful for ensuring only highly
similar documents are returned.