---
title: "Semantic search across training and knowledge base"
method: POST
path: "/training/search"
---

# Semantic search across training and knowledge base

`POST /training/search`

Search across all training scenarios and knowledge base items using natural language. Returns results ranked by semantic relevance with a 0-100 relevance score. Use this to find existing content before creating new training scenarios.

## Request body

- SearchTrainingKnowledgeInputDto
  - `query` string, required
  - `limit` number
  - `visibility` string[]
  - `sourceTypes` string[]
  - `dataSources` string[]
  - `sortBy` 'relevance' | 'handoffs' | 'citations'
  - `dateFrom` unknown
  - `dateTo` unknown
  - `include_content` boolean — Include the full content field in results. Set to false to reduce response size.

## Response `200`

Default Response

- SearchTrainingKnowledgeResponseDto
  - `results` object[], required
    - `id` string, required
    - `title` string, required
    - `visibility` 'internal' | 'public', required
    - `source_type` 'custom_training' | 'help_center' | 'integration' | 'website' | 'workflow', required
    - `source_url` string, nullable, required
    - `updated_at` string, date-time, required
    - `content` string
    - `data_source` 'confluence' | 'notion' | 'zendesk_support' | 'shopify' | 'gitbook' | 'intercom' | 'front' | 'freshdesk' | 'hubspot_kb' | 'ai_instructions' | 'custom_training' | 'website' | 'workflow', required
    - `stream` string, nullable, required
    - `relevance_score` number, required
    - `directory_id` string, nullable, required
    - `directory_name` string, nullable, required
    - `is_draft` boolean
    - `usage_count` integer, required
    - `restricted_to_segments` string[]
    - `restricted_to_channels` string[]
    - `start_time` string, date-time, nullable
    - `end_time` string, date-time, nullable
    - `content_preview` string, required — First 500 characters of content
  - `total_count` number, required

## Other responses

- `500` — Internal Server Error

---

[API](https://skmtc.net/open/apis/opencx-api.md) · [All operations](https://skmtc.net/open/apis/opencx-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/open/opencx-api/revisions/57b06b52302d/schema)
