---
title: "Search Knowledge"
method: POST
path: "/knowledge/search"
tags: ["Knowledge"]
---

# Search Knowledge

`POST /knowledge/search`

Search the knowledge base for relevant documents using query, filters and search type.

## Request body

- VectorSearchRequestSchema — Schema for vector search request.
  - `query` string, required — The search query text
  - `db_id` string, nullable — Database ID to search in
  - `knowledge_id` string, nullable — Knowledge base ID to search in
  - `vector_db_ids` string[], nullable — List of vector database IDs to search in
  - `search_type` string, nullable — The type of search to perform (vector, keyword, hybrid)
  - `max_results` integer, nullable — The maximum number of results to return
  - `filters` object, nullable — Filters to apply to the search results
  - `meta` Meta — Inline metadata schema for pagination.
    - `limit` integer — Number of results per page
    - `page` integer — Page number

## Response `200`

Search results retrieved successfully

- PaginatedResponseVectorSearchResult
  - `data` VectorSearchResult[], required — List of items for the current page
    - `id` string, required — Unique identifier for the search result document
    - `content` string, required — Content text of the document
    - `name` string, nullable — Name of the document
    - `meta_data` object, nullable — Metadata associated with the document
    - `usage` object, nullable — Usage statistics (e.g., token counts)
    - `reranking_score` number, nullable — Reranking score for relevance
    - `content_id` string, nullable — ID of the source content
    - `content_origin` string, nullable — Origin URL or source of the content
    - `size` integer, nullable — Size of the content in bytes
  - `meta` PaginationInfo, required
    - `page` integer — Current page number (0-indexed)
    - `limit` integer — Number of items per page
    - `total_pages` integer — Total number of pages
    - `total_count` integer — Total count of items
    - `search_time_ms` number — Search execution time in milliseconds

## Other responses

- `400` — Invalid search parameters
- `401` — Unauthorized
- `404` — No documents found
- `422` — Validation Error
- `500` — Internal Server Error

---

[API](https://skmtc.net/agno/apis/agno-api-reference.md) · [All operations](https://skmtc.net/agno/apis/agno-api-reference/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/agno/agno-api-reference/versions/5f6149d395d0/schema)
