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

# Search a vector store

> Searches passages in the knowledge base. `query` is a string or a list of strings.



## OpenAPI

````yaml /api-reference/vector-stores.json post /v1/vector_stores/{vector_store_id}/search
openapi: 3.1.0
info:
  title: SynapsAI Vector Stores API
  version: 1.0.0
servers:
  - url: https://api.synapsai.cloud
    description: Production server
security: []
paths:
  /v1/vector_stores/{vector_store_id}/search:
    post:
      summary: Search a vector store
      description: >-
        Searches passages in the knowledge base. `query` is a string or a list
        of strings.
      operationId: searchVectorStore
      parameters:
        - name: vector_store_id
          in: path
          required: true
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/VectorStoreSearchRequest'
      responses:
        '200':
          description: Search hits
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/VectorStoreSearchResults'
        '404':
          description: Vector store not found
components:
  schemas:
    VectorStoreSearchRequest:
      type: object
      required:
        - query
      properties:
        query:
          oneOf:
            - type: string
            - type: array
              items:
                type: string
        filters:
          type: object
          additionalProperties: true
          nullable: true
        max_num_results:
          type: integer
          minimum: 1
          maximum: 50
          default: 10
        ranking_options:
          type: object
          additionalProperties: true
          description: '`score_threshold` drops hits below that score.'
        rewrite_query:
          type: boolean
          nullable: true
    VectorStoreSearchResults:
      type: object
      properties:
        object:
          type: string
          enum:
            - vector_store.search_results.page
        search_query:
          type: array
          items:
            type: string
        data:
          type: array
          items:
            type: object
            properties:
              file_id:
                type: string
              filename:
                type: string
              score:
                type: number
              attributes:
                type: object
                additionalProperties: true
                nullable: true
              content:
                type: array
                items:
                  type: object
                  properties:
                    type:
                      type: string
                      enum:
                        - text
                    text:
                      type: string
        has_more:
          type: boolean
        next_page:
          nullable: true

````

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