GitHub Contributions API
GitHub contribution graph — sorted days[], currentStreak (today grace), longestStreak (2 credits).
Pass a GitHub username or profile URL and get the real last-year contribution calendar from github.com/users/{login}/contributions: totalContributions, from/to (min/max date), currentStreak, longestStreak, and days[{date, count, level}] sorted ascending by date (not GitHub's weekday-major DOM order). currentStreak uses GitHub's today-grace rule: a zero on today does not break the streak; a zero on any earlier day does. source discloses that HTML calendar. This is not /users/{u}/events/public (max 90 events / 90 days) and not a sampled stars sum. Flat 2 credits.
Request
- Base URL: https://api.captapi.com
- URL: https://api.captapi.com/v1/github/contributions
- Auth: one of:
- HTTP bearer
- API key in header X-API-Key
Query parameters
GitHub username or profile URL, e.g. getify or https://github.com/getify.
Set true to serve from the 24h response cache (0 credits on hit). Default false — always fetch fresh.
Response
Success. The data object for this endpoint.
Changes
No recorded changes to this operation across all 3 revisions of this API.