English | 中文
Turn any GitHub user's contribution calendar into an embeddable SVG card, or fetch the raw JSON. No token required — the data comes straight from the public GitHub profile page.
Embed it in your own Markdown or web page:
After deploying, replace
<your-deployment>with your domain and<username>with the target user.
| Method | Path | Description |
|---|---|---|
GET |
/{username}/svg |
Contribution calendar as an SVG card, embeddable in Markdown / web pages |
GET |
/{username} |
Contribution data as JSON: { total, contributions: [{date, count}] } |
GET |
/health |
Health check |
/{username}/svg accepts an optional cache_seconds query parameter (0–86400) that sets the Cache-Control max-age on the response.
Example JSON response:
{
"total": 1234,
"contributions": [
{ "date": "2025-06-01", "count": 6 },
{ "date": "2025-06-02", "count": 0 }
]
}python -m venv .venv && source .venv/bin/activate
pip install -r requirements.txt
uvicorn api.index:app --reload --port 8000
# try it
curl http://localhost:8000/torvaldsThe repo ships with vercel.json, which rewrites every request to the Python entry point api/index.py. Import the repo into Vercel and it runs as-is — no extra configuration needed.
The data interface takes inspiration from community projects such as hexo-github-calendar and python_github_calendar_api. Thanks to them.