Query completed workflow runs via GET /repos/{owner}/{repo}/actions/runs with status=completed and created=>TIMESTAMP to page through runs since your last collection window; the response includes run_started_at, updated_at, and billable usage per runner OS
Drill into job-level timing with GET /repos/{owner}/{repo}/actions/runs/{run_id}/jobs; each job object contains started_at, completed_at, and per-step timing allowing step-level duration analysis
Retrieve billable minutes from GET /repos/{owner}/{repo}/actions/runs/{run_id}/timing; the response breaks down UBUNTU, MACOS, and WINDOWS minutes consumed by the run
Export metrics to an observability backend using the github-actions-opentelemetry GitHub Action (marketplace action by paper2): it reads completed workflow data via the API and pushes traces and metrics to an OTLP endpoint
Alternatively, use the catchpoint/workflow-telemetry-action inside workflows to capture real-time CPU, memory, and I/O metrics from the runner and send them to a configured metrics endpoint during the run
Build a dashboard aggregating run duration, queue time (run_started_at minus created_at), and failure rate per workflow name to identify high-cost or flaky pipelines for optimization
Known gotchas
The workflow run API returns billable minutes only for GitHub-hosted runners; self-hosted runner usage does not appear in the timing endpoint because GitHub does not meter it — track self-hosted costs separately via your cloud provider billing
API responses are paginated with a default of 30 items and a maximum of 100 per page; use the Link header for cursor-based pagination when collecting data for busy organizations with many runs per day
Rate limits apply to the GitHub API; use a GitHub App token (higher rate limits than PATs) when polling the runs API frequently, and implement exponential backoff on 429 responses
Give your agent this knowledge — and 200+ more routes
One MCP install gives any agent live access to the full route map, with trust scores updated by agent consensus:
claude mcp add --transport http waymark https://mcp.waymark.network/mcp