---
title: "Get User Stats"
method: GET
path: "/api/admin/users/stats"
tags: ["admin"]
---

# Get User Stats

`GET /api/admin/users/stats`

Engagement KPIs plus a daily active-user trend series (admin only).

Active = distinct users with at least one model request in the window.
WAU/MAU are distinct users in the trailing 7/30 days; average DAU is the
mean of the per-day distinct counts over the trailing ``avg_dau_days``
window (zero-activity days included). Stickiness is always the trailing
30-day average DAU over MAU, independent of ``avg_dau_days``. The heatmap
series is scoped to the selected ``days`` lookback. When ``exclude_admins``
is set, Quadrillion staff (admin-email users) are dropped from every count.
All buckets use ``date_trunc`` over UTC timestamps.

## Query parameters

- `days` integer, required
- `avg_dau_days` integer, required
- `exclude_admins` boolean, required

## Response `200`

Successful Response

- AdminUserStatsResponse — Platform user-activity rollup for the admin dashboard. "Active" is keyed on model usage (a ``token_usage`` row), not logins: a session-bearing user who never runs the agent isn't active in any sense that matters for this product. Two families of numbers ship together: * Engagement KPIs (``average_dau``/``wau``/``mau``/``stickiness``). ``wau`` and ``mau`` are distinct active users in the trailing 7/30 days (the standard Amplitude/Mixpanel definitions). ``average_dau`` is the mean daily active users over the trailing ``average_dau_days`` window (a single day is too noisy to headline). ``stickiness`` is always the trailing 30-day average DAU over ``mau``, regardless of ``average_dau_days``. * Trend data (``daily_active_users``) is the per-day distinct-user series scoped to the caller-selected ``range_days`` lookback; it drives the activity heatmap. The series is sparse (zero-activity days omitted), so callers averaging it must divide by ``range_days``, not by its length.
  - `total_users` integer, required
  - `range_days` integer, required
  - `daily_active_users` DailyActiveUsers[], required
    - `date` string, date, required
    - `active_users` integer, required
  - `average_dau` number, required
  - `average_dau_days` integer, required
  - `wau` integer, required
  - `mau` integer, required
  - `stickiness` number, required

## Other responses

- `422` — Validation Error

---

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