> ## Documentation Index
> Fetch the complete documentation index at: https://docs.vectoraidb.actian.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Get points by IDs

> Retrieve multiple points by their IDs. Returns the matching points with their vectors and payloads based on the request parameters.



## OpenAPI

````yaml post /collections/{collection_name}/points
openapi: 3.0.3
info:
  title: Actian VectorAI DB - Points API
  description: Point CRUD operations for VectorAI DB.
  version: 1.0.0
  contact:
    name: Actian Corporation
    url: https://www.actian.com
servers:
  - url: http://localhost:6573
    description: Local development server (REST API)
  - url: https://api.vectorai.actian.com
    description: Production server
security:
  - bearerAuth: []
tags:
  - name: Points
    description: Point data operations
paths:
  /collections/{collection_name}/points:
    post:
      tags:
        - Points
      summary: Get points by IDs
      description: >-
        Retrieve multiple points by their IDs. Returns the matching points with
        their vectors and payloads based on the request parameters.
      operationId: get_points
      parameters:
        - name: collection_name
          in: path
          required: true
          schema:
            type: string
            example: my_collection
          description: The name of the collection to retrieve points from.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - ids
              properties:
                ids:
                  type: array
                  items:
                    oneOf:
                      - type: integer
                      - type: string
                  example:
                    - 1
                    - 2
                    - 3
                  description: List of point IDs to retrieve.
                with_payload:
                  type: boolean
                  default: true
                  example: true
                  description: Whether to include payload data in the response.
                with_vectors:
                  type: boolean
                  default: true
                  example: true
                  description: Whether to include vector data in the response.
            examples:
              get_with_all:
                summary: Get with vectors and payload
                value:
                  ids:
                    - 1
                    - 2
                    - 3
                  with_payload: true
                  with_vectors: true
              get_payload_only:
                summary: Get payload only
                value:
                  ids:
                    - 1
                    - 2
                    - 3
                  with_payload: true
                  with_vectors: false
      responses:
        '200':
          description: Points retrieved
          content:
            application/json:
              schema:
                type: object
                properties:
                  usage:
                    type: object
                    description: Resource usage information for this request.
                    properties:
                      hardware:
                        type: object
                        nullable: true
                        description: >-
                          Hardware resource counters for the operation,
                          including CPU, payload I/O, payload index I/O, and
                          vector I/O metrics.
                  time:
                    type: number
                    format: double
                    example: 0.000159851
                    description: Time spent to process this request, in seconds.
                  status:
                    type: string
                    example: ok
                    description: Operation status. Returns `ok` on success.
                  result:
                    type: array
                    description: Array of matching points.
                    items:
                      type: object
                      properties:
                        id:
                          oneOf:
                            - type: integer
                            - type: string
                          example: 1
                          description: The point's unique identifier.
                        payload:
                          type: object
                          nullable: true
                          example:
                            category: electronics
                            price: 299.99
                          description: >-
                            JSON payload metadata associated with the point, or
                            `null` if `with_payload` is `false`.
                        vector:
                          type: array
                          nullable: true
                          example: null
                          description: >-
                            The vector embedding for the point, or `null` if
                            `with_vectors` is `false`.
              example:
                usage:
                  hardware: null
                time: 0.000159851
                status: ok
                result:
                  - id: 1
                    payload: '{"category":"electronics","price":299.99}'
                    vector: null
                  - id: 2
                    payload: '{"category":"books","price":19.99}'
                    vector: null
                  - id: 3
                    payload: '{"category":"electronics","price":149.99}'
                    vector: null
        4XX:
          description: Error response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      x-codeSamples:
        - lang: Python
          label: Get points by ID
          source: |
            from actian_vectorai_client import VectorAIClient

            with VectorAIClient("localhost:6574") as client:
                # Get multiple points by ID
                points = client.points.get("my_collection", ids=[1, 5, 10, 100], with_payload=True, with_vectors=True)
                
                for p in points:
                    print(f"ID: {p.id}")
                    print(f"Payload: {p.payload}")
                    print(f"Vector: {p.vectors[:3]}...")  # First 3 dimensions
        - lang: JavaScript
          label: Get points by ID
          source: |
            import { VectorAIClient } from '@actian/vectorai-client';

            const client = new VectorAIClient('localhost:6574');

            const points = await client.points.get('my_collection', [1, 2, 3]);
            for (const p of points) {
                console.log(`id=${p.id}  payload=${JSON.stringify(p.payload)}`);
            }

            client.close();
        - lang: cURL
          label: Get points
          source: >
            curl -X POST
            "http://localhost:6573/collections/my_collection/points" \
              -H "Content-Type: application/json" \
              -H 'Authorization: Bearer <admin-jwt-or-access-token>' \
              -d '{
                "ids": [1, 2, 3],
                "with_payload": true,
                "with_vectors": true
              }'
components:
  schemas:
    ErrorResponse:
      type: object
      description: Error response returned when a request fails.
      properties:
        status:
          type: object
          description: Status object containing the error message.
          properties:
            error:
              type: string
              description: Human-readable error message describing what went wrong.
              example: Collection `my_collection` doesn't exist!
        time:
          type: number
          format: double
          description: Time spent to process this request, in seconds.
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: Admin JWT or access token for authenticating requests to VectorAI DB.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.