---
title: "ghapi: GitHub statistics API and SVG cards | VulCode"
description: "ghapi is our own GitHub statistics API, powering dualfroz.com, vulcode.com and profile READMEs with raw JSON and SVG cards."
url: "https://vulcode.com/en/portfolio/integrations/ghapi"
lang: "en"
---

[Integrations & scripts](https://vulcode.com/en/portfolio/integrations)

# ghapi

GitHub statistics API and SVG cards

An API that collects GitHub work statistics and serves them to dualfroz.com, vulcode.com and profile READMEs. It answers with raw JSON or a ready SVG card to embed.

[Service: Integrations and automation](https://vulcode.com/en/services/api-integrations)

## About the project

ghapi is our own GitHub statistics API, powering dualfroz.com, vulcode.com and profile READMEs with raw JSON and SVG cards. It shows commits, languages, frameworks, tests, streaks and open source contributions. It has two parts that never share secrets: a collector holding the GitHub token gathers the data and saves snapshots (ready summaries), and the API reads only those snapshots, so a page refresh costs no request to GitHub. A Discord app answers the same questions from any chat.

## The challenge

The statistics should be current, but a page refresh cannot cost a request to GitHub, and the names of private repositories must never reach a public card. Ordinary date-based queries also miss commits pushed later or with a backdated date.

## What we did

- A collector that runs hourly, the only part holding the GitHub token

- Changes found through branch heads, so backdated commits and commits pushed later count too

- Rewritten history detected and recounted, without commits that no longer exist

- Public endpoints without private repository names, full data only with a key

- SVG cards: stats, languages, streaks, activity, a heatmap, open source, frameworks and a Discord card

- An ETag (a version tag for caching) on every response and compatibility with the old paths

## Related projects

- [**Nebula** Plugins for servers of the game SCP: Secret Laboratory, connected to Discord. Staff run ranks, punishments and player reports in one system, from a panel inside the game.](https://vulcode.com/en/portfolio/integrations/nebula)

- [**monito** A small service that checks websites, Docker containers and server resources every minute and reports a failure on Discord. It also shows the team's new mail and changes on watched pages there.](https://vulcode.com/en/portfolio/integrations/monito)

- [**mailcow-mcp** A tool that lets an AI assistant set up domains, mailboxes and aliases in Mailcow and send and read mail on its own. Instead of clicking through the panel, you tell the assistant what to do.](https://vulcode.com/en/portfolio/integrations/mailcow-mcp)

## Describe your project.

A free quote comes back within an hour during working hours.

### Rather skip the form?

Ask in the chat or write to us directly.

Open the chat

- **Email**: [hello@vulcode.com](mailto:hello@vulcode.com)
- **Phone**: [+48 576 043 920](tel:+48576043920)
- **Discord**: [discord.gg/vulcode](https://discord.gg/vulcode)

## Tell us what you want to build.

A free quote comes back within an hour during working hours. You talk to the person who writes the code.

[Free quote](https://vulcode.com/en/quote) [Free consultation](https://vulcode.com/en/consultation)

- [hello@vulcode.com](mailto:hello@vulcode.com)

- [+48 576 043 920](tel:+48576043920)

- [discord.gg/vulcode](https://discord.gg/vulcode)
