---
title: "Query points"
method: POST
path: "/collections/{collection_name}/points/query"
tags: ["Search"]
---

# Query points

`POST /collections/{collection_name}/points/query`

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

## Path parameters

- `collection_name` string, required

## Query parameters

- `consistency` union — Read consistency parameter Defines how many replicas should be queried to get the result * `N` - send N random request and return points, which present on all of them * `majority` - send N/2+1 random request and return points, which present on all of them * `quorum` - send requests to all nodes and return points which present on majority of them * `all` - send requests to all nodes and return points which present on all of them Default value is `Factor(1)`
  - integer
  - 'majority' | 'quorum' | 'all' — * `majority` - send N/2+1 random request and return points, which present on all of them * `quorum` - send requests to all nodes and return points which present on majority of nodes * `all` - send requests to all nodes and return points which present on all nodes
- `timeout` integer

## Request body

- QueryRequest
  - `shard_key` union
    - union
      - union
        - string
        - integer
      - ShardKey[]
        - union
          - string
          - integer
    - unknown
  - `prefetch` union — Sub-requests to perform first. If present, the query will be performed on the results of the prefetch(es).
    - Prefetch
      - `prefetch` union — Sub-requests to perform first. If present, the query will be performed on the results of the prefetches.
        - Prefetch — recursive
        - Prefetch[]
        - unknown
      - `query` union — Query to perform. If missing without prefetches, returns points ordered by their IDs.
        - union
          - union
            - number[]
            - SparseVector — Sparse vector structure
              - …
            - array[]
              - …
            - union — Type, used for specifying point ID in user interface
              - …
            - Document — WARN: Work-in-progress, unimplemented Text document for embedding. Requires inference infrastructure, unimplemented.
              - …
            - Image — WARN: Work-in-progress, unimplemented Image object for embedding. Requires inference infrastructure, unimplemented.
              - …
            - InferenceObject — WARN: Work-in-progress, unimplemented Custom object for embedding. Requires inference infrastructure, unimplemented.
              - …
          - union
            - NearestQuery
              - …
            - RecommendQuery
              - …
            - DiscoverQuery
              - …
            - ContextQuery
              - …
            - OrderByQuery
              - …
            - FusionQuery
              - …
            - FormulaQuery
              - …
            - SampleQuery
              - …
        - unknown
      - `using` string, nullable — Define which vector name to use for querying. If missing, the default vector is used.
      - `filter` union — Filter conditions - return only those points that satisfy the specified conditions.
        - Filter
          - `should` union — At least one of those conditions should match
            - union
              - …
            - Condition[]
              - …
            - unknown
          - `min_should` union — At least minimum amount of given conditions should match
            - MinShould
              - …
            - unknown
          - `must` union — All conditions must match
            - union
              - …
            - Condition[]
              - …
            - unknown
          - `must_not` union — All conditions must NOT match
            - union
              - …
            - Condition[]
              - …
            - unknown
        - unknown
      - `params` union — Search params for when there is no prefetch
        - SearchParams — Additional parameters of the search
          - `hnsw_ef` integer, nullable — Params relevant to HNSW index Size of the beam in a beam-search. Larger the value - more accurate the result, more time required for search.
          - `exact` boolean — Search without approximation. If set to true, search may run long but with exact results.
          - `quantization` union — Quantization params
            - QuantizationSearchParams — Additional parameters of the search
              - …
            - unknown
          - `indexed_only` boolean — If enabled, the engine will only perform search among indexed or small segments. Using this option prevents slow searches in case of delayed index, but does not guarantee that all uploaded vectors will be included in search results
        - unknown
      - `score_threshold` number, float, nullable — Return points with scores better than this threshold.
      - `limit` integer, nullable — Max number of points to return. Default is 10.
      - `lookup_from` union — 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
        - LookupLocation — Defines a location to use for looking up the vector. Specifies collection and vector field name.
          - `collection` string, required — Name of the collection used for lookup
          - `vector` string, nullable — Optional name of the vector field within the collection. If not provided, the default vector field will be used.
          - `shard_key` union — Specify in which shards to look for the points, if not specified - look in all shards
            - union
              - …
            - unknown
        - unknown
    - Prefetch[]
      - `prefetch` union — Sub-requests to perform first. If present, the query will be performed on the results of the prefetches.
        - Prefetch — recursive
        - Prefetch[]
        - unknown
      - `query` union — Query to perform. If missing without prefetches, returns points ordered by their IDs.
        - union
          - union
            - number[]
            - SparseVector — Sparse vector structure
              - …
            - array[]
              - …
            - union — Type, used for specifying point ID in user interface
              - …
            - Document — WARN: Work-in-progress, unimplemented Text document for embedding. Requires inference infrastructure, unimplemented.
              - …
            - Image — WARN: Work-in-progress, unimplemented Image object for embedding. Requires inference infrastructure, unimplemented.
              - …
            - InferenceObject — WARN: Work-in-progress, unimplemented Custom object for embedding. Requires inference infrastructure, unimplemented.
              - …
          - union
            - NearestQuery
              - …
            - RecommendQuery
              - …
            - DiscoverQuery
              - …
            - ContextQuery
              - …
            - OrderByQuery
              - …
            - FusionQuery
              - …
            - FormulaQuery
              - …
            - SampleQuery
              - …
        - unknown
      - `using` string, nullable — Define which vector name to use for querying. If missing, the default vector is used.
      - `filter` union — Filter conditions - return only those points that satisfy the specified conditions.
        - Filter
          - `should` union — At least one of those conditions should match
            - union
              - …
            - Condition[]
              - …
            - unknown
          - `min_should` union — At least minimum amount of given conditions should match
            - MinShould
              - …
            - unknown
          - `must` union — All conditions must match
            - union
              - …
            - Condition[]
              - …
            - unknown
          - `must_not` union — All conditions must NOT match
            - union
              - …
            - Condition[]
              - …
            - unknown
        - unknown
      - `params` union — Search params for when there is no prefetch
        - SearchParams — Additional parameters of the search
          - `hnsw_ef` integer, nullable — Params relevant to HNSW index Size of the beam in a beam-search. Larger the value - more accurate the result, more time required for search.
          - `exact` boolean — Search without approximation. If set to true, search may run long but with exact results.
          - `quantization` union — Quantization params
            - QuantizationSearchParams — Additional parameters of the search
              - …
            - unknown
          - `indexed_only` boolean — If enabled, the engine will only perform search among indexed or small segments. Using this option prevents slow searches in case of delayed index, but does not guarantee that all uploaded vectors will be included in search results
        - unknown
      - `score_threshold` number, float, nullable — Return points with scores better than this threshold.
      - `limit` integer, nullable — Max number of points to return. Default is 10.
      - `lookup_from` union — 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
        - LookupLocation — Defines a location to use for looking up the vector. Specifies collection and vector field name.
          - `collection` string, required — Name of the collection used for lookup
          - `vector` string, nullable — Optional name of the vector field within the collection. If not provided, the default vector field will be used.
          - `shard_key` union — Specify in which shards to look for the points, if not specified - look in all shards
            - union
              - …
            - unknown
        - unknown
    - unknown
  - `query` union — Query to perform. If missing without prefetches, returns points ordered by their IDs.
    - union
      - union
        - number[]
        - SparseVector — Sparse vector structure
          - `indices` integer[], required — Indices must be unique
          - `values` number[], required — Values and indices must be the same length
        - array[]
          - number[]
        - union — Type, used for specifying point ID in user interface
          - integer
          - string, uuid
        - Document — WARN: Work-in-progress, unimplemented Text document for embedding. Requires inference infrastructure, unimplemented.
          - `text` string, required — Text of the document This field will be used as input for the embedding model
          - `model` string, required — Name of the model used to generate the vector List of available models depends on a provider
          - `options` object, nullable — Parameters for the model Values of the parameters are model-specific
        - Image — WARN: Work-in-progress, unimplemented Image object for embedding. Requires inference infrastructure, unimplemented.
          - `image` string, required — Image data: base64 encoded image or an URL
          - `model` string, required — Name of the model used to generate the vector List of available models depends on a provider
          - `options` object, nullable — Parameters for the model Values of the parameters are model-specific
        - InferenceObject — WARN: Work-in-progress, unimplemented Custom object for embedding. Requires inference infrastructure, unimplemented.
          - `object` unknown, required
          - `model` string, required — Name of the model used to generate the vector List of available models depends on a provider
          - `options` object, nullable — Parameters for the model Values of the parameters are model-specific
      - union
        - NearestQuery
          - `nearest` union, required
            - number[]
            - SparseVector — Sparse vector structure
              - …
            - array[]
              - …
            - union — Type, used for specifying point ID in user interface
              - …
            - Document — WARN: Work-in-progress, unimplemented Text document for embedding. Requires inference infrastructure, unimplemented.
              - …
            - Image — WARN: Work-in-progress, unimplemented Image object for embedding. Requires inference infrastructure, unimplemented.
              - …
            - InferenceObject — WARN: Work-in-progress, unimplemented Custom object for embedding. Requires inference infrastructure, unimplemented.
              - …
        - RecommendQuery
          - `recommend` RecommendInput, required
            - `positive` VectorInput[], nullable — Look for vectors closest to the vectors from these points
              - …
            - `negative` VectorInput[], nullable — Try to avoid vectors like the vector from these points
              - …
            - `strategy` union — How to use the provided vectors to find the results
              - …
        - DiscoverQuery
          - `discover` DiscoverInput, required
            - `target` union, required
              - …
            - `context` union, required — Search space will be constrained by these pairs of vectors
              - …
        - ContextQuery
          - `context` union, required
            - ContextPair
              - …
            - ContextPair[]
              - …
            - unknown
        - OrderByQuery
          - `order_by` union, required
            - string
            - OrderBy
              - …
        - FusionQuery
          - `fusion` 'rrf' | 'dbsf', required — Fusion algorithm allows to combine results of multiple prefetches. Available fusion algorithms: * `rrf` - Reciprocal Rank Fusion * `dbsf` - Distribution-Based Score Fusion
        - FormulaQuery
          - `formula` union, required
            - number, float
            - string
            - union
              - …
            - MultExpression
              - …
            - SumExpression
              - …
            - NegExpression
              - …
            - AbsExpression
              - …
            - DivExpression
              - …
            - SqrtExpression
              - …
            - PowExpression
              - …
            - ExpExpression
              - …
            - Log10Expression
              - …
            - LnExpression
              - …
            - GeoDistance
              - …
            - LinDecayExpression
              - …
            - ExpDecayExpression
              - …
            - GaussDecayExpression
              - …
          - `defaults` object
        - SampleQuery
          - `sample` 'random', required
    - unknown
  - `using` string, nullable — Define which vector name to use for querying. If missing, the default vector is used.
  - `filter` union — Filter conditions - return only those points that satisfy the specified conditions.
    - Filter
      - `should` union — At least one of those conditions should match
        - union
          - FieldCondition — All possible payload filtering conditions
            - `key` string, required — Payload key
            - `match` union — Check if point has field with a given value
              - …
            - `range` union — Check if points value lies in a given range
              - …
            - `geo_bounding_box` union — Check if points geolocation lies in a given area
              - …
            - `geo_radius` union — Check if geo point is within a given radius
              - …
            - `geo_polygon` union — Check if geo point is within a given polygon
              - …
            - `values_count` union — Check number of values of the field
              - …
            - `is_empty` boolean, nullable — Check that the field is empty, alternative syntax for `is_empty: "field_name"`
            - `is_null` boolean, nullable — Check that the field is null, alternative syntax for `is_null: "field_name"`
          - IsEmptyCondition — Select points with empty payload for a specified field
            - `is_empty` PayloadField, required — Payload field
              - …
          - IsNullCondition — Select points with null payload for a specified field
            - `is_null` PayloadField, required — Payload field
              - …
          - HasIdCondition — ID-based filtering condition
            - `has_id` ExtendedPointId[], required
              - …
          - HasVectorCondition — Filter points which have specific vector assigned
            - `has_vector` string, required
          - NestedCondition
            - `nested` Nested, required — Select points with payload for a specified nested field
              - …
          - Filter — recursive
        - Condition[]
          - union
            - FieldCondition — All possible payload filtering conditions
              - …
            - IsEmptyCondition — Select points with empty payload for a specified field
              - …
            - IsNullCondition — Select points with null payload for a specified field
              - …
            - HasIdCondition — ID-based filtering condition
              - …
            - HasVectorCondition — Filter points which have specific vector assigned
              - …
            - NestedCondition
              - …
            - Filter — recursive
        - unknown
      - `min_should` union — At least minimum amount of given conditions should match
        - MinShould
          - `conditions` Condition[], required
            - union
              - …
          - `min_count` integer, required
        - unknown
      - `must` union — All conditions must match
        - union
          - FieldCondition — All possible payload filtering conditions
            - `key` string, required — Payload key
            - `match` union — Check if point has field with a given value
              - …
            - `range` union — Check if points value lies in a given range
              - …
            - `geo_bounding_box` union — Check if points geolocation lies in a given area
              - …
            - `geo_radius` union — Check if geo point is within a given radius
              - …
            - `geo_polygon` union — Check if geo point is within a given polygon
              - …
            - `values_count` union — Check number of values of the field
              - …
            - `is_empty` boolean, nullable — Check that the field is empty, alternative syntax for `is_empty: "field_name"`
            - `is_null` boolean, nullable — Check that the field is null, alternative syntax for `is_null: "field_name"`
          - IsEmptyCondition — Select points with empty payload for a specified field
            - `is_empty` PayloadField, required — Payload field
              - …
          - IsNullCondition — Select points with null payload for a specified field
            - `is_null` PayloadField, required — Payload field
              - …
          - HasIdCondition — ID-based filtering condition
            - `has_id` ExtendedPointId[], required
              - …
          - HasVectorCondition — Filter points which have specific vector assigned
            - `has_vector` string, required
          - NestedCondition
            - `nested` Nested, required — Select points with payload for a specified nested field
              - …
          - Filter — recursive
        - Condition[]
          - union
            - FieldCondition — All possible payload filtering conditions
              - …
            - IsEmptyCondition — Select points with empty payload for a specified field
              - …
            - IsNullCondition — Select points with null payload for a specified field
              - …
            - HasIdCondition — ID-based filtering condition
              - …
            - HasVectorCondition — Filter points which have specific vector assigned
              - …
            - NestedCondition
              - …
            - Filter — recursive
        - unknown
      - `must_not` union — All conditions must NOT match
        - union
          - FieldCondition — All possible payload filtering conditions
            - `key` string, required — Payload key
            - `match` union — Check if point has field with a given value
              - …
            - `range` union — Check if points value lies in a given range
              - …
            - `geo_bounding_box` union — Check if points geolocation lies in a given area
              - …
            - `geo_radius` union — Check if geo point is within a given radius
              - …
            - `geo_polygon` union — Check if geo point is within a given polygon
              - …
            - `values_count` union — Check number of values of the field
              - …
            - `is_empty` boolean, nullable — Check that the field is empty, alternative syntax for `is_empty: "field_name"`
            - `is_null` boolean, nullable — Check that the field is null, alternative syntax for `is_null: "field_name"`
          - IsEmptyCondition — Select points with empty payload for a specified field
            - `is_empty` PayloadField, required — Payload field
              - …
          - IsNullCondition — Select points with null payload for a specified field
            - `is_null` PayloadField, required — Payload field
              - …
          - HasIdCondition — ID-based filtering condition
            - `has_id` ExtendedPointId[], required
              - …
          - HasVectorCondition — Filter points which have specific vector assigned
            - `has_vector` string, required
          - NestedCondition
            - `nested` Nested, required — Select points with payload for a specified nested field
              - …
          - Filter — recursive
        - Condition[]
          - union
            - FieldCondition — All possible payload filtering conditions
              - …
            - IsEmptyCondition — Select points with empty payload for a specified field
              - …
            - IsNullCondition — Select points with null payload for a specified field
              - …
            - HasIdCondition — ID-based filtering condition
              - …
            - HasVectorCondition — Filter points which have specific vector assigned
              - …
            - NestedCondition
              - …
            - Filter — recursive
        - unknown
    - unknown
  - `params` union — Search params for when there is no prefetch
    - SearchParams — Additional parameters of the search
      - `hnsw_ef` integer, nullable — Params relevant to HNSW index Size of the beam in a beam-search. Larger the value - more accurate the result, more time required for search.
      - `exact` boolean — Search without approximation. If set to true, search may run long but with exact results.
      - `quantization` union — Quantization params
        - QuantizationSearchParams — Additional parameters of the search
          - `ignore` boolean — If true, quantized vectors are ignored. Default is false.
          - `rescore` boolean, nullable — If true, use original vectors to re-score top-k results. Might require more time in case if original vectors are stored on disk. If not set, qdrant decides automatically apply rescoring or not.
          - `oversampling` number, double, nullable — Oversampling factor for quantization. Default is 1.0. Defines how many extra vectors should be pre-selected using quantized index, and then re-scored using original vectors. For example, if `oversampling` is 2.4 and `limit` is 100, then 240 vectors will be pre-selected using quantized index, and then top-100 will be returned after re-scoring.
        - unknown
      - `indexed_only` boolean — If enabled, the engine will only perform search among indexed or small segments. Using this option prevents slow searches in case of delayed index, but does not guarantee that all uploaded vectors will be included in search results
    - unknown
  - `score_threshold` number, float, nullable — Return points with scores better than this threshold.
  - `limit` integer, nullable — Max number of points to return. Default is 10.
  - `offset` integer, nullable — Offset of the result. Skip this many points. Default is 0
  - `with_vector` union — Options for specifying which vectors to include into the response. Default is false.
    - union — Options for specifying which vector to include
      - boolean — If `true` - return all vector, If `false` - do not return vector
      - string[] — Specify which vector to return
    - unknown
  - `with_payload` union — Options for specifying which payload to include or not. Default is false.
    - union — Options for specifying which payload to include or not
      - boolean — If `true` - return all payload, If `false` - do not return payload
      - string[] — Specify which fields to return
      - union — Specifies how to treat payload selector
        - PayloadSelectorInclude
          - `include` string[], required — Only include this payload keys
        - PayloadSelectorExclude
          - `exclude` string[], required — Exclude this fields from returning payload
    - unknown
  - `lookup_from` union — 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
    - LookupLocation — Defines a location to use for looking up the vector. Specifies collection and vector field name.
      - `collection` string, required — Name of the collection used for lookup
      - `vector` string, nullable — Optional name of the vector field within the collection. If not provided, the default vector field will be used.
      - `shard_key` union — Specify in which shards to look for the points, if not specified - look in all shards
        - union
          - union
            - string
            - integer
          - ShardKey[]
            - union
              - …
        - unknown
    - unknown

