---
title: "Query Rag Data"
method: POST
path: "/api/v3/rag/query"
tags: ["RAG"]
---

# Query Rag Data

`POST /api/v3/rag/query`

Query RAG data

Args:
    unique_id: Institution's unique ID (e.g., "k12_602442")
    search_category: Category to search (e.g., meeting_minutes, procurement_guidelines, youtube)
    preprocessed_data: Output from the /rag/preprocess endpoint

Returns:
    RAG response with content, citations, and summary

## Request body

- RagQueryRequest
  - `unique_id` string, required
  - `search_category` string, required
  - `preprocessed_data` object, required

## Response `200`

Successful Response

- RagQueryResponse
  - `type` string, required
  - `content` string, required
  - `citations` object[], required
  - `summary` string, required
  - `is_starred` boolean, required

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.net/nationgraph/apis/nationgraph-api.md) · [All operations](https://skmtc.net/nationgraph/apis/nationgraph-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/nationgraph/nationgraph-api/revisions/85804e68d86d/schema)
