Endpoint

GET /api/graph

Returns an SVG by default: it stays sharp at any size and is smaller over the wire. Add format=png for a PNG.

Query Parameters

Parameter Type Required Default Description
username string Required - GitHub username
year / y number|string Optional none (365 days) Year to fetch contributions for (e.g., 2025) or none for 365-day rolling window ending today. Defaults to 365-day history (supports year or y)
width number Optional 1000 Image width in pixels
height number Optional 600 Image height in pixels
stats boolean Optional false Include statistics overlay (use stats=true)
credit boolean Optional false Show username credit (use credit=true)
format string Optional svg Image format: svg or png. SVG stays sharp at any display size and is smaller over the wire
theme string Optional github Visual theme: github, dark, light, neon, minimal, ocean, catppuccin, dracula, crimson, tokyonight, sunset, sakura, kanagawa, gruvbox, rosepine, onedark, monokai, matrix, synthwave, halloween, solarized, or custom (see the URL and Theme Builder)

URL and Theme Builder [Hide] Click to collapse

Build your graph URL with a live preview. Choose a preset theme, or pick Custom to design your own colors.

1Profile
2Appearance

Pick Custom to design your own colors below.

3Size and range

Leave Year blank for a rolling 365-day window.

4Get the code
Image
Snippet
Enter a username to see the preview

Theme Gallery

Preview different themes with the same data:

GitHub?theme=github
GitHub Theme
Dark?theme=dark
Dark Theme
Light?theme=light
Light Theme
Neon?theme=neon
Neon Theme
Minimal?theme=minimal
Minimal Theme
Ocean?theme=ocean
Ocean Theme
Catppuccin?theme=catppuccin
Catppuccin Theme
Dracula?theme=dracula
Dracula Theme
Crimson?theme=crimson
Crimson Theme
Tokyo Night?theme=tokyonight
Tokyo Night Theme
Sunset?theme=sunset
Sunset Theme
Sakura?theme=sakura
Sakura Theme
Kanagawa?theme=kanagawa
Kanagawa Theme
Gruvbox?theme=gruvbox
Gruvbox Theme
Rose Pine?theme=rosepine
Rose Pine Theme
One Dark?theme=onedark
One Dark Theme
Monokai?theme=monokai
Monokai Theme
Matrix?theme=matrix
Matrix Theme
Synthwave '84?theme=synthwave
Synthwave '84 Theme
Halloween?theme=halloween
Halloween Theme
Solarized Light?theme=solarized
Solarized Light Theme
365-Day Rolling Window?year=none
365-Day Rolling Window

Examples

Basic usage (365-day rolling window):

/api/graph?username=spectrewolf8

By default, shows the last 365 days of contributions ending today

With specific year:

/api/graph?username=spectrewolf8&year=2025

Explicit 365-day mode:

/api/graph?username=spectrewolf8&year=none

With stats:

/api/graph?username=spectrewolf8&stats=true

Custom dimensions:

/api/graph?username=spectrewolf8&width=1920&height=1080

With theme:

/api/graph?username=spectrewolf8&theme=dark&stats=true

As PNG:

/api/graph?username=spectrewolf8&stats=true&format=png

Full customization:

/api/graph?username=spectrewolf8&year=2025&width=1200&height=700&stats=true&credit=true&theme=neon

Caching

Images are cached per username and parameters combination for 24 hours. Multiple requests with the same parameters will be served from cache instantly. Check the X-Cache header: HIT for cached, MISS for newly generated.

Response Headers

Error Responses

Errors return JSON with an error message:

{
  "error": "Error message here"
}

Data Accuracy & Limitations

Graphs are built from GitHub's official GraphQL API, and the total is the same number GitHub shows on your public profile ("N contributions in the last year").

Private contributions are included if you display them. GitHub's profile setting Contribution settings > Private contributions shows your private activity publicly, anonymized (green squares, no repo names). When it's on, those contributions are counted for every viewer, the graph included. When it's off, they're hidden from your public profile and from the graph alike. Either way, the graph matches what the public sees.

The one thing that makes the graph lower than your profile is an organization's token policy. An organization can restrict personal access tokens (for example, capping fine-grained token lifetimes). When it does, GitHub hides that organization's repositories, even public ones, from the service's token, and every contribution to them silently drops out of the graph. Nothing in the API flags this, so the service can't detect it; it can only tell you the possibility exists. If you run your own server, use a classic token, which isn't subject to these policies.

Check My Graph [Hide] Click to collapse

See exactly what's being counted for you over the last 365 days, and how much of it is private activity counted anonymously. If the total matches your profile, your graph is complete:

Enter a username to see what's counted

API Usage Statistics

All-time usage statistics since launch:

-
Generated Requests
-
Cached Requests
-
Total Users
-
Cache Hit Rate
First Request
-

Source

GitHub

Explore the project, report issues, or star it if you find it useful:

github.com/Spectrewolf8/GitHub-Contributions-Isometric-3D-Graphs-Embed
Star