# Statistics ## `GET /api/stats` **Get guild stats** Returns guild-wide activity totals, trend, heatmap, leaderboards, and who's gone quiet, over the given window. An officer must be signed in. **Parameters** | Name | In | Type | Required | Description | |---|---|---|---|---| | `range` | query | {ref}`StatsRange ` | no | The stats window. | **Response `200` — The guild's stats for the window.** Model: {ref}`GuildStats ` | Field | Type | Required | Description | |---|---|---|---| | `range` | {ref}`StatsRange ` | yes | | | `since` | string (date-time) \| null | yes | Start of the window; `null` for `all`. | | `tracking_since` | string (date-time) \| null | yes | Earliest hour the bot has ever recorded activity for. | | `totals` | {ref}`StatsTotals ` | yes | | | `previous` | {ref}`StatsTotals ` \| null | yes | The same-length window right before `since`, for a trend comparison; `null` for `all`. | | `trend_bucket` | string | yes | `day` for 7d/30d, Monday-start `week` for 90d/all. | | `trend` | array of {ref}`StatsTrendPoint ` | yes | Oldest first, zero-filled across the window (`all`: from `tracking_since`). | | `heatmap` | array of {ref}`StatsHourCell ` | yes | Non-zero weekday/hour cells only. | | `top_chatters` | array of {ref}`StatsLeader ` | yes | Highest message count, max 10. | | `top_voice` | array of {ref}`StatsLeader ` | yes | Most voice minutes, max 10. | | `top_events` | array of {ref}`StatsLeader ` | yes | Most attended events, max 10. | | `top_groups` | array of {ref}`StatsLeader ` | yes | Most counted #lfg groups joined, max 10. | | `top_xp` | array of {ref}`StatsLeader ` | yes | Most XP gained in the window, max 10. | | `gone_quiet` | array of {ref}`StatsQuietMember ` | yes | Roster members still in the guild with no messages, voice, or attended event in the last 30 days (independent of `range`). Never-active first, then oldest last-active, max 25. |