Docs
Search docs

Get a repository's CI minutes usage

GET/api/repos/{owner}/{repo}/actions/usage

getRepositoryActionsUsage

CI time the repository's executed jobs used: per calendar month (UTC) for the last six months including the current one, and per workflow for the current month. `hosted_billed_seconds` is what hosted runners bill (each job rounded up to the whole minute); `self_hosted_seconds` is time on the workspace's own runners, never billed; `unattributed_seconds` is time of jobs that ran before runner provenance was recorded (July 2026), which may have been either. Jobs carried over by a re-run of failed jobs are not counted.

Authentication optional — this operation also accepts anonymous requests. When authenticating, use a bearer token or a session cookie.

curl

curl -X GET 'https://neosource.dev/api/repos/OWNER/REPO/actions/usage' \
  -H 'Authorization: Bearer $NEOSOURCE_TOKEN'

fetch

fetch("https://neosource.dev/api/repos/OWNER/REPO/actions/usage", {
  method: "GET",
  headers: {
    Authorization: "Bearer $NEOSOURCE_TOKEN",
  },
});

Path parameters

ownerrequired

Repository owner or organization slug.

string

reporequired

Repository name.

string

Responses

200CI usage

application/json

RepoCiUsageResponse

object

`GET /api/repos/{owner}/{repo}/actions/usage`.

monthsrequired

array

The last six calendar months including the current one, oldest first. Every month is present; one with no executed job is zeros.

items

RepoCiUsageMonth

object

One calendar month of a repository's CI usage.

hosted_billed_secondsrequired

integerint64

Billed seconds of jobs hosted runners executed (whole minutes). See the module docs: computed from job records, so it can slightly exceed what was charged.

job_countrequired

integerint64

Jobs that ran: hosted, self-hosted and unattributed.

period_startrequired

string

First day of the month, `YYYY-MM-DD`.

self_hosted_secondsrequired

integerint64

Seconds of jobs self-hosted (workspace- or actor-bound) runners executed, rounded per job like the billed figure. Not billed.

unattributed_secondsrequired

integerint64

Seconds of jobs that ran before runner provenance was recorded (July 2026); may be hosted or self-hosted. Never counted in either figure above.

period_startrequired

string

The current month, `YYYY-MM-DD` — the last entry of `months` and the window of `workflows`.

workflowsrequired

array

The current month per workflow, billed hosted seconds descending. Only workflows with an executed job this month.

items

RepoCiUsageWorkflow

object

One workflow's CI usage in the current month.

hosted_billed_secondsrequired

integerint64

job_countrequired

integerint64

self_hosted_secondsrequired

integerint64

unattributed_secondsrequired

integerint64

Ran before runner provenance was recorded (July 2026); may be hosted or self-hosted.

workflow_namerequired

string

The workflow's `name:`, or its path when it has none.

workflow_pathrequired

string

Repo-relative path of the workflow file.

Standard errors

Bodies documented once for the whole API — see standard errors.

  • 400Bad Request — one of: invalid_input
  • 403Forbidden — one of: forbidden
  • 404Not Found — one of: not_found
  • 423Locked — one of: busy
  • 429Rate limited — retry after the `Retry-After` header
  • 500Internal server error
  • 503Service temporarily unavailable / at capacity — retry after the `Retry-After` header
  • 504Gateway timeout — the request exceeded the server's handling budget