---
title: "Search In Knowledge Base"
method: GET
path: "/v1/knowledge/{kb_id}/search"
tags: ["API v1", "Knowledge", "Knowledge Search"]
---

# Search In Knowledge Base

`GET /v1/knowledge/{kb_id}/search`

## Request

- Base URL: `https://api.xpander.ai` (the document declares no server; this is the origin it was published from)
- URL: `https://api.xpander.ai/v1/knowledge/{kb_id}/search`
- Auth: API key in header `x-api-key`

Searches using vector search in knowledge base

## Path parameters

- `kb_id` string, required

## Query parameters

- `search_query` string, required: Query to search in the VDB
- `use_bubble` boolean, nullable: Should use bubble search to return the result capped
- `bubble_size` integer, nullable: Bubble size (padding + result + margin)
- `top_k` integer, nullable: Top K Results
- `agent_id` string, nullable: Search as this agent, the way its knowledge base tool does (the knowledge base must be attached to it and your key allowed to use it). Applies to a knowledge base on the Company Brain; otherwise ignored.

## Response `200`

Successful Response

- VectorSearchResult[]
  - `content` string, required: The content of the document
  - `score` number, required: The search result score

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/xpander/apis/xpander-ai-api-service.md) - [All operations](https://skmtc.dev/xpander/apis/xpander-ai-api-service/llms.txt) - [OpenAPI document](https://skmtc.dev/xpander/apis/xpander-ai-api-service/revisions/725c0066d5df?raw)
