WakaTime · JSON Structure

Wakatime Heartbeat Structure

WakaTime heartbeat — the atomic unit of automated coding-time tracking. Emitted by an editor plugin on each file change or save.

Type: object Properties: 21
Developer ProductivityDeveloper ToolsTime TrackingCoding AnalyticsLeaderboardsIDE PluginsOpen-SourcePublic APIs

WakatimeHeartbeat is a JSON Structure definition published by WakaTime, describing 21 properties. It conforms to the https://json-structure.org/2025-08-draft/ meta-schema.

Properties

id user_id entity type category time project project_root_count branch language dependencies lines line_additions line_deletions lineno cursorpos is_write machine_name_id user_agent_id created_at modified_at

Meta-schema: https://json-structure.org/2025-08-draft/

JSON Structure

Raw ↑
{
  "$schema": "https://json-structure.org/2025-08-draft/",
  "$id": "https://raw.githubusercontent.com/api-evangelist/wakatime/main/json-structure/wakatime-heartbeat-structure.json",
  "name": "WakatimeHeartbeat",
  "type": "object",
  "description": "WakaTime heartbeat — the atomic unit of automated coding-time tracking. Emitted by an editor plugin on each file change or save.",
  "properties": {
    "id":                  { "type": "string", "description": "WakaTime-assigned heartbeat id." },
    "user_id":             { "type": "string", "description": "Owning user id." },
    "entity":              { "type": "string", "description": "File path, domain, or app name.", "required": true },
    "type":                { "type": "string", "description": "file | domain | app.", "required": true },
    "category":            { "type": "string", "description": "Activity category (coding, debugging, building, browsing, meeting, ai coding, ...)." },
    "time":                { "type": "double", "description": "Unix epoch seconds with milliseconds.", "required": true },
    "project":             { "type": "string", "description": "Project name (usually git repo)." },
    "project_root_count":  { "type": "int32", "description": "Levels above the project root for the entity." },
    "branch":              { "type": "string", "description": "Git branch." },
    "language":            { "type": "string", "description": "Detected programming language." },
    "dependencies":        { "type": "array", "items": { "type": "string" }, "description": "Detected package dependencies." },
    "lines":               { "type": "int32", "description": "Total file line count." },
    "line_additions":      { "type": "int32" },
    "line_deletions":      { "type": "int32" },
    "lineno":              { "type": "int32", "description": "Cursor line." },
    "cursorpos":           { "type": "int32", "description": "Cursor column." },
    "is_write":            { "type": "boolean", "description": "Whether triggered by a save/write." },
    "machine_name_id":     { "type": "string" },
    "user_agent_id":       { "type": "string" },
    "created_at":          { "type": "datetime" },
    "modified_at":         { "type": "datetime" }
  }
}

Work with this as data

Every JSON Structure here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for json structure

4 MCP tools reach this
  • find_json_structuresBrowse and filter every JSON Structure in the catalog.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools

Call it yourself

curl for this page
This JSON Structure
curl "https://apis.io/api/v1/json-structures/wakatime-heartbeat-structure"
All json structure
curl "https://apis.io/api/v1/json-structures?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no email required.

A second provider on the same verified email joins the account you already have.