GitHub Contribution Chart Generator API

Beginner's Pick Open Source Projects / No Auth Required Beginner HTTPS CORS
Free to Use
78 B
Measured Score 0 50 100 Speed 15/30 Consistency 20/20 Security 20/20 Browser access 15/15 Transparency 8/15 TESTED 2026-08-10

Overview

The GitHub Contribution Chart Generator API creates a visual representation of any GitHub user's contribution activity over the past year. No API key is required — simply provide a GitHub username and embed the generated image URL directly in a README or webpage. It is a great beginner project for learning how to work with image-generating APIs.

Beginner Tip

You can embed the chart directly in a GitHub README using Markdown: ![Contributions](https://github-contributions-api.jogruber.de/v4/YOUR_USERNAME?y=last). No code needed — just swap in your username and paste the link.

Measurement Record

What actually happened when we called this API from our own infrastructure. Every value below was recorded by the request, not copied from the provider's documentation.

Request
GET https://github-contributions-api.jogruber.de/v4/torvalds?y=last
Result
HTTP 200 · application/json · 15,539 bytes · compressed
Response time
262 ms (median of 3) · fastest 259 ms
Transport
TLSv1.3 · TLS_AES_256_GCM_SHA384 · certificate issued by Let's Encrypt
Browser CORS
Allowed — Access-Control-Allow-Origin: *
Recorded
2026-08-10

Fields Returned

Top-level fields present in the response we captured, with the type and value we actually received.

Field Type Value received
total object {1 fields}
contributions array [1 item]

Captured Response

Captured from a real request to https://github-contributions-api.jogruber.de/v4/torvalds?y=last on 2026-08-10. Long arrays and nested objects are truncated to keep the shape readable.

JSON Response · Captured
{
  "total": {
    "lastYear": 3382
  },
  "contributions": [
    {
      "date": "2025-08-10",
      "count": 6,
      "level": 1
    }
  ]
}

Field Reference

contributions List of daily contribution entries, each containing a date and count
date ISO date string (YYYY-MM-DD) for each day's contribution data
count Number of contributions (commits, PRs, issues, reviews) made on that day
level Activity level 0-4 used to determine the color intensity on the contribution graph
total Summary object with yearly totals keyed by year (e.g., {"2024": 1234})

Implementation Example

Calls a real endpoint of this API. Replace any placeholder credentials with your own key.

Request
const url = "https://github-contributions-api.jogruber.de/v4/torvalds?y=last";
const response = await fetch(url);
if (!response.ok) throw new Error(`Request failed: ${response.status}`);
const data = await response.json();
console.log(data);

What Can You Build?

Note: These code examples are AI-generated and unverified. Always refer to the official API documentation for accurate usage.

How This API Fails

We deliberately sent this API a broken request and recorded exactly what came back on 2026-08-10. Knowing the shape of an error before you hit it makes error handling much easier to write.

HTTP 404 Requesting a path that does not exist text/html

Returned an HTML error page rather than JSON — worth knowing if your client assumes every response can be parsed as JSON.

HTTP 400 Sending an invalid value for "y" application/json
{
  "error": "Invalid request",
  "issues": [
    {
      "code": "invalid_format",
      "path": "y",
      "message": "Invalid string: must match pattern /^(?:\\d+|all|last)$/"
    }
  ]
}

Common Errors & Troubleshooting

Generated guidance based on this API's documentation, not observed by us. Treat it as a starting point and check against the provider's own error reference.

404 Not Found or empty data The GitHub username does not exist or contributions are private
Verify the username on github.com and ensure the account's contribution graph is publicly visible
CORS error in browser The API may not support CORS for all request origins
Fetch the data server-side (e.g., in a Node.js backend) and relay it to your frontend, or use the image embed approach instead
Stale or outdated contribution data The service may cache results for a period of time
Add a cache-busting timestamp parameter or check back after a few hours for the most recent data

Measured Score Breakdown

Live HTTP request to the API endpoint

Speed 15/30
Consistency 20/20
Security 20/20
Browser access 15/15
Transparency 8/15
Endpoint Response Time 262ms

Fully tested on Aug 10, 2026

Technical Specifications

Auth No Auth
HTTPS REQUIRED
CORS YES
Difficulty Beginner
Endpoint last called: 2026-08-10

Similar APIs

View All →