# Scroll points POST http://localhost:6333/collections/{collection_name}/points/scroll Content-Type: application/json Returns all points in a page-by-page manner. By default, all resulting points are sorted by {id}. To query the next page specify the last {id} in the offset field. Additionally, you can specify filters and sorting options. Reference: https://api.qdrant.tech/api-reference/points/scroll-points ## OpenAPI Specification ```yaml openapi: 3.1.1 info: title: Scroll points version: endpoint_points.scroll_points paths: /collections/{collection_name}/points/scroll: post: operationId: scroll-points summary: Scroll points description: | Returns all points in a page-by-page manner. By default, all resulting points are sorted by {id}. To query the next page specify the last {id} in the offset field. Additionally, you can specify filters and sorting options. tags: - - subpackage_points parameters: - name: collection_name in: path description: Name of the collection to retrieve from required: true schema: type: string - name: consistency in: query description: Define read consistency guarantees for the operation required: false schema: $ref: '#/components/schemas/ReadConsistency' - name: timeout in: query description: If set, overrides global timeout for this request. Unit is seconds. required: false schema: type: integer - name: api-key in: header required: true schema: type: string responses: '200': description: successful operation content: application/json: schema: $ref: '#/components/schemas/Points_scroll_points_Response_200' requestBody: description: Pagination and filter parameters content: application/json: schema: $ref: '#/components/schemas/ScrollRequest' components: schemas: ReadConsistencyType: type: string enum: - value: majority - value: quorum - value: all ReadConsistency: oneOf: - type: integer - $ref: '#/components/schemas/ReadConsistencyType' ShardKey: oneOf: - type: string - type: integer format: uint64 ShardKeySelector1: type: array items: $ref: '#/components/schemas/ShardKey' ShardKeySelector: oneOf: - $ref: '#/components/schemas/ShardKey' - $ref: '#/components/schemas/ShardKeySelector1' ScrollRequestShardKey: oneOf: - $ref: '#/components/schemas/ShardKeySelector' - description: Any type ExtendedPointId: oneOf: - type: integer format: uint64 - type: string format: uuid ScrollRequestOffset: oneOf: - $ref: '#/components/schemas/ExtendedPointId' - description: Any type ValueVariants: oneOf: - type: string - type: integer format: int64 - type: boolean MatchValue: type: object properties: value: $ref: '#/components/schemas/ValueVariants' required: - value MatchText: type: object properties: text: type: string required: - text AnyVariants: oneOf: - type: array items: type: string - type: array items: type: integer format: int64 MatchAny: type: object properties: any: $ref: '#/components/schemas/AnyVariants' required: - any MatchExcept: type: object properties: except: $ref: '#/components/schemas/AnyVariants' required: - except Match: oneOf: - $ref: '#/components/schemas/MatchValue' - $ref: '#/components/schemas/MatchText' - $ref: '#/components/schemas/MatchAny' - $ref: '#/components/schemas/MatchExcept' FieldConditionMatch: oneOf: - $ref: '#/components/schemas/Match' - description: Any type Range: type: object properties: lt: type: - number - 'null' format: double gt: type: - number - 'null' format: double gte: type: - number - 'null' format: double lte: type: - number - 'null' format: double DatetimeRange: type: object properties: lt: type: - string - 'null' format: date-time gt: type: - string - 'null' format: date-time gte: type: - string - 'null' format: date-time lte: type: - string - 'null' format: date-time RangeInterface: oneOf: - $ref: '#/components/schemas/Range' - $ref: '#/components/schemas/DatetimeRange' FieldConditionRange: oneOf: - $ref: '#/components/schemas/RangeInterface' - description: Any type GeoPoint: type: object properties: lon: type: number format: double lat: type: number format: double required: - lon - lat GeoBoundingBox: type: object properties: top_left: $ref: '#/components/schemas/GeoPoint' bottom_right: $ref: '#/components/schemas/GeoPoint' required: - top_left - bottom_right FieldConditionGeoBoundingBox: oneOf: - $ref: '#/components/schemas/GeoBoundingBox' - description: Any type GeoRadius: type: object properties: center: $ref: '#/components/schemas/GeoPoint' radius: type: number format: double required: - center - radius FieldConditionGeoRadius: oneOf: - $ref: '#/components/schemas/GeoRadius' - description: Any type GeoLineString: type: object properties: points: type: array items: $ref: '#/components/schemas/GeoPoint' required: - points GeoPolygon: type: object properties: exterior: $ref: '#/components/schemas/GeoLineString' interiors: type: - array - 'null' items: $ref: '#/components/schemas/GeoLineString' required: - exterior FieldConditionGeoPolygon: oneOf: - $ref: '#/components/schemas/GeoPolygon' - description: Any type ValuesCount: type: object properties: lt: type: - integer - 'null' gt: type: - integer - 'null' gte: type: - integer - 'null' lte: type: - integer - 'null' FieldConditionValuesCount: oneOf: - $ref: '#/components/schemas/ValuesCount' - description: Any type FieldCondition: type: object properties: key: type: string match: $ref: '#/components/schemas/FieldConditionMatch' range: $ref: '#/components/schemas/FieldConditionRange' geo_bounding_box: $ref: '#/components/schemas/FieldConditionGeoBoundingBox' geo_radius: $ref: '#/components/schemas/FieldConditionGeoRadius' geo_polygon: $ref: '#/components/schemas/FieldConditionGeoPolygon' values_count: $ref: '#/components/schemas/FieldConditionValuesCount' is_empty: type: - boolean - 'null' is_null: type: - boolean - 'null' required: - key PayloadField: type: object properties: key: type: string required: - key IsEmptyCondition: type: object properties: is_empty: $ref: '#/components/schemas/PayloadField' required: - is_empty IsNullCondition: type: object properties: is_null: $ref: '#/components/schemas/PayloadField' required: - is_null HasIdCondition: type: object properties: has_id: type: array items: $ref: '#/components/schemas/ExtendedPointId' required: - has_id HasVectorCondition: type: object properties: has_vector: type: string required: - has_vector Nested: type: object properties: key: type: string filter: $ref: '#/components/schemas/Filter' required: - key - filter NestedCondition: type: object properties: nested: $ref: '#/components/schemas/Nested' required: - nested Condition: oneOf: - $ref: '#/components/schemas/FieldCondition' - $ref: '#/components/schemas/IsEmptyCondition' - $ref: '#/components/schemas/IsNullCondition' - $ref: '#/components/schemas/HasIdCondition' - $ref: '#/components/schemas/HasVectorCondition' - $ref: '#/components/schemas/NestedCondition' - $ref: '#/components/schemas/Filter' FilterShould1: type: array items: $ref: '#/components/schemas/Condition' FilterShould: oneOf: - $ref: '#/components/schemas/Condition' - $ref: '#/components/schemas/FilterShould1' - description: Any type MinShould: type: object properties: conditions: type: array items: $ref: '#/components/schemas/Condition' min_count: type: integer required: - conditions - min_count FilterMinShould: oneOf: - $ref: '#/components/schemas/MinShould' - description: Any type FilterMust1: type: array items: $ref: '#/components/schemas/Condition' FilterMust: oneOf: - $ref: '#/components/schemas/Condition' - $ref: '#/components/schemas/FilterMust1' - description: Any type FilterMustNot1: type: array items: $ref: '#/components/schemas/Condition' FilterMustNot: oneOf: - $ref: '#/components/schemas/Condition' - $ref: '#/components/schemas/FilterMustNot1' - description: Any type Filter: type: object properties: should: $ref: '#/components/schemas/FilterShould' min_should: $ref: '#/components/schemas/FilterMinShould' must: $ref: '#/components/schemas/FilterMust' must_not: $ref: '#/components/schemas/FilterMustNot' ScrollRequestFilter: oneOf: - $ref: '#/components/schemas/Filter' - description: Any type PayloadSelectorInclude: type: object properties: include: type: array items: type: string required: - include PayloadSelectorExclude: type: object properties: exclude: type: array items: type: string required: - exclude PayloadSelector: oneOf: - $ref: '#/components/schemas/PayloadSelectorInclude' - $ref: '#/components/schemas/PayloadSelectorExclude' WithPayloadInterface: oneOf: - type: boolean - type: array items: type: string - $ref: '#/components/schemas/PayloadSelector' ScrollRequestWithPayload: oneOf: - $ref: '#/components/schemas/WithPayloadInterface' - description: Any type WithVector: oneOf: - type: boolean - type: array items: type: string Direction: type: string enum: - value: asc - value: desc OrderByDirection: oneOf: - $ref: '#/components/schemas/Direction' - description: Any type StartFrom: oneOf: - type: integer format: int64 - type: number format: double - type: string format: date-time OrderByStartFrom: oneOf: - $ref: '#/components/schemas/StartFrom' - description: Any type OrderBy: type: object properties: key: type: string direction: $ref: '#/components/schemas/OrderByDirection' start_from: $ref: '#/components/schemas/OrderByStartFrom' required: - key OrderByInterface: oneOf: - type: string - $ref: '#/components/schemas/OrderBy' ScrollRequestOrderBy: oneOf: - $ref: '#/components/schemas/OrderByInterface' - description: Any type ScrollRequest: type: object properties: shard_key: $ref: '#/components/schemas/ScrollRequestShardKey' offset: $ref: '#/components/schemas/ScrollRequestOffset' limit: type: - integer - 'null' filter: $ref: '#/components/schemas/ScrollRequestFilter' with_payload: $ref: '#/components/schemas/ScrollRequestWithPayload' with_vector: $ref: '#/components/schemas/WithVector' order_by: $ref: '#/components/schemas/ScrollRequestOrderBy' HardwareUsage: type: object properties: cpu: type: integer payload_io_read: type: integer payload_io_write: type: integer payload_index_io_read: type: integer payload_index_io_write: type: integer vector_io_read: type: integer vector_io_write: type: integer required: - cpu - payload_io_read - payload_io_write - payload_index_io_read - payload_index_io_write - vector_io_read - vector_io_write CollectionsCollectionNamePointsScrollPostResponsesContentApplicationJsonSchemaUsage: oneOf: - $ref: '#/components/schemas/HardwareUsage' - description: Any type Payload: type: object additionalProperties: description: Any type RecordPayload: oneOf: - $ref: '#/components/schemas/Payload' - description: Any type SparseVector: type: object properties: indices: type: array items: type: integer format: uint values: type: array items: type: number format: double required: - indices - values VectorOutput: oneOf: - type: array items: type: number format: double - $ref: '#/components/schemas/SparseVector' - type: array items: type: array items: type: number format: double VectorStructOutput2: type: object additionalProperties: $ref: '#/components/schemas/VectorOutput' VectorStructOutput: oneOf: - type: array items: type: number format: double - type: array items: type: array items: type: number format: double - $ref: '#/components/schemas/VectorStructOutput2' RecordVector: oneOf: - $ref: '#/components/schemas/VectorStructOutput' - description: Any type RecordShardKey: oneOf: - $ref: '#/components/schemas/ShardKey' - description: Any type OrderValue: oneOf: - type: integer format: int64 - type: number format: double RecordOrderValue: oneOf: - $ref: '#/components/schemas/OrderValue' - description: Any type Record: type: object properties: id: $ref: '#/components/schemas/ExtendedPointId' payload: $ref: '#/components/schemas/RecordPayload' vector: $ref: '#/components/schemas/RecordVector' shard_key: $ref: '#/components/schemas/RecordShardKey' order_value: $ref: '#/components/schemas/RecordOrderValue' required: - id ScrollResultNextPageOffset: oneOf: - $ref: '#/components/schemas/ExtendedPointId' - description: Any type ScrollResult: type: object properties: points: type: array items: $ref: '#/components/schemas/Record' next_page_offset: $ref: '#/components/schemas/ScrollResultNextPageOffset' required: - points Points_scroll_points_Response_200: type: object properties: usage: $ref: >- #/components/schemas/CollectionsCollectionNamePointsScrollPostResponsesContentApplicationJsonSchemaUsage time: type: number format: double status: type: string result: $ref: '#/components/schemas/ScrollResult' ``` ## SDK Code Examples ```rust use qdrant_client::qdrant::{Condition, Filter, ScrollPointsBuilder}; use qdrant_client::Qdrant; let client = Qdrant::from_url("http://localhost:6334").build()?; client .scroll( ScrollPointsBuilder::new("{collection_name}") .filter(Filter::must([Condition::matches( "color", "red".to_string(), )])) .limit(1) .with_payload(true) .with_vectors(false), ) .await?; ``` ```python from qdrant_client import QdrantClient, models client = QdrantClient(url="http://localhost:6333") client.scroll( collection_name="{collection_name}", scroll_filter=models.Filter( must=[ models.FieldCondition(key="color", match=models.MatchValue(value="red")), ] ), limit=1, with_payload=True, with_vectors=False, ) ``` ```typescript import { QdrantClient } from "@qdrant/js-client-rest"; const client = new QdrantClient({ host: "localhost", port: 6333 }); client.scroll("{collection_name}", { filter: { must: [ { key: "color", match: { value: "red", }, }, ], }, limit: 1, with_payload: true, with_vector: false, }); ``` ```go package client import ( "context" "fmt" "github.com/qdrant/go-client/qdrant" ) func scroll() { client, err := qdrant.NewClient(&qdrant.Config{ Host: "localhost", Port: 6334, }) if err != nil { panic(err) } limit := uint32(1) results, err := client.Scroll(context.Background(), &qdrant.ScrollPoints{ CollectionName: "{collection_name}", Filter: &qdrant.Filter{ Must: []*qdrant.Condition{ qdrant.NewMatch("color", "red"), }, }, Limit: &limit, WithPayload: qdrant.NewWithPayloadEnable(true), WithVectors: qdrant.NewWithVectorsEnable(false), }) if err != nil { panic(err) } fmt.Println("Results: ", results) } ``` ```java import static io.qdrant.client.ConditionFactory.matchKeyword; import static io.qdrant.client.WithPayloadSelectorFactory.enable; import io.qdrant.client.QdrantClient; import io.qdrant.client.QdrantGrpcClient; import io.qdrant.client.grpc.Points.Filter; import io.qdrant.client.grpc.Points.ScrollPoints; QdrantClient client = new QdrantClient( QdrantGrpcClient.newBuilder("localhost", 6334, false).build()); client .scrollAsync( ScrollPoints.newBuilder() .setCollectionName("{collection_name}") .setFilter(Filter.newBuilder().addMust(matchKeyword("color", "red")).build()) .setLimit(1) .setWithPayload(enable(true)) .build()) .get(); ``` ```csharp using Qdrant.Client; using static Qdrant.Client.Grpc.Conditions; var client = new QdrantClient("localhost", 6334); await client.ScrollAsync( collectionName: "{collection_name}", filter: MatchKeyword("color", "red"), limit: 1, payloadSelector: true ); ``` ```ruby require 'uri' require 'net/http' url = URI("http://localhost:6333/collections/collection_name/points/scroll") http = Net::HTTP.new(url.host, url.port) request = Net::HTTP::Post.new(url) request["api-key"] = '' request["Content-Type"] = 'application/json' request.body = "{}" response = http.request(request) puts response.read_body ``` ```php request('POST', 'http://localhost:6333/collections/collection_name/points/scroll', [ 'body' => '{}', 'headers' => [ 'Content-Type' => 'application/json', 'api-key' => '', ], ]); echo $response->getBody(); ``` ```swift import Foundation let headers = [ "api-key": "", "Content-Type": "application/json" ] let parameters = [] as [String : Any] let postData = JSONSerialization.data(withJSONObject: parameters, options: []) let request = NSMutableURLRequest(url: NSURL(string: "http://localhost:6333/collections/collection_name/points/scroll")! as URL, cachePolicy: .useProtocolCachePolicy, timeoutInterval: 10.0) request.httpMethod = "POST" request.allHTTPHeaderFields = headers request.httpBody = postData as Data let session = URLSession.shared let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in if (error != nil) { print(error as Any) } else { let httpResponse = response as? HTTPURLResponse print(httpResponse) } }) dataTask.resume() ```