PixStock
Introduction

GitHub Stats API

Generate dynamic SVG GitHub profile cards for READMEs, dashboards, and documentation.

Live playground

Configure a card and copy the generated Markdown embed.

man-navlakha stats card preview

Markdown embed

![GitHub Stats Card](https://img-server-theta.vercel.app/api/stats?username=man-navlakha&theme=dark&show_languages=true&show_avatar=true&show_border=true&compact=false)

Overview

The GitHub Stats Card API returns a polished SVG card for a GitHub profile. It is designed for GitHub READMEs, portfolio pages, dashboards, and documentation sites where the embed must stay visually stable.

The endpoint always responds with image/svg+xml; charset=utf-8. Even error states such as 400, 404, and 502 are returned as SVG output, so Markdown embeds do not collapse into broken image UI.

Endpoint

PropertyValue
Base URLhttps://img-server-theta.vercel.app/api/stats
MethodGET
Content-Typeimage/svg+xml; charset=utf-8

Required Parameters

ParameterTypeDescription
usernamestringGitHub login name used to fetch profile and repository statistics.

Layout And Visibility Parameters

ParameterTypeDefaultDescription
themedark | light | oceandarkApplies one of the built-in visual themes.
show_languagestrue | falsefalseShows a language summary when enabled.
show_avatartrue | falsetrueShows the user's GitHub avatar.
show_followerstrue | falsetrueShows follower count.
show_followingtrue | falsetrueShows following count.
show_repostrue | falsetrueShows public repository count.
show_titletrue | falsetrueShows the card title/header.
show_bordertrue | falsetrueShows the outer card border.
compacttrue | falsefalseUses a denser layout with reduced spacing.
border_radius0-4022Controls corner radius in pixels.
border_width0-61Controls border width in pixels.
card_width320-800430Controls total SVG width in pixels.

Color Overrides

Use hex values without the leading #.

ParameterDescription
title_colorOverrides heading and title color.
text_colorOverrides body text and stat label color.
icon_colorOverrides accent icons and highlighted values.
bg_colorOverrides card background color.
border_colorOverrides outer border color.

Theme Defaults

ThemeBackgroundTextTitleIcon
Dark#0f172a#d5ddf0#ffffff#71f3c6
Light#ecfeff#334155#0f172a#0ea5e9
Ocean#082f49#b7e3f8#ecfeff#3ddad7

API Usage

GET https://img-server-theta.vercel.app/api/stats?username=man-navlakha
GET https://img-server-theta.vercel.app/api/stats?username=man-navlakha&theme=ocean&show_languages=true&compact=true
GET https://img-server-theta.vercel.app/api/stats?username=man-navlakha&theme=dark&title_color=ffffff&text_color=d5ddf0&icon_color=71f3c6&bg_color=0f172a&border_color=1e293b

Markdown Embed

Use the generated URL directly in Markdown:

![GitHub Stats Card](https://img-server-theta.vercel.app/api/stats?username=man-navlakha)

With additional options:

![GitHub Stats Card](https://img-server-theta.vercel.app/api/stats?username=man-navlakha&theme=ocean&show_languages=true&show_avatar=true&show_border=true&compact=false)

Error Behavior

The API is README-safe by design. Instead of returning JSON or plain-text error responses, failures are rendered as SVG cards with a clear message.

StatusWhen It HappensResponse Format
400Required input is missing or invalid.SVG
404The GitHub user cannot be found.SVG
502GitHub data cannot be fetched upstream.SVG

Because every response remains an SVG, GitHub and other Markdown renderers keep the visual layout intact even when a request fails.

On this page