# Retrieve points POST http://localhost:6333/collections/{collection_name}/points Content-Type: application/json Retrieves all details from multiple points. Reference: https://api.qdrant.tech/api-reference/points/get-points ## OpenAPI Specification ```yaml openapi: 3.1.1 info: title: Retrieve points version: endpoint_points.get_points paths: /collections/{collection_name}/points: post: operationId: get-points summary: Retrieve points description: Retrieves all details from multiple points. 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_get_points_Response_200' requestBody: description: List of points to retrieve content: application/json: schema: $ref: '#/components/schemas/PointRequest' 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' PointRequestShardKey: oneOf: - $ref: '#/components/schemas/ShardKeySelector' - description: Any type ExtendedPointId: oneOf: - type: integer format: uint64 - type: string format: uuid 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' PointRequestWithPayload: oneOf: - $ref: '#/components/schemas/WithPayloadInterface' - description: Any type WithVector: oneOf: - type: boolean - type: array items: type: string PointRequest: type: object properties: shard_key: $ref: '#/components/schemas/PointRequestShardKey' ids: type: array items: $ref: '#/components/schemas/ExtendedPointId' with_payload: $ref: '#/components/schemas/PointRequestWithPayload' with_vector: $ref: '#/components/schemas/WithVector' required: - ids 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 CollectionsCollectionNamePointsPostResponsesContentApplicationJsonSchemaUsage: 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 Points_get_points_Response_200: type: object properties: usage: $ref: >- #/components/schemas/CollectionsCollectionNamePointsPostResponsesContentApplicationJsonSchemaUsage time: type: number format: double status: type: string result: type: array items: $ref: '#/components/schemas/Record' ``` ## SDK Code Examples ```rust use qdrant_client::qdrant::GetPointsBuilder; use qdrant_client::Qdrant; let client = Qdrant::from_url("http://localhost:6334").build()?; client .get_points(GetPointsBuilder::new( "{collection_name}", vec![0.into(), 30.into(), 100.into()], )) .await?; ``` ```python from qdrant_client import QdrantClient client = QdrantClient(url="http://localhost:6333") client.retrieve( collection_name="{collection_name}", ids=[0, 3, 100], ) ``` ```typescript import { QdrantClient } from "@qdrant/js-client-rest"; const client = new QdrantClient({ host: "localhost", port: 6333 }); client.retrieve("{collection_name}", { ids: [0, 3, 100], }); ``` ```go package client import ( "context" "fmt" "github.com/qdrant/go-client/qdrant" ) func getPoints() { client, err := qdrant.NewClient(&qdrant.Config{ Host: "localhost", Port: 6334, }) if err != nil { panic(err) } points, err := client.Get(context.Background(), &qdrant.GetPoints{ CollectionName: "{collection_name}", Ids: []*qdrant.PointId{ qdrant.NewIDNum(0), qdrant.NewID("3"), qdrant.NewIDNum(100), }, }) if err != nil { panic(err) } fmt.Println("Points: ", points) } ``` ```java import static io.qdrant.client.PointIdFactory.id; import java.util.List; import io.qdrant.client.QdrantClient; import io.qdrant.client.QdrantGrpcClient; QdrantClient client = new QdrantClient(QdrantGrpcClient.newBuilder("localhost", 6334, false).build()); client .retrieveAsync("{collection_name}", List.of(id(0), id(30), id(100)), false, false, null) .get(); ``` ```csharp using Qdrant.Client; var client = new QdrantClient("localhost", 6334); await client.RetrieveAsync( collectionName: "{collection_name}", ids: [0, 30, 100], withPayload: false, withVectors: false ); ``` ```ruby require 'uri' require 'net/http' url = URI("http://localhost:6333/collections/collection_name/points") http = Net::HTTP.new(url.host, url.port) request = Net::HTTP::Post.new(url) request["api-key"] = '' request["Content-Type"] = 'application/json' request.body = "{\n \"ids\": [\n 42\n ]\n}" response = http.request(request) puts response.read_body ``` ```php request('POST', 'http://localhost:6333/collections/collection_name/points', [ 'body' => '{ "ids": [ 42 ] }', 'headers' => [ 'Content-Type' => 'application/json', 'api-key' => '', ], ]); echo $response->getBody(); ``` ```swift import Foundation let headers = [ "api-key": "", "Content-Type": "application/json" ] let parameters = ["ids": [42]] as [String : Any] let postData = JSONSerialization.data(withJSONObject: parameters, options: []) let request = NSMutableURLRequest(url: NSURL(string: "http://localhost:6333/collections/collection_name/points")! 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() ```