---
title: "Get Query"
method: GET
path: "/v2/queries/{query_id}"
tags: ["queries"]
---

# Get Query

`GET /v2/queries/{query_id}`

One stored query with its request body, response body and the retrieved chunks in one normalised shape (`results[]`: rank, score, text, filename, document id and a page, time or sheet location, whether the query ran on v2 or v3).

`query_id` is the id from `GET /v2/queries` or the `query_id` field of a query response. The `request_id` a query response returns (`req_...`) is accepted in its place, so a query can be fetched straight after running it.

`body_status` says what came back: `available`, `archived` (bodies are archived 90 days after the query and only the summary remains) or `missing`. A query from another organization or environment is a 404, the same as an unknown id.

## Path parameters

- `query_id` string, required

## Headers

- `authorization` string, nullable

## Response `200`

Successful Response

- QueryDetailV2
  - `query_id` string, required
  - `query_text` string, nullable
  - `collection_name` string, nullable
  - `environment` string, nullable
  - `status` string, nullable
  - `api_version` string, nullable
  - `created_at` string, nullable
  - `latency_ms` integer, nullable
  - `result_count` integer, nullable
  - `request_id` string, nullable
  - `params` QueryParamsV2
    - `limit` integer, nullable
    - `semantic_ratio` number, double, nullable
    - `has_filter` boolean, nullable
    - `has_boost` boolean, nullable
    - `exclude_chunk_types` string[], nullable
    - `include` QueryParamsV2Include
  - `results` QueryResultV2[], nullable
    - `rank` integer, required
    - `chunk_id` string, nullable
    - `score` number, double, nullable
    - `rerank_score` number, double, nullable
    - `text` string
    - `filename` string, nullable
    - `document_id` string, nullable
    - `modality` string, nullable
    - `chunk_type` string, nullable
    - `location` QueryResultLocationV2
      - `page_start` integer, nullable
      - `page_end` integer, nullable
      - `start_seconds` number, double, nullable
      - `end_seconds` number, double, nullable
      - `sheet_name` string, nullable
      - `row_start` integer, nullable
  - `request` QueryDetailV2Request
  - `response` QueryDetailV2Response
  - `body_status` string, required
  - `error_message` string, nullable
  - `error_type` string, nullable

## Other responses

- `401` — Missing or invalid API key
- `403` — The API key does not have query permission
- `404` — No query with this id (query_id or request_id) in the key's organization and environment.

## Changes

- **2026-09-24** `61a9364ad042` — 1 breaking, 2 warning, 2 info
  - removed the required property `error` from the response with the `404` status
  - removed the optional property `details` from the response with the `404` status
  - removed the optional property `success` from the response with the `404` status
  - the response property `path` became required for the status `404`
  - …1 more
- **2026-09-12** `d07ce3783494` — 1 info
  - api operation id `get-query-v-2` removed and replaced with `queries_get_query_v2`
- **2026-09-08** `8a4e045bc3fa` — 1 info
  - endpoint added

[Change history](https://skmtc.dev/runcaptain/apis/api-reference/changes/v2/queries/:query_id/get.md)

---

[API](https://skmtc.dev/runcaptain/apis/api-reference.md) · [All operations](https://skmtc.dev/runcaptain/apis/api-reference/llms.txt) · [OpenAPI document](https://skmtc.dev/runcaptain/apis/api-reference/revisions/ac61e472bb7d?raw)
