Skip to content

Contribution Calendar

GET/v1/github/user/contributions1 credit

Returns a user's contribution calendar for one year: the yearly total and, for every day, the contribution count and its intensity level.

01Query parameters

NameTypeDescription
handleoptionalstringGitHub username, e.g. `torvalds` (a leading `@` is ignored). One of `handle`, `username` or `url` is required.
usernameoptionalstringSame as `handle`, accepted under this name too. One of `handle`, `username` or `url` is required.
urloptionalstringGitHub profile URL, e.g. `https://github.com/torvalds`. One of `handle`, `username` or `url` is required.
yearoptionalintegerCalendar year, from 2008 to the current year. Defaults to the current year.

02Request

curl "https://api.scrapesocial.ai/v1/github/user/contributions?handle=torvalds&year=2024" \
  -H "x-api-key: $SCRAPESOCIAL_KEY"

03Responses

Real answers from the API. Lists are shortened to 2 items.

GET /v1/github/user/contributions?handle=torvalds&year=2024

{
  "success": true,
  "credits_remaining": 4980,
  "credits_charged": 1,
  "contributions": {
    "username": "torvalds",
    "year": 2024,
    "total_contributions": 2892,
    "days": [
      {
        "date": "2024-01-01",
        "contribution_count": 0,
        "color": null,
        "intensity": 0
      },
      {
        "date": "2024-01-02",
        "contribution_count": 0,
        "color": null,
        "intensity": 0
      }
    ]
  }
}

Common to every endpoint

Any route can answer these: a missing or wrong key, no credits left, the platform not answering, or a failure on our side. None of them costs credits.

GET /v1/cosmos/profile?handle=design

{
  "success": false,
  "message": "Invalid API key"
}

04Notes

The answer's `contributions` object holds `total_contributions` and `days`, which always covers the whole calendar year (days still in the future count 0). `intensity` is the calendar's shading level from 0 to 4; `color` is always null. An unknown user is a free 404; a value that is not a GitHub username or profile URL is a free 400.

05Errors & credits

Every error has success: false, a real HTTP status and costs no credits.

  • 400missing_parameter

    A required parameter is missing or invalid.

  • 403private_account

    The account is private or age-restricted.

  • 404not_found

    No such account.

  • 503upstream_error

    The platform did not answer; retry shortly.