---
title: "Get admin user stats"
method: GET
path: "/api/admin/v1/user/stats"
tags: ["Admin Utils"]
---

# Get admin user stats

`GET /api/admin/v1/user/stats`

Get detailed stats for a user (Admin view).

## Query parameters

- `user_id` string

## Response `200`

successful

- object
  - `user_id` integer
  - `username` string
  - `date` string, date_time
  - `timezone` string, nullable
  - `total_heartbeats` integer
  - `total_duration` number
  - `heartbeats` object[]
    - `id` integer
    - `time` string
    - `created_at` string, date_time
    - `project` string, nullable
    - `branch` string, nullable
    - `category` string, nullable
    - `dependencies` string, nullable
    - `editor` string, nullable
    - `entity` string, nullable
    - `language` string, nullable
    - `machine` string, nullable
    - `operating_system` string, nullable
    - `type` string, nullable
    - `user_agent` string, nullable
    - `line_additions` integer, nullable
    - `line_deletions` integer, nullable
    - `lineno` integer, nullable
    - `lines` integer, nullable
    - `cursorpos` integer, nullable
    - `project_root_count` integer, nullable
    - `is_write` boolean, nullable
    - `source_type` string, nullable
    - `ysws_program` string, nullable
    - `ip_address` string, nullable

## Other responses

- `404` — user not found

## Changes

- **2026-01-27** (v1) `b6d6849481da` — 1 info
  - endpoint added

[Change history](https://skmtc.dev/hackclub/apis/hackatime-api/changes/api/admin/v1/user/stats/get.md)

---

[API](https://skmtc.dev/hackclub/apis/hackatime-api.md) · [All operations](https://skmtc.dev/hackclub/apis/hackatime-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/hackclub/hackatime-api/revisions/b6d6849481da/schema)
