---
title: "Research Query"
method: POST
path: "/api/research/query"
tags: ["research"]
---

# Research Query

`POST /api/research/query`

## Request

- Base URL: `https://fojin.app` (the document declares no server; this is the origin it was published from)
- URL: `https://fojin.app/api/research/query`
- Auth: HTTP bearer

Run the multi-step research agent for one question.

Returns the plan (how the question was decomposed), the deduplicated cited
sources (each with a URN), the synthesized answer, and the deterministic
trust status of that answer.

## Request body

- ResearchRequest
  - `question` string, required
  - `max_steps` integer

## Response `200`

Successful Response

- ResearchReport
  - `question` string, required
  - `plan` ResearchStep[], required
    - `tool` string
    - `query` string, required
    - `aspect` string
    - `num_sources` integer
  - `answer` string, required
  - `sources` ChatSource[], required
    - `text_id` integer, required
    - `juan_num` integer, required
    - `chunk_index` integer
    - `chunk_text` string, required
    - `score` number, required
    - `title_zh` string
    - `lang` string
    - `source_id` integer, nullable
    - `parallel_chunks` ParallelChunk[]
      - `text_id` integer, required
      - `juan_num` integer, required
      - `chunk_index` integer, required
      - `chunk_text` string, required
      - `lang` string, required
      - `title` string
      - `confidence` number
      - `urn` string, nullable
    - `urn` string, nullable
    - `located` boolean
    - `located_window` string, nullable
    - `located_texts` integer, nullable
  - `references` ResearchReference[]
    - `kind` string, required
    - `term` string, required
    - `detail` string
    - `source` string, nullable
  - `trust_status` ChatTrustStatus
    - `state` 'verified' | 'citation_corrected' | 'quote_relaxed' | 'quote_unverified' | 'sources_available' | 'no_sources', required
    - `citation_count` integer
    - `source_count` integer
    - `citation_mutation_count` integer
    - `quote_mutation_count` integer
    - `quote_checked_count` integer, nullable
    - `checked_quotes` ChatCheckedQuote[], nullable
      - `title` string, required
      - `juan` integer, nullable
      - `quote` string, required
    - `max_source_score` number, nullable
    - `min_source_score` number, nullable

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/fojin/apis/fojin-api-buddhist-digital-text-platform.md) · [All operations](https://skmtc.dev/fojin/apis/fojin-api-buddhist-digital-text-platform/llms.txt) · [OpenAPI document](https://skmtc.dev/fojin/apis/fojin-api-buddhist-digital-text-platform/revisions/969714238c61?raw)
