Search

Query points

POST
Universally query points. This endpoint covers all capabilities of search, recommend, discover, filters. But also enables hybrid and multi-stage queries.

Path parameters

collection_namestringRequired
Name of the collection to query

Query parameters

consistencyunionOptional
Define read consistency guarantees for the operation
timeoutintegerOptional
If set, overrides global timeout for this request. Unit is seconds.

Request

This endpoint expects an object.
shard_key
unionOptional
prefetch
unionOptional
Sub-requests to perform first. If present, the query will be performed on the results of the prefetch(es).
query
unionOptional
Query to perform. If missing without prefetches, returns points ordered by their IDs.
using
stringOptional
Define which vector name to use for querying. If missing, the default vector is used.
filter
unionOptional
Filter conditions - return only those points that satisfy the specified conditions.
params
unionOptional
Search params for when there is no prefetch
score_threshold
doubleOptional
Return points with scores better than this threshold.
limit
integerOptional
Max number of points to return. Default is 10.
offset
integerOptional
Offset of the result. Skip this many points. Default is 0
with_vector
unionOptional
Options for specifying which vectors to include into the response. Default is false.
with_payload
unionOptional
Options for specifying which payload to include or not. Default is false.
lookup_from
unionOptional
The location to use for IDs lookup, if not specified - use the current collection and the 'using' vector Note: the other collection vectors should have the same vector size as the 'using' vector in the current collection

Response

This endpoint returns an object
time
doubleOptional
Time spent to process this request
status
stringOptional
result
objectOptional
POST
1curl -X POST http://localhost:6333/collections/collection_name/points/query \
2 -H "api-key: <apiKey>" \
3 -H "Content-Type: application/json" \
4 -d '{}'
200Successful
1{
2 "time": 1.1,
3 "status": "status",
4 "result": {
5 "points": [
6 {
7 "id": 1,
8 "version": 1,
9 "score": 1.1
10 }
11 ]
12 }
13}