---
title: "search knowledge group"
method: POST
path: "/v1/knowledge/groups/{id}/search"
tags: ["Knowledge"]
---

# search knowledge group

`POST /v1/knowledge/groups/{id}/search`

Search for similar content in a RAG group using vector similarity

## Path parameters

- `id` string, required

## Request body

- object
  - `query` string, required
  - `limit` integer

## Response `200`

Successfully retrieved search results

- KnowledgeSearchResult[]
  - `documentId` string, uuid — ID of the document the chunk was extracted from.
  - `filename` string — Filename of the source document.
  - `content` string — Text content of the matching chunk.
  - `score` number — Similarity score for this chunk against the query, higher is more similar.
  - `chunkIndex` integer — Zero-based index of the chunk within the source document.
  - `metadata` object — Free-form metadata attached to the chunk at ingest time.

## Other responses

- `400` — Bad request - Invalid search query
- `401` — Unauthorized - Invalid or missing API key
- `403` — Forbidden - API key lacks the required permission
- `404` — RAG group not found
- `500` — Server error

---

[API](https://skmtc.net/anam/apis/anam-ai-api.md) · [All operations](https://skmtc.net/anam/apis/anam-ai-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/anam/anam-ai-api/versions/67afd1c5db59/schema)
