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

# Query points in batch

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

Universally query points in batch. 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

- QueryRequestBatch
  - `searches` QueryRequest[], required
    - `shard_key` union
      - union
        - union
          - string
          - integer
        - ShardKey[]
          - union
            - string
            - integer
        - ShardKeyWithFallback
          - `target` union, required
            - string
            - integer
          - `fallback` union, required
            - 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
              - …
            - union
              - …
          - 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
              - …
            - `min_should` union — At least minimum amount of given conditions should match
              - …
            - `must` union — All conditions must match
              - …
            - `must_not` union — All conditions must NOT match
              - …
          - 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
              - …
            - `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
            - `acorn` union — ACORN search params
              - …
            - `idf` union — Which population sparse vector IDF statistics are computed over. By default (or with explicit `"global"`) statistics are collection-wide. Only applicable to sparse vectors with the IDF modifier enabled.
              - …
          - 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
              - …
          - 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
              - …
            - union
              - …
          - 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
              - …
            - `min_should` union — At least minimum amount of given conditions should match
              - …
            - `must` union — All conditions must match
              - …
            - `must_not` union — All conditions must NOT match
              - …
          - 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
              - …
            - `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
            - `acorn` union — ACORN search params
              - …
            - `idf` union — Which population sparse vector IDF statistics are computed over. By default (or with explicit `"global"`) statistics are collection-wide. Only applicable to sparse vectors with the IDF modifier enabled.
              - …
          - 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
              - …
          - 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` union — Additional options for the model, will be passed to the inference service as-is. See model cards for available options.
              - …
          - 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
              - …
            - `mmr` union — Perform MMR (Maximal Marginal Relevance) reranking after search, using the same vector in this query to calculate relevance.
              - …
          - RecommendQuery
            - `recommend` RecommendInput, required
              - …
          - DiscoverQuery
            - `discover` DiscoverInput, required
              - …
          - ContextQuery
            - `context` union, required
              - …
          - OrderByQuery
            - `order_by` union, required
              - …
          - FusionQuery
            - `fusion` 'rrf' | 'dbsf', required — Fusion algorithm allows to combine results of multiple prefetches. Available fusion algorithms: * `rrf` - Reciprocal Rank Fusion (with default parameters) * `dbsf` - Distribution-Based Score Fusion
          - RrfQuery
            - `rrf` Rrf, required — Parameters for Reciprocal Rank Fusion
              - …
          - FormulaQuery
            - `formula` union, required
              - …
            - `defaults` object
          - SampleQuery
            - `sample` 'random', required
          - RelevanceFeedbackQuery
            - `relevance_feedback` RelevanceFeedbackInput, 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
              - …
            - 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
              - …
            - SliceCondition — Select points that fall into one of `total` disjoint deterministic slices of the id space, for parallel scans and reproducible sampling.
              - …
            - NestedCondition
              - …
            - Filter — recursive
          - Condition[]
            - union
              - …
          - unknown
        - `min_should` union — At least minimum amount of given conditions should match
          - MinShould
            - `conditions` Condition[], required
              - …
            - `min_count` integer, required
          - unknown
        - `must` union — All conditions must match
          - 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
              - …
            - SliceCondition — Select points that fall into one of `total` disjoint deterministic slices of the id space, for parallel scans and reproducible sampling.
              - …
            - NestedCondition
              - …
            - Filter — recursive
          - Condition[]
            - union
              - …
          - unknown
        - `must_not` union — All conditions must NOT match
          - 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
              - …
            - SliceCondition — Select points that fall into one of `total` disjoint deterministic slices of the id space, for parallel scans and reproducible sampling.
              - …
            - NestedCondition
              - …
            - Filter — recursive
          - Condition[]
            - union
              - …
          - 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 preselected 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 preselected 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
        - `acorn` union — ACORN search params
          - AcornSearchParams — ACORN-related search parameters
            - `enable` boolean — If true, then ACORN may be used for the HNSW search based on filters selectivity. Improves search recall for searches with multiple low-selectivity payload filters, at cost of performance.
            - `max_selectivity` number, double, nullable — Maximum selectivity of filters to enable ACORN. If estimated filters selectivity is higher than this value, ACORN will not be used. Selectivity is estimated as: `estimated number of points satisfying the filters / total number of points`. 0.0 for never, 1.0 for always. Default is 0.4.
          - unknown
        - `idf` union — Which population sparse vector IDF statistics are computed over. By default (or with explicit `"global"`) statistics are collection-wide. Only applicable to sparse vectors with the IDF modifier enabled.
          - union — Population over which sparse vector IDF statistics are computed for scoring — the *IDF corpus*. - `"global"` — collection-wide statistics, same as omitting the parameter. - `{ "corpus": <filter> }` — document count and per-term document frequencies are computed over the points matching the corpus filter only. The corpus is independent of the retrieval filter and is usually broader than it.
            - 'global' — Named IDF scope without a corpus filter.
            - IdfCorpusParams — IDF statistics computed over the points matching a corpus filter.
              - …
          - unknown
      - 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
              - …
            - ShardKey[]
              - …
            - ShardKeyWithFallback
              - …
          - unknown
      - unknown

## Response `200`

successful operation

- object
  - `usage` union
    - Usage — Usage of the hardware resources, spent to process the request
      - `hardware` 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
      - `inference` union
        - InferenceUsage
          - `models` object, required
        - unknown
    - 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

---

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