---
title: "Search current active indexed knowledge"
method: POST
path: "/knowledge/sources/search"
---

# Search current active indexed knowledge

`POST /knowledge/sources/search`

## Request

- Base URL: `https://platform-api.visitoai.com/m2m/v1`
- URL: `https://platform-api.visitoai.com/m2m/v1/knowledge/sources/search`
- Auth: HTTP bearer

Semantic lookup in current active knowledge (up to twenty chunks), including returned sourceId/chunkId for get_knowledge_source/get_knowledge_chunk. Omitted scope filters search the whole connected business; propertyIds selects properties and includeGlobal controls shared knowledge (default true when scoped). This may call the embedding provider. mode=fallback_all means a bounded unranked fallback, not a successful semantic match; totalActive is an eligible count, not returned count. This differs from the runtime planner/scanner and never reproduces a saved answer. Use get_conversation_answer_trace for saved evidence before a new lookup. Inactive knowledge and asset-only uploads are excluded. Required permission: knowledge:read. Connected business only; no tenant override.

## Request body

- KnowledgeSearchInput
  - `query` string, required: Search terms for current active indexed knowledge. This performs a new semantic lookup; it is not a saved-answer replay.
  - `topK` integer
  - `sourceType` 'text' | 'file' | 'url'
  - `propertyIds` string[]
  - `includeGlobal` boolean

## Response `200`

Success

- KnowledgeSearch
  - `mode` 'vector' | 'all' | 'fallback_all' | 'empty_query', required
  - `totalActive` integer, required
  - `chunks` KnowledgeSearchChunk[], required
    - `chunkId` string
    - `chunkIndex` integer
    - `sourceId` string, required
    - `sourceType` 'text' | 'file' | 'url', required
    - `propertyId` string
    - `propertyName` string
    - `title` string
    - `text` string, required
    - `score` number
    - `url` string
    - `tokens` integer

## Other responses

- `400`: Invalid request
- `403`: Missing permission
- `404`: Resource not found
- `409`: Conflict; read state and reconcile

---

[API](https://skmtc.dev/visitoai/apis/visito-m2m-api.md) - [All operations](https://skmtc.dev/visitoai/apis/visito-m2m-api/llms.txt) - [OpenAPI document](https://skmtc.dev/visitoai/apis/visito-m2m-api/revisions/98377d35c234?raw)
