---
title: "Get last 7 days stats"
method: GET
path: "/api/hackatime/v1/users/current/stats/last_7_days"
tags: ["WakaTime Compatibility"]
---

# Get last 7 days stats

`GET /api/hackatime/v1/users/current/stats/last_7_days`

Returns coding statistics for the last 7 days. Used by some WakaTime dashboards.

## Response `200`

successful

- object
  - `data` object
    - `username` string
    - `user_id` string
    - `start` string, date_time
    - `end` string, date_time
    - `status` string
    - `total_seconds` number
    - `daily_average` number
    - `days_including_holidays` integer
    - `range` string
    - `human_readable_range` string
    - `human_readable_total` string
    - `human_readable_daily_average` string
    - `is_coding_activity_visible` boolean
    - `is_other_usage_visible` boolean
    - `editors` object[]
      - `name` string
      - `total_seconds` integer
      - `percent` number
      - `digital` string
      - `text` string
      - `hours` integer
      - `minutes` integer
      - `seconds` integer
    - `languages` object[]
      - `name` string
      - `total_seconds` integer
      - `percent` number
      - `digital` string
      - `text` string
      - `hours` integer
      - `minutes` integer
      - `seconds` integer
    - `machines` object[]
      - `name` string
      - `total_seconds` integer
      - `percent` number
      - `digital` string
      - `text` string
      - `hours` integer
      - `minutes` integer
      - `seconds` integer
    - `projects` object[]
      - `name` string
      - `total_seconds` integer
      - `percent` number
      - `digital` string
      - `text` string
      - `hours` integer
      - `minutes` integer
      - `seconds` integer
    - `operating_systems` object[]
      - `name` string
      - `total_seconds` integer
      - `percent` number
      - `digital` string
      - `text` string
      - `hours` integer
      - `minutes` integer
      - `seconds` integer
    - `categories` object[]
      - `name` string
      - `total_seconds` integer
      - `percent` number
      - `digital` string
      - `text` string
      - `hours` integer
      - `minutes` integer
      - `seconds` integer

## Other responses

- `401` — unauthorized

---

[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/172c35ec816f/schema)
