GitHub contribution calendar API
The public contribution graph for one year: the total and a count per day.
- Cost
- 1 credit
- Cached repeats
- 0 creditssend max_age_days, results kept 30 days
- Failed requests
- 0 credits
- Status
- Betashape may still gain fields
You send one of handle or url.
Request
Send your key in the x-api-key header.
curl -G "https://api.socialscrape.io/v1/github/user/contributions" \
-H "x-api-key: $SOCIALSCRAPE_API_KEY" \
--data-urlencode 'handle=torvalds' \
--data-urlencode 'year=2025'import os
import requests
params = {
"handle": "torvalds",
"year": 2025,
}
res = requests.get(
"https://api.socialscrape.io/v1/github/user/contributions",
headers={"x-api-key": os.environ["SOCIALSCRAPE_API_KEY"]},
params=params,
timeout=60,
)
body = res.json()
if body["ok"]:
print(body["data"])
else:
print(body["error"]["code"], body["error"]["message"])const url = new URL("https://api.socialscrape.io/v1/github/user/contributions");
url.search = new URLSearchParams({
handle: "torvalds",
year: "2025",
}).toString();
const res = await fetch(url, {
headers: { "x-api-key": process.env.SOCIALSCRAPE_API_KEY! },
});
const body = await res.json();
if (body.ok) {
console.log(body.data);
} else {
console.error(body.error.code, body.error.message);
}{
"nodes": [
{
"name": "SocialScrape GitHub contribution calendar",
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 4.2,
"position": [
0,
0
],
"parameters": {
"method": "GET",
"url": "https://api.socialscrape.io/v1/github/user/contributions",
"sendQuery": true,
"queryParameters": {
"parameters": [
{
"name": "handle",
"value": "torvalds"
},
{
"name": "year",
"value": "2025"
}
]
},
"sendHeaders": true,
"headerParameters": {
"parameters": [
{
"name": "x-api-key",
"value": "={{ $env.SOCIALSCRAPE_API_KEY }}"
}
]
}
}
}
],
"connections": {}
}Parameters
| Name | Type | Required | Description |
|---|---|---|---|
handle | string | one of | GitHub username. Also accepted as username, login. |
url | url | one of | Profile URL (github.com/<user>). |
year | integer | Calendar year (2008 onward); default the current year. |
Every request also accepts trim, raw and max_age_days.
Response
Sample from a recorded response, shortened. Values are public data, not yours.
{
"ok": true,
"credits_charged": 1,
"credits_remaining": 4999,
"cached": false,
"cached_at": null,
"request_id": "req_529d5fd94d1524174537336b",
"data": {
"object": "contributions",
"platform": "github",
"handle": "torvalds",
"total": 2925,
"days": [
{
"date": "2025-01-01",
"count": 1
},
{
"date": "2025-01-02",
"count": 2
},
{
"date": "2025-01-03",
"count": 11
}
],
"extra": {
"intensity_by_date": {
"2025-01-01": 1,
"2025-01-02": 1,
"2025-01-03": 2,
"2025-01-04": 1,
"2025-01-05": 1,
"2025-01-06": 1,
"2025-01-07": 1,
"2025-01-08": 1,
"2025-01-09": 1,
"2025-01-10": 2,
"2025-01-11": 1,
"2025-01-12": 1,
"2025-01-13": 1,
"2025-01-14": 1,
"2025-01-15": 0,
"2025-01-16": 1,
"2025-01-17": 1,
"2025-01-18": 1,
"2025-01-19": 1,
"2025-01-20": 3,
"2025-01-21": 4,
"2025-01-22": 3,
"2025-01-23": 2,
"2025-01-24": 3,
"2025-01-25": 2,
"2025-01-26": 1,
"2025-01-27": 2,
"2025-01-28": 2,
"2025-01-29": 2,
"2025-01-30": 2,
"2025-01-31": 2,
"2025-02-01": 1,
"2025-02-02": 1,
"2025-02-03": 1,
"2025-02-04": 1,
"2025-02-05": 1,
"2025-02-06": 1,
"2025-02-07": 1,
"2025-02-08": 2,
"2025-02-09": 1,
"2025-02-10": 1,
"2025-02-11": 1,
"2025-02-12": 1,
"2025-02-13": 1,
"2025-02-14": 2,
"2025-02-15": 1,
"2025-02-16": 2,
"2025-02-17": 1,
"2025-02-18": 1,
"2025-02-19": 1,
"2025-02-20": 1,
"2025-02-21": 1,
"2025-02-22": 1,
"2025-02-23": 1,
"2025-02-24": 1,
"2025-02-25": 1,
"2025-02-26": 1,
"2025-02-27": 1,
"2025-02-28": 2,
"2025-03-01": 1,
"2025-03-02": 1,
"2025-03-03": 1,
"2025-03-04": 1,
"2025-03-05": 1,
"2025-03-06": 2,
"2025-03-07": 2,
"2025-03-08": 1,
"2025-03-09": 1,
"2025-03-10": 1,
"2025-03-11": 1,
"2025-03-12": 1,
"2025-03-13": 1,
"2025-03-14": 2,
"2025-03-15": 1,
"2025-03-16": 1,
"2025-03-17": 1,
"2025-03-18": 1,
"2025-03-19": 1,
"2025-03-20": 1,
"2025-03-21": 1,
"2025-03-22": 1,
"2025-03-23": 0,
"2025-03-24": 4,
"2025-03-25": 4,
"2025-03-26": 2,
"2025-03-27": 3,
"2025-03-28": 2,
"2025-03-29": 2,
"2025-03-30": 1,
"2025-03-31": 2,
"2025-04-01": 2,
"2025-04-02": 3,
"2025-04-03": 2,
"2025-04-04": 2,
"2025-04-05": 1,
"2025-04-06": 2,
"2025-04-07": 0,
"2025-04-08": 1,
"2025-04-09": 1,
"2025-04-10": 2,
"2025-04-11": 1,
"2025-04-12": 1,
"2025-04-13": 1,
"2025-04-14": 1,
"2025-04-15": 1,
"2025-04-16": 1,
"2025-04-17": 2,
"2025-04-18": 2,
"2025-04-19": 1,
"2025-04-20": 1,
"2025-04-21": 1,
"2025-04-22": 1,
"2025-04-23": 1,
"2025-04-24": 1,
"2025-04-25": 2,
"2025-04-26": 2,
"2025-04-27": 1,
"2025-04-28": 1,
"2025-04-29": 1,
"2025-04-30": 1,
"2025-05-01": 1,
"2025-05-02": 2,
"2025-05-03": 1,
"2025-05-04": 1,
"2025-05-05": 1,
"2025-05-06": 1,
"2025-05-07": 1,
"2025-05-08": 1,
"2025-05-09": 1,
"2025-05-10": 1,
"2025-05-11": 2,
"2025-05-12": 1,
"2025-05-13": 1,
"2025-05-14": 1,
"2025-05-15": 1,
"2025-05-16": 2,
"2025-05-17": 1,
"2025-05-18": 1,
"2025-05-19": 0,
"2025-05-20": 1,
"2025-05-21": 1,
"2025-05-22": 1,
"2025-05-23": 1,
"2025-05-24": 1,
"2025-05-25": 1,
"2025-05-26": 4,
"2025-05-27": 4,
"2025-05-28": 3,
"2025-05-29": 2,
"2025-05-30": 2,
"2025-05-31": 2,
"2025-06-01": 1,
"2025-06-02": 2,
"2025-06-03": 2,
"2025-06-04": 1,
"2025-06-05": 1,
"2025-06-06": 3,
"2025-06-07": 1,
"2025-06-08": 2,
"2025-06-09": 1,
"2025-06-10": 1,
"2025-06-11": 1,
"2025-06-12": 1,
"2025-06-13": 2,
"2025-06-14": 1,
"2025-06-15": 1,
"2025-06-16": 1,
"2025-06-17": 1,
"2025-06-18": 1,
"2025-06-19": 1,
"2025-06-20": 1,
"2025-06-21": 1,
"2025-06-22": 1,
"2025-06-23": 1,
"2025-06-24": 1,
"2025-06-25": 1,
"2025-06-26": 1,
"2025-06-27": 2,
"2025-06-28": 1,
"2025-06-29": 1,
"2025-06-30": 1,
"2025-07-01": 1,
"2025-07-02": 1,
"2025-07-03": 1,
"2025-07-04": 2,
"2025-07-05": 1,
"2025-07-06": 2,
"2025-07-07": 1,
"2025-07-08": 1,
"2025-07-09": 1,
"2025-07-10": 1,
"2025-07-11": 1,
"2025-07-12": 1,
"2025-07-13": 1,
"2025-07-14": 1,
"2025-07-15": 1,
"2025-07-16": 1,
"2025-07-17": 1,
"2025-07-18": 2,
"2025-07-19": 1,
"2025-07-20": 2,
"2025-07-21": 1,
"2025-07-22": 1,
"2025-07-23": 1,
"2025-07-24": 1,
"2025-07-25": 1,
"2025-07-26": 1,
"2025-07-27": 1,
"2025-07-28": 4,
"2025-07-29": 4,
"2025-07-30": 2,
"2025-07-31": 4,
"2025-08-01": 2,
"2025-08-02": 1,
"2025-08-03": 1,
"2025-08-04": 1,
"2025-08-05": 1,
"2025-08-06": 1,
"2025-08-07": 1,
"2025-08-08": 1,
"2025-08-09": 2,
"2025-08-10": 1,
"2025-08-11": 1,
"2025-08-12": 1,
"2025-08-13": 1,
"2025-08-14": 1,
"2025-08-15": 2,
"2025-08-16": 1,
"2025-08-17": 1,
"2025-08-18": 1,
"2025-08-19": 1,
"2025-08-20": 1,
"2025-08-21": 2,
"2025-08-22": 2,
"2025-08-23": 1,
"2025-08-24": 1,
"2025-08-25": 1,
"2025-08-26": 0,
"2025-08-27": 1,
"2025-08-28": 2,
"2025-08-29": 1,
"2025-08-30": 1,
"2025-08-31": 1,
"2025-09-01": 0,
"2025-09-02": 1,
"2025-09-03": 1,
"2025-09-04": 1,
"2025-09-05": 2,
"2025-09-06": 1,
"2025-09-07": 1,
"2025-09-08": 1,
"2025-09-09": 1,
"2025-09-10": 1,
"2025-09-11": 1,
"2025-09-12": 1,
"2025-09-13": 1,
"2025-09-14": 1,
"2025-09-15": 1,
"2025-09-16": 1,
"2025-09-17": 2,
"2025-09-18": 1,
"2025-09-19": 2,
"2025-09-20": 1,
"2025-09-21": 1,
"2025-09-22": 1,
"2025-09-23": 1,
"2025-09-24": 1,
"2025-09-25": 1,
"2025-09-26": 2,
"2025-09-27": 1,
"2025-09-28": 1,
"2025-09-29": 4,
"2025-09-30": 4,
"2025-10-01": 4,
"2025-10-02": 2,
"2025-10-03": 4,
"2025-10-04": 3,
"2025-10-05": 2,
"2025-10-06": 2,
"2025-10-07": 2,
"2025-10-08": 1,
"2025-10-09": 1,
"2025-10-10": 2,
"2025-10-11": 2,
"2025-10-12": 1,
"2025-10-13": 0,
"2025-10-14": 1,
"2025-10-15": 1,
"2025-10-16": 1,
"2025-10-17": 1,
"2025-10-18": 2,
"2025-10-19": 1,
"2025-10-20": 1,
"2025-10-21": 1,
"2025-10-22": 1,
"2025-10-23": 1,
"2025-10-24": 2,
"2025-10-25": 1,
"2025-10-26": 2,
"2025-10-27": 1,
"2025-10-28": 1,
"2025-10-29": 0,
"2025-10-30": 1,
"2025-10-31": 2,
"2025-11-01": 1,
"2025-11-02": 1,
"2025-11-03": 0,
"2025-11-04": 1,
"2025-11-05": 1,
"2025-11-06": 1,
"2025-11-07": 1,
"2025-11-08": 1,
"2025-11-09": 1,
"2025-11-10": 1,
"2025-11-11": 1,
"2025-11-12": 1,
"2025-11-13": 1,
"2025-11-14": 2,
"2025-11-15": 1,
"2025-11-16": 1,
"2025-11-17": 1,
"2025-11-18": 1,
"2025-11-19": 1,
"2025-11-20": 1,
"2025-11-21": 1,
"2025-11-22": 1,
"2025-11-23": 1,
"2025-11-24": 1,
"2025-11-25": 1,
"2025-11-26": 1,
"2025-11-27": 1,
"2025-11-28": 2,
"2025-11-29": 1,
"2025-11-30": 1,
"2025-12-01": 3,
"2025-12-02": 4,
"2025-12-03": 4,
"2025-12-04": 4,
"2025-12-05": 4,
"2025-12-06": 3,
"2025-12-07": 1,
"2025-12-08": 1,
"2025-12-09": 2,
"2025-12-10": 2,
"2025-12-11": 1,
"2025-12-12": 1,
"2025-12-13": 2,
"2025-12-14": 1,
"2025-12-15": 0,
"2025-12-16": 1,
"2025-12-17": 1,
"2025-12-18": 0,
"2025-12-19": 1,
"2025-12-20": 2,
"2025-12-21": 1,
"2025-12-22": 1,
"2025-12-23": 1,
"2025-12-24": 1,
"2025-12-25": 1,
"2025-12-26": 2,
"2025-12-27": 1,
"2025-12-28": 2,
"2025-12-29": 1,
"2025-12-30": 1,
"2025-12-31": 1
},
"year": 2025
}
},
"cursor": null,
"has_more": null
}Fields
One Contributions in data.
A field the platform does not give is null, never made up. Extra platform details are in extra.
| Field | Type | Always | Notes |
|---|---|---|---|
object | "contributions" | ||
platform | Platform | yes | |
handle | string or null | ||
total | integer or null | ||
days | ContributionDay[] or null | ||
extra | object or null |
Full field list in the reference for this endpoint and the data models. Errors are listed under Errors.
Questions
Which errors can it return?
invalid_params (do not retry), unsupported_url (do not retry), not_found (do not retry). Account and platform errors from the errors list can also happen. A failure always costs 0 credits.
Is there an SDK call for it?
The preview Python client has client.github.user_contributions(...) and the TypeScript client client.github.userContributions(). Both return the same envelope as the HTTP API. The packages are not published yet; plain HTTP works today in any language.
Can an AI agent call it?
Yes. The MCP server reaches every built endpoint, with the same prices.