---
title: "Get top queries"
method: GET
path: "/v0/admin/stats/top-queries"
tags: ["Admin"]
---

# Get top queries

`GET /v0/admin/stats/top-queries`

## Request

- Base URL: `https://docs.quivr.thevibecompany.co` (the document declares no server; this is the origin it was published from)
- URL: `https://docs.quivr.thevibecompany.co/v0/admin/stats/top-queries`
- Auth: HTTP bearer

The most frequent search queries of the key's Organization over the window, normalized (lowercased, white space collapsed, at most 200 characters) and counted per hour, each with its hourly counts. Query text is recorded only when the deployment sets observability.record_query_text; otherwise recording is false and the list is empty. Requires observability:read on a key that grants every Corpus.

## Query parameters

- `window` '1h' | '24h' | '7d'
- `limit` integer

## Response `200`

Successful response

- TopQueryList
  - `window` '1h' | '24h' | '7d', required
  - `resolution_seconds` integer, required: Length of a bucket of points; query text is counted per hour.
  - `recording` boolean, required: Whether this deployment records query text (observability.record_query_text).
  - `items` TopQuery[], required: Most frequent first.
    - `query` string, required
    - `count` integer, required
    - `points` CountPoint[], required: Non-empty hourly buckets, oldest first.
      - `start` string, date-time, required
      - `count` integer, required

## Other responses

- `default`: Structured error; 401 unauthenticated, 403 without observability:read on every Corpus, 422 invalid_window or invalid_limit, 503 storage unavailable.

---

[API](https://skmtc.dev/thevibecompany/apis/quivr-http-api.md) - [All operations](https://skmtc.dev/thevibecompany/apis/quivr-http-api/llms.txt) - [OpenAPI document](https://skmtc.dev/thevibecompany/apis/quivr-http-api/revisions/4f4e30ba8f4e?raw)
