---
title: "List Slowest Queries"
method: GET
path: "/v2/queries/latency/slowest"
tags: ["queries"]
---

# List Slowest Queries

`GET /v2/queries/latency/slowest`

The slowest queries in the window, with ids and durations only.

Sorted by duration in the analytics store, so it costs one bounded read
rather than a walk through chronological history. Pass a `request_id` to
GET /v2/queries/{query_id} to open the query itself.

## Query parameters

- `from` string, nullable
- `to` string, nullable
- `limit` integer
- `collection` string, nullable
- `api_version` string, nullable
- `rerank` string, nullable
- `search_mode` string, nullable
- `has_filter` string, nullable

## Response `200`

Successful Response

- SlowestQueriesResponseV2 — The slowest queries in the window: ids and durations only, never bodies.
  - `generated_at` string, required
  - `queries` SlowestQueryV2[]
    - `collection_name` string, required
    - `duration_ms` integer, required
    - `occurred_at` string, required
    - `query_id` string, nullable — The query id, when the row recorded one.
    - `request_id` string, required — Pass to GET /v2/queries/{query_id} to open the query. Always present.
  - `window` LatencyWindowV2, required
    - `from` string, required — Start of the window, inclusive (UTC).
    - `to` string, required — End of the window, exclusive (UTC).

## Other responses

- `400` — Missing or invalid window, filter value, or bin count.
- `401` — Missing or invalid API key.
- `403` — The API key does not have query permission.
- `422` — Validation Error
- `503` — Analytics are unavailable; no metrics were computed.

## Changes

- **2026-09-24** `61a9364ad042` — 4 breaking, 1 warning, 19 info
  - the response's body type changed from no type to `object` for status `400`
  - the response's body type changed from no type to `object` for status `401`
  - the response's body type changed from no type to `object` for status `403`
  - the response's body type changed from no type to `object` for status `503`
  - …20 more
- **2026-09-17** `6ed36830de71` — 1 info
  - endpoint added

[Change history](https://skmtc.dev/runcaptain/apis/api-reference/changes/v2/queries/latency/slowest/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)
