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

# Search a knowledge base

> Performs a vector, full-text, or hybrid search against the knowledge base.
Returns matching chunks above the configured score threshold.




## OpenAPI

````yaml /openapi.yaml post /v1/public/workspaces/{workspace_id}/knowledge_bases/{knowledge_base_id}/search
openapi: 3.0.1
info:
  title: Fetch Hive Public API
  version: v1
  description: Customer-facing Fetch Hive API endpoints for public API keys.
servers:
  - url: https://api.fetchhive.com
security: []
paths:
  /v1/public/workspaces/{workspace_id}/knowledge_bases/{knowledge_base_id}/search:
    parameters:
      - name: workspace_id
        in: path
        required: true
        description: Workspace UUID
        schema:
          type: string
          format: uuid
      - name: knowledge_base_id
        in: path
        required: true
        description: Knowledge base UUID
        schema:
          type: string
          format: uuid
    post:
      tags:
        - Knowledge Bases
      summary: Search a knowledge base
      description: >
        Performs a vector, full-text, or hybrid search against the knowledge
        base.

        Returns matching chunks above the configured score threshold.
      parameters: []
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                search_query:
                  type: string
                  example: How do I reset my password?
                search_type:
                  type: string
                  enum:
                    - hybrid
                    - vector
                    - full_text
                  example: hybrid
                search_chunk_limit:
                  type: integer
                  minimum: 1
                  maximum: 20
                  example: 5
                search_score_threshold:
                  type: number
                  minimum: 0
                  maximum: 1
                  example: 0.5
              required:
                - search_query
                - search_type
                - search_chunk_limit
                - search_score_threshold
        required: true
      responses:
        '200':
          description: search results returned
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    example: Successfully ran a search on a knowledge base.
                  response:
                    type: object
                required:
                  - message
                  - response
        '401':
          description: unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error_response'
        '422':
          description: invalid search type
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    example: Invalid search type.
                required:
                  - error
      security:
        - bearer_auth: []
components:
  schemas:
    error_response:
      type: object
      properties:
        error:
          type: string
          example: Invalid access.
      required:
        - error
  securitySchemes:
    bearer_auth:
      type: http
      scheme: bearer
      description: 'Workspace API key sent as `Authorization: Bearer <api_key>`.'

````