## Response `200`

successful operation

- object
  - `usage` union
    - HardwareUsage — Usage of the hardware resources, spent to process the request
      - `cpu` integer, required
      - `payload_io_read` integer, required
      - `payload_io_write` integer, required
      - `payload_index_io_read` integer, required
      - `payload_index_io_write` integer, required
      - `vector_io_read` integer, required
      - `vector_io_write` integer, required
    - unknown
  - `time` number, float — Time spent to process this request
  - `status` string
  - `result` QueryResponse
    - `points` ScoredPoint[], required
      - `id` union, required — Type, used for specifying point ID in user interface
        - integer
        - string, uuid
      - `version` integer, required — Point version
      - `score` number, float, required — Points vector distance to the query vector
      - `payload` union — Payload - values assigned to the point
        - Payload
        - unknown
      - `vector` union — Vector of the point
        - union — Vector data stored in Point
          - number[]
          - array[]
            - number[]
          - object
        - unknown
      - `shard_key` union — Shard Key
        - union
          - string
          - integer
        - unknown
      - `order_value` union — Order-by value
        - union
          - integer
          - number, double
        - unknown

## Other responses

- `default` — error
- `4XX` — error

## Changes

- **2025-04-15** `5d330acca4cd` — 2 breaking, 51 info
  - removed the required property `usage/anyOf[#/components/schemas/HardwareUsage]/io_read` from the response with the `200` status
  - removed the required property `usage/anyOf[#/components/schemas/HardwareUsage]/io_write` from the response with the `200` status
  - added the new optional request property `filter/anyOf[#/components/schemas/Filter]/min_should/anyOf[#/components/schemas/MinShould]/conditions/items/anyOf[#/components/schemas/FieldCondition]/is_empty`
  - added the new optional request property `filter/anyOf[#/components/schemas/Filter]/min_should/anyOf[#/components/schemas/MinShould]/conditions/items/anyOf[#/components/schemas/FieldCondition]/is_null`
  - …49 more
- …earlier changes not shown

[Full history](https://skmtc.dev/qdrant/apis/qdrant-api/changes/collections/:collection_name/points/query/post.md)

---

[API](https://skmtc.dev/qdrant/apis/qdrant-api.md) · [All operations](https://skmtc.dev/qdrant/apis/qdrant-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/qdrant/qdrant-api/revisions/5d330acca4cd/schema)
