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

# List chunks

> Search and list chunks in a vector database, with optional filtering by file, chunk IDs, or metadata fields. Results are paginated.

Return a paginated list of chunks from a vector database. Filter by `file_id`, by specific `chunk_ids`, or by user-defined `metadata` fields. Metadata filters use the same operator syntax as file search filters (`$in`, `$gt`, `$gte`, `$lt`, `$lte`), and multiple filters are combined with AND. Each chunk in the response includes its text, metadata, heading hierarchy, and source locations.


## OpenAPI

````yaml post /v1/flow/vectordb/{database_id}/chunks
openapi: 3.1.0
info:
  title: SeekrFlow API
  description: SeekrFlow API Documentation
  termsOfService: http://www.seekr.com/support
  contact:
    name: Seekr API Support
    url: http://www.seekr.com/contact
    email: contact@seekr.com
  version: 5.99.0
servers:
  - url: https://flow.seekr.com
    description: SeekrBuild server base URL
security: []
paths:
  /v1/flow/vectordb/{database_id}/chunks:
    post:
      tags:
        - Vector database
      summary: List chunks
      description: >-
        Search and list chunks in a vector database, with optional filtering by
        file, chunk IDs, or metadata fields. Results are paginated.
      operationId: list_vector_database_chunks_v1_flow_vectordb__database_id__chunks_post
      parameters:
        - name: database_id
          in: path
          required: true
          schema:
            type: string
            title: Database Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/VectorDatabaseChunkSearchRequest'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/VectorDatabaseChunkListResponse'
        '422':
          description: Invalid request parameters
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - APIKeyHeader: []
components:
  schemas:
    VectorDatabaseChunkSearchRequest:
      properties:
        file_id:
          anyOf:
            - type: string
            - type: 'null'
          title: File Id
          description: Filter to chunks from a specific file
        chunk_ids:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Chunk Ids
          description: Chunk IDs to retrieve
        metadata:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Metadata
          description: >-
            Metadata key-value filters with optional operators ($gt, $gte, $lt,
            $lte, $in). Example: {"year": {"$gte": 2023}, "doc_type": "SOP"}
        limit:
          type: integer
          maximum: 100
          minimum: 1
          title: Limit
          description: Max results to return
          default: 20
        offset:
          type: integer
          minimum: 0
          title: Offset
          description: Pagination offset
          default: 0
      type: object
      title: VectorDatabaseChunkSearchRequest
      description: Request body for searching/listing chunks in a vector database.
    VectorDatabaseChunkListResponse:
      properties:
        object:
          type: string
          const: list
          title: Object
          default: list
        data:
          items:
            $ref: '#/components/schemas/VectorDatabaseChunkListItem'
          type: array
          title: Data
        total:
          type: integer
          title: Total
        limit:
          type: integer
          title: Limit
        offset:
          type: integer
          title: Offset
      type: object
      required:
        - data
        - total
        - limit
        - offset
      title: VectorDatabaseChunkListResponse
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    VectorDatabaseChunkListItem:
      properties:
        chunk_id:
          type: string
          title: Chunk Id
        file_id:
          type: string
          title: File Id
        text:
          type: string
          title: Text
        metadata:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Metadata
        hierarchy:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Hierarchy
        locations:
          anyOf:
            - items:
                $ref: '#/components/schemas/VectorDatabaseMarkdownLocation'
              type: array
            - type: 'null'
          title: Locations
      type: object
      required:
        - chunk_id
        - file_id
        - text
      title: VectorDatabaseChunkListItem
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
    VectorDatabaseMarkdownLocation:
      properties:
        line_number_start:
          anyOf:
            - type: integer
            - type: 'null'
          title: Line Number Start
        line_number_end:
          anyOf:
            - type: integer
            - type: 'null'
          title: Line Number End
        char_start:
          anyOf:
            - type: integer
            - type: 'null'
          title: Char Start
        char_end:
          anyOf:
            - type: integer
            - type: 'null'
          title: Char End
        hierarchy:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Hierarchy
        page_number:
          anyOf:
            - type: integer
            - type: 'null'
          title: Page Number
      type: object
      title: VectorDatabaseMarkdownLocation
  securitySchemes:
    APIKeyHeader:
      type: apiKey
      description: >-
        Your Seekr API key, sent in the Authorization header with no 'Bearer'
        prefix.
      in: header
      name: Authorization

````