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

# Search knowledge documents

> Search through knowledge base documents using vector search and reranking.
Returns matching documents from help-center articles, FAQs/snippets, websites, news, YouTube videos,
and code knowledge. `limit` caps the number of returned documents; retrieval returns at most 10
documents regardless of a higher limit.



## OpenAPI

````yaml https://api.gleap.io/api-docs.json post /knowledge/search
openapi: 3.0.0
info:
  title: gleap-server
  version: 14.0.0
  contact: {}
servers:
  - url: https://api.gleap.io/v3
security: []
paths:
  /knowledge/search:
    post:
      tags:
        - Knowledge
      summary: Search knowledge documents
      description: >-
        Search through knowledge base documents using vector search and
        reranking.

        Returns matching documents from help-center articles, FAQs/snippets,
        websites, news, YouTube videos,

        and code knowledge. `limit` caps the number of returned documents;
        retrieval returns at most 10

        documents regardless of a higher limit.
      operationId: SearchKnowledge
      parameters:
        - in: header
          name: project
          required: true
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/KnowledgeSearchDto'
      responses:
        '200':
          description: Ok
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/KnowledgeSearchResponse'
      security:
        - jwt: []
components:
  schemas:
    KnowledgeSearchDto:
      properties:
        query:
          type: string
        documentTypeFilter:
          type: string
        internally:
          type: boolean
        lang:
          type: string
        limit:
          type: number
          format: double
          description: >-
            Max documents to return. Values above 10 have no effect; retrieval
            is capped at 10.
        scope:
          properties:
            tags:
              items:
                type: string
              type: array
            mode:
              type: string
              enum:
                - all
                - include
                - exclude
          required:
            - mode
          type: object
      required:
        - query
      type: object
      additionalProperties: false
    KnowledgeSearchResponse:
      properties:
        results:
          items:
            $ref: '#/components/schemas/KnowledgeSearchResult'
          type: array
        count:
          type: number
          format: double
      required:
        - results
        - count
      type: object
      additionalProperties: false
    KnowledgeSearchResult:
      properties:
        sourceId:
          type: string
        sourceType:
          type: string
        title:
          type: string
        content:
          type: string
        url:
          type: string
      required:
        - sourceId
        - sourceType
        - content
      type: object
      additionalProperties: false
  securitySchemes:
    jwt:
      type: http
      scheme: bearer
      bearerFormat: JWT

````