Need help with your APIs? I offer API discovery, governance & evangelism services. Explore services →
API Evangelist API Evangelist
Discovery
Learnings
Guidance
Toolbox
Alignment
API Evangelist LLC

WakaTime Stats API

User-wide statistics over preset and custom ranges.

WakaTime Stats API is one of 20 APIs that WakaTime publishes on the APIs.io network, described by a machine-readable OpenAPI specification.

This API exposes 4 JSON Schema definitions.

Tagged areas include Stats. The published artifact set on APIs.io includes an OpenAPI specification, API documentation, authentication docs, rate-limit docs, a changelog, a status page, and 4 JSON Schemas.

This API exposes 5 operations across 5 paths, and defines 3 schemas. It is described by OpenAPI 3.0.3, at version v1.

Requests are made against 2 base URLs: https://wakatime.com/api/v1, https://api.wakatime.com/api/v1.

5 operations 5 paths 3 schemas 5 GET

Metadata

The identity and technical contract details declared by the specification.

Specification
OpenAPI 3.0.3
API Version
v1
Base URL
https://wakatime.com/api/v1/
Authentication
OAuth 2.0, HTTP Basic, HTTP Bearer
Terms of Service
Resource Areas
1

Authentication & Security 3

WakaTime Stats API declares 3 security schemes for authenticating requests. It supports OAuth 2.0 (oauth2) using the authorizationCode and implicit flows, exposing 8 scopes. It accepts HTTP basic authentication (apiKey). It accepts HTTP bearer tokens (bearerAuth). By default, every request must be authenticated.

  • oauth2 — OAuth 2.0 authorization code flow.
  • apiKey — HTTP Basic with the WakaTime API key as the username. Alternatively, pass ?apikey=... as a query parameter.
  • bearerAuth — OAuth access token in the Authorization header as Bearer wakatok....

Paths & Operations 5

Across 5 paths, the API surfaces 5 operations — 5 GET. Each is listed below with its method, path, parameters, and response codes.

Stats 5

User-wide statistics over preset and custom ranges.

GET
/users/current/all_time_since_today
Get All Time Since Today
getAllTimeSinceTodayCurrent 1 param → 200
GET
/users/{user}/all_time_since_today
Get User All Time Since Today
getAllTimeSinceToday 2 params → 200
GET
/users/current/stats
Get Stats For Range
getStatsForRange 5 params → 200202
GET
/users/current/stats/{range}
Get Stats By Named Range
getStatsByRange 1 param → 200202
GET
/users/current/stats_aggregated
Get Stats Aggregated
getStatsAggregated 1 param → 200

Schemas 3

The contract defines 3 schemas that model the data the API accepts and returns. The most detailed are Stats (31 properties), SummaryBreakdown (10 properties), AllTimeSinceToday (7 properties). Each schema is shown below with its type and property counts.

Stats
object
31 properties
AllTimeSinceToday
object
7 properties
SummaryBreakdown
object
10 properties

Specification

The full machine-readable OpenAPI contract behind this narrative.

Source

wakatime-stats-api-openapi.yml Raw ↑

Other APIs WakaTime publishes across the network.

WakaTime Commits API
WakaTime Custom Rules API
WakaTime Data Dumps API
WakaTime Durations API
WakaTime Editors API
WakaTime External Durations API
WakaTime Goals API
WakaTime Heartbeats API
WakaTime Insights API
WakaTime Languages API
WakaTime Leaderboards API
WakaTime Machines API