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

# Semantic search knowledge base items

> Search knowledge base items using semantic similarity



## OpenAPI

````yaml post /api/consume/search
openapi: 3.0.3
info:
  title: Graphite API Documentation
  description: API documentation for Graphite
  version: 1.0.0
servers: []
security: []
paths:
  /api/consume/search:
    post:
      summary: Semantic search knowledge base items
      description: Search knowledge base items using semantic similarity
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RetrieveKnowledgebaseItemsInputSchema'
      responses:
        '200':
          description: Default Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RetrieveKnowledgebaseItemsResponseSchema'
        '401':
          description: Default Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Default Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
components:
  schemas:
    RetrieveKnowledgebaseItemsInputSchema:
      type: object
      properties:
        limit:
          type: number
          minimum: 1
          maximum: 10
        visibility:
          type: string
          enum:
            - public
            - internal
        tenantId:
          type: string
        tags:
          type: array
          items:
            type: string
        cosineDistanceThreshold:
          type: number
          minimum: 0
          maximum: 1
          default: 0.5
        query:
          type: string
      required:
        - limit
        - tenantId
        - query
    RetrieveKnowledgebaseItemsResponseSchema:
      type: object
      properties:
        result:
          type: array
          items:
            type: object
            properties:
              title:
                type: string
                description: The title of the knowledgebase item
              source_url:
                type: string
                nullable: true
                description: The source URL (if the item is from a web page)
              visibility:
                type: string
                enum:
                  - public
                  - internal
              distance:
                type: number
              chunk_index:
                type: number
              chunk_plain_text:
                type: string
              source_type:
                type: string
                enum:
                  - integration
                  - web_crawl
              source_table_name:
                type: string
                nullable: true
              embedding:
                type: string
            required:
              - title
              - source_url
              - visibility
              - distance
              - chunk_index
              - chunk_plain_text
              - source_type
              - source_table_name
              - embedding
      required:
        - result
    ErrorResponse:
      type: object
      properties:
        error:
          type: string
        message:
          type: string
      required:
        - error
        - message

````