100 free credits. No credit card required. Get a key

GitHub contributions API

The contribution calendar a profile shows: one count per day and the year total.

GET /v1/github/users/{handle}/contributions1 credit per callRefunded on failure
import os, requests

res = requests.get(
    "https://api.groundsocial.dev/v1/github/users/torvalds/contributions",
    headers={"Authorization": f"Bearer {os.environ['GROUNDSOCIAL_API_KEY']}"},
)
res.raise_for_status()
data = res.json()
Response
200 · 1 credit
{
"login": "torvalds",
"year": null,
"total": 4043,
"from": "2025-11-23",
"to": "2026-11-25",
"days": [
{
"date": "2025-11-23",
"level": 1,
"count": 7
},
{
"date": "2025-11-24",
"level": 1,
"count": 3
},
"… 366 more"
]
}

Parameters

NameTypeDescription
handlepath · requiredstringGitHub username, with or without the @, or a profile URL. Example: torvalds.
yearqueryintegerCalendar year (default: the last 12 months).
Response fields

200 with a GitHubContributionsResponse, in GitHub’s own REST v3 objects.

FieldTypeDescription
loginstring
yearinteger | nullThe calendar year, or null for the last 12 months.
totalintegerContributions in the period, as the profile states it.
fromstring | null
tostring | null
daysGitHubContributionDay[]
Status codes
StatusMeaning
200The calendar.
400Invalid input. Nothing was charged.
401Missing or invalid API key.
402Not enough credits, a spend cap was reached, or payment is required.
403The target is private, or the account is suspended.
404No public GitHub user, repository or issue by that name.
429Too many requests. Wait for Retry-After seconds.
503GitHub is temporarily unavailable. Retryable; nothing was charged.

Every error has code, message, hint and retryable. All error codes

GitHub is a trademark of GitHub, Inc. We are not affiliated with or endorsed by GitHub.