cURL
curl --request POST \ --url https://api.zeroentropy.dev/v1/queries/top-documents \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "collection_name": "<string>", "query": "<string>", "k": 123, "filter": {}, "include_metadata": false, "reranker": "<string>", "latency_mode": "low" }'
{ "results": [ { "path": "<string>", "score": 123, "metadata": {}, "file_url": "<string>" } ] }
Get the top K documents that match the given query
The Authorization header must be provided in the format Bearer <your-api-key>.
Authorization
Bearer <your-api-key>
You can get your API Key at the Dashboard!
Successful Response
The response is of type object.
object