API · GitHub
GET /github/users/{handle}/contributions
A GitHub user’s contribution calendar for a year: daily counts and the total.
| |
|---|
| Request | GET /v1/github/users/{handle}/contributions |
| Operation id | github.user.contributions |
| Cost | 1 credit, refunded if the call fails |
| Auth | API key: Authorization: Bearer <key> or x-api-key. |
A GitHub user’s contribution calendar for a year: daily counts and the total.
| Name | Type | Required | Description |
|---|
handle | string | yes | GitHub username, with or without the @, or a profile URL. Example: torvalds. |
| Name | Type | Required | Description |
|---|
year | integer | no | Calendar year (default: the last 12 months). |
| Status | Meaning | Schema |
|---|
200 | The calendar. | GitHubContributionsResponse |
400 | Invalid input. Nothing was charged. | Error |
401 | Missing or invalid API key. | Error |
402 | Not enough credits, a spend cap was reached, or payment is required. | Error |
403 | The target is private, or the account is suspended. | Error |
404 | No public GitHub user, repository or issue by that name. | Error |
429 | Too many requests. Wait for Retry-After seconds. | Error |
503 | GitHub is temporarily unavailable. Retryable; nothing was charged. | Error |
| Field | Type | Description |
|---|
login | string | |
year | integer | null | The calendar year, or null for the last 12 months. |
total | integer | Contributions in the period, as the profile states it. |
from | string | null | |
to | string | null | |
days | GitHubContributionDay[] | |
Errors use one shape everywhere; see Errors for every code and what to do.