Get user stats
Returns detailed coding stats for a specific user, including languages, projects, and total time.
Authentication is OPTIONAL: the endpoint is publicly accessible (no token) whenever the target user has public stats lookup enabled. When a User API Key is supplied it is used to resolve the special username "my" and to grant access to the caller's own private stats.
When total_seconds=true, the response shape is instead { "total_seconds": <number> }.
Path parameters
Username, Slack ID, or User ID. The literal value "my" resolves the current user from the Authorization Bearer token (User API Key).
Query parameters
Start date/time (ISO 8601), defaults to 10 years ago
End date/time (ISO 8601), defaults to end of today
Limit number of results
Comma-separated list of features to include (e.g., languages,projects). Defaults to languages.
Filter results by specific project names (comma-separated)
Filter results by category (comma-separated)
Use boundary aware calculation (only applied in the total_seconds branch)
When "true", returns only { total_seconds: <number> } instead of the full stats object
When "true", excludes the "ai coding" category from totals/summary. Caveat: heartbeats with no category at all (legacy data) are also excluded due to SQL NULL-comparison semantics.
When "true", switches to test mode: forces boundary-aware + valid-timestamps-only and excludes the browsing/meeting/communicating categories (plus "ai coding" when no_ai_coding=true)
Response
successful
Example response
{
"data": {
"total_seconds": 3600,
"daily_average": 1800,
"languages": [
{
"name": "Ruby",
"total_seconds": 2400,
"percent": 66.6
}
],
"projects": [
{
"name": "hackatime",
"total_seconds": 3600,
"percent": 100
}
],
"editors": [
{
"name": "VS Code",
"total_seconds": 3600,
"percent": 100
}
],
"streak": 7,
"unique_total_seconds": 12960
},
"trust_factor": {
"trust_level": "blue"
}
}