---
title: "Test Search"
method: POST
path: "/api/v1/knowledge-bases/{kb_id}/search"
tags: ["Knowledge Bases", "Knowledge Bases"]
---

# Test Search

`POST /api/v1/knowledge-bases/{kb_id}/search`

Test search against a knowledge base.

For debugging and previewing results before connecting to an agent.

## Path parameters

- `kb_id` string, uuid, required

## Request body

- SearchRequest
  - `query` string, required
  - `limit` integer
  - `min_score` number

## Response `200`

Successful Response

- SearchResponse
  - `results` SearchResultItem[], required
    - `content` string, required
    - `document_title` string, required
    - `similarity` number, required
    - `chunk_index` integer, required
  - `query_time_ms` integer, required

## Other responses

- `422` — Validation Error

## Changes

> 24 revisions in range; 1 not diffed.

- **2026-09-03** `d65b8fefae34` — 2 info
  - added the optional property `detail/items/ctx` to the response with the `422` status
  - added the optional property `detail/items/input` to the response with the `422` status

[Change history](https://skmtc.dev/getanana/apis/cleon-api/changes/api/v1/knowledge-bases/:kb_id/search/post.md)

---

[API](https://skmtc.dev/getanana/apis/cleon-api.md) · [All operations](https://skmtc.dev/getanana/apis/cleon-api/llms.txt) · [OpenAPI document](https://skmtc.dev/getanana/apis/cleon-api/revisions/ae7627cd46da?raw)
