---
title: "Query using RAG Search"
method: POST
path: "/rag/query"
---

# Query using RAG Search

`POST /rag/query`

Query across your connected data sources using RAG Search

## Headers

- `x-connection-token` string, required

## Request body

- QueryBody
  - `query` string, required — The query you want to received embeddings and chunks for
  - `topK` number, nullable — The number of most appropriate documents for your query.

## Response `201`

- RagQueryOutput[]
  - `chunk` string, required — The chunk which matches the embed query
  - `metadata` object, nullable, required — The metadata tied to the chunk
  - `score` number, nullable, required — The score
  - `embedding` number[], nullable, required — The embedding of the relevant chunk

## Changes

- **2024-09-18** `9ecc30d6d106` — 1 breaking
  - the response's body type changed from `object` to `array` for status `201`
- **2024-09-17** `99f46b0a20cd` — 1 breaking, 1 info
  - added required request body
  - api operation id `RagController_queryEmbeddings` removed and replaced with `query`
- **2024-09-16** `300e4b27a636` — 1 breaking
  - added the new required `header` request parameter `x-connection-token`
- **2024-09-13** `65542da8b7dc` — 1 info
  - endpoint added

[Change history](https://skmtc.dev/panoratech/apis/panora-api/changes/rag/query/post.md)

---

[API](https://skmtc.dev/panoratech/apis/panora-api.md) · [All operations](https://skmtc.dev/panoratech/apis/panora-api/llms.txt) · [OpenAPI document](https://skmtc.dev/panoratech/apis/panora-api/revisions/634ca9b624aa?raw)
