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

# search knowledge group

> Search for similar content in a knowledge folder using vector similarity. Limited to 60 valid search requests per UTC minute per organization, shared across API keys and groups. Requests are allowed if the rate-limit store is unavailable.



## OpenAPI

````yaml https://api.anam.ai/swagger.json post /v1/knowledge/groups/{id}/search
openapi: 3.1.0
info:
  title: Anam AI API
  version: '1.0'
servers:
  - url: https://api.anam.ai
    description: Anam API
security:
  - BearerAuth: []
tags:
  - name: Sessions
  - name: Avatar Videos
  - name: Meetings
  - name: Personas
  - name: Avatars
  - name: Voices
  - name: Pronunciation Dictionaries
  - name: LLMs
  - name: Knowledge
  - name: Tools
  - name: Share Links
  - name: Engine
paths:
  /v1/knowledge/groups/{id}/search:
    post:
      tags:
        - Knowledge
      summary: search knowledge group
      description: >-
        Search for similar content in a knowledge folder using vector
        similarity. Limited to 60 valid search requests per UTC minute per
        organization, shared across API keys and groups. Requests are allowed if
        the rate-limit store is unavailable.
      operationId: searchKnowledgeGroup
      parameters:
        - in: path
          name: id
          required: true
          schema:
            type: string
          description: Knowledge folder ID, from `GET /v1/knowledge/groups`
      requestBody:
        description: >-
          Query string to search the group's documents, plus an optional cap on
          how many chunks to return. Only `READY` documents are included in the
          results.
        required: true
        content:
          application/json:
            examples:
              default:
                $ref: '#/components/examples/KnowledgeGroupSearch'
            schema:
              type: object
              required:
                - query
              properties:
                query:
                  type: string
                limit:
                  type: integer
                  minimum: 1
                  maximum: 20
                  default: 5
      responses:
        '200':
          description: Successfully retrieved search results
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/KnowledgeSearchResult'
              examples:
                default:
                  $ref: '#/components/examples/KnowledgeSearchArrayResponse'
        '400':
          description: Bad request - Invalid search query
        '401':
          description: Unauthorized - Invalid or missing API key
        '403':
          description: Forbidden - API key lacks the required permission
        '404':
          description: Knowledge folder not found
        '429':
          description: >-
            Organization exceeded 60 search requests in the current UTC minute.
            Retry after the window resets.
          headers:
            Retry-After:
              description: Seconds until the current rate-limit window resets.
              schema:
                type: integer
                minimum: 1
                maximum: 60
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                    example: Knowledge search rate limit exceeded. Try again later.
        '500':
          description: Server error
        '503':
          description: >-
            The API key could not be checked because of a temporary server
            problem. The key may be valid; retry after `Retry-After` seconds.
          headers:
            Retry-After:
              description: Seconds to wait before retrying.
              schema:
                type: integer
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ServiceUnavailableError'
components:
  examples:
    KnowledgeGroupSearch:
      summary: Find the top 5 chunks matching a query
      value:
        query: How do I reset my password?
        limit: 5
    KnowledgeSearchArrayResponse:
      summary: Search results (bare array, ranked by score)
      value:
        - documentId: 00000000-0000-0000-0000-000000000000
          filename: getting-started.pdf
          content: >-
            To reset your password, visit the account settings page and click
            "Reset password".
          score: 0.87
          chunkIndex: 3
          metadata:
            section: Account
  schemas:
    KnowledgeSearchResult:
      type: object
      description: One matching chunk returned by a knowledge-group search.
      properties:
        documentId:
          type: string
          format: uuid
          description: ID of the document the chunk was extracted from.
        filename:
          type: string
          description: Filename of the source document.
        content:
          type: string
          description: Text content of the matching chunk.
        score:
          type: number
          description: >-
            Similarity score for this chunk against the query, higher is more
            similar.
        chunkIndex:
          type: integer
          description: Zero-based index of the chunk within the source document.
        metadata:
          type: object
          description: Free-form metadata attached to the chunk at ingest time.
    ServiceUnavailableError:
      type: object
      required:
        - error
        - message
      properties:
        error:
          type: string
          example: Service temporarily unavailable
        message:
          type: string
          example: We could not check your API key. Please retry shortly.
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer

````

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