Retrieve documents similar to a reference document identified by its id.
Useful for “more like this” or recommendations.
An API key is a token that you provide when making API calls. Read more about how to secure your project.
Include the API key to the Authorization header, for instance:
-H 'Authorization: Bearer 6436fc5237b0d6e0d64253fbaac21d135012ecf1'If you use a SDK, ensure you instantiate the client with the API key, for instance with JS SDK:
const client = new MeiliSearch({
host: 'MEILISEARCH_URL',
apiKey: '6436fc5237b0d6e0d64253fbaac21d135012ecf1'
});Unique identifier of the index.
Request body for similar document search
Document ID to find similar documents for
Name of the embedder to use for semantic similarity
Number of documents to skip
x >= 0Maximum number of documents returned
x >= 0Filter queries by an attribute's value
Attributes to display in the returned documents
Return document vector data
Display the global ranking score of a document
Adds a detailed global ranking score field
Adds a detailed performance details field
Excludes results with low ranking scores
The documents are returned.
Response containing similar documents
Number of results on each page
x >= 0Current search results page
x >= 0Exhaustive total number of search result pages
x >= 0Exhaustive total number of matches
x >= 0Results of the query
Document ID that was used as reference
Processing time of the query in milliseconds
x >= 0Performance details of the query