---
title: "Search RAG knowledge base"
method: GET
path: "/rag/search"
tags: ["RAG"]
---

# Search RAG knowledge base

`GET /rag/search`

## Request

- Base URL: `https://api.llm-broker.net`
- URL: `https://api.llm-broker.net/rag/search`
- Auth: HTTP bearer

## Query parameters

- `q` string, required
- `lang` string
- `source_type` string
- `top_k` integer

## Response `200`

Search results

- RagSearchResponse
  - `citations` object[], nullable
  - `ok` boolean
  - `retrieved` integer: Number of retrieved documents
  - `system_message` string[]

---

[API](https://skmtc.dev/llm-broker/apis/astrioncore-core-api.md) · [All operations](https://skmtc.dev/llm-broker/apis/astrioncore-core-api/llms.txt) · [OpenAPI document](https://skmtc.dev/llm-broker/apis/astrioncore-core-api/revisions/f85835487bf5?raw)
