Social Fetch
GitHub

Get GitHub contribution graph

Get the contribution graph for a GitHub profile for a given year.

Optional `year` defaults to the current calendar year when omitted. Contribution counts reflect public GitHub activity for that year.

GET/v1/github/profiles/{handle}/contributions
1credit
x-api-key*stringheader

API key (`sfk_...`)

Parameters
2
handle*stringpath

GitHub username to look up, with or without a leading @.

min 1 chars · max 39 chars

yearintegeroptionalquery

Calendar year for the contribution graph. Defaults to the current year when omitted.

≥ 2007 · ≤ 2100

Response fields
15

Endpoint-specific response payload.

datalookupStatus
string

Whether contribution data was found for the requested user and year.

one of: found, not_found

Contribution graph for the selected year when available.

datacontributionshandle
string

GitHub username for the contribution graph.

datacontributionsyear
integer

Calendar year covered by the graph.

datacontributionstotalContributions
integer

Total contributions in the selected year.

≥ 0

Per-day contribution counts for the heatmap.

datacontributionsdays[]date
string

Calendar date for this cell (YYYY-MM-DD).

datacontributionsdays[]contributionCount
integer

Number of contributions on this day.

≥ 0

datacontributionsdays[]color
stringnullable

Heatmap cell color when provided.

datacontributionsdays[]intensity
integer

Contribution intensity level for the heatmap cell.

≥ 0

Metadata describing the request and billing outcome.

metarequestId
string

Unique request identifier for tracing this API call.

min 1 chars

metacreditsCharged
integer

Credits charged for this request.

≥ 0

metaversion
string

Public API version that served the response.

one of: v1

Code example

curl "https://api.socialfetch.dev/v1/github/profiles/torvalds/contributions" \
  -H "x-api-key: YOUR_API_KEY"

Responses

Lookup result. Check `data.lookupStatus` for `found` or `not_found`.

On this page

No Headings