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.

Available Data

The kind of data this API exposes, based on its documentation. We could not call the endpoint to confirm the exact field names.

repository name and description
star and fork counts
contributor data
issues and pull requests
commit history

Example Response

Illustrative shape only — we were not able to call this endpoint (it requires credentials or exposes no public sample URL), so the fields below show the kind of data this API returns rather than a recorded response.

JSON Response · Illustrative
{
  "full_name": "octocat/Hello-World",
  "description": "My first repository on GitHub!",
  "stargazers_count": 1500,
  "forks_count": 320,
  "language": "JavaScript",
  "open_issues_count": 12,
  "created_at": "2011-01-26T19:01:12Z"
}

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.

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

Metadata Score Breakdown

Estimated from metadata — endpoint not independently tested

This score is estimated from observable metadata — HTTPS support, authentication model, declared CORS, and documentation reachability — because the API requires authentication or exposes no publicly testable endpoint. The five-signal breakdown is only shown for live-tested APIs.

Metadata estimate · endpoint not independently tested

Technical Specifications

Auth No Auth
HTTPS REQUIRED
CORS YES
Difficulty Beginner
Listing details not endpoint-verified

Similar APIs

View All →