GitHunt
PU

pujux/badge-it

An API serving useful badges for your GitHub Profile README ๐Ÿš€๐ŸŽ‰ Formerly known as git-badges.

Badge-It

GitHub stars
GitHub issues
GitHub forks
GitHub license
Twitter

Used by over 2,100 unique public repositories

Table of Contents

API Docs

Swagger UI and the OpenAPI document are available directly from the service:

  • GET /docs (Swagger UI)
  • GET /docs/ (Swagger UI)
  • GET /openapi.json (OpenAPI 3.1 JSON)

Note: badge endpoints are implemented as 302 redirects to img.shields.io. In Swagger UI, "Try it out" typically shows the followed downstream 200 image/svg+xml response when the redirect target succeeds.

Caching & Rate Limits

The API applies Cache-Control and an in-memory service-wide IP rate limit so badge renderers (GitHub and similar markdown clients) can cache safely while still limiting abuse:

  • GET /visits/*: Cache-Control: no-store
  • Badge redirect endpoints (/years, /repos, /gists, /updated, /created): public, max-age=0, s-maxage=300, stale-while-revalidate=600
  • GET /commits/*: public, max-age=0, s-maxage=120, stale-while-revalidate=300
  • SVG endpoints (/contributors, /last-stars): public, max-age=0, s-maxage=300, stale-while-revalidate=600
  • Docs/OpenAPI (/docs, /openapi.json): public, max-age=300, s-maxage=300

All hits to the service count toward the same limiter window per source IP. When request limits are exceeded, the API returns 429 Too Many Requests with Retry-After and RateLimit-* headers.

Available badges ๐Ÿ”ฅ

All endpoints support the parameters you can also use for shields.io badges, you can check out their style documentation here.

Visits Badge

Visits Badge

Returns a badge containing the visitor counter for your repository

Endpoint

https://badges.pufler.dev/visits/{username}/{repo}

Markdown

[![Visits Badge](https://badges.pufler.dev/visits/pujux/badge-it)](https://badges.pufler.dev)


Years Badge

Years Badge

Returns a badge containing the number of years you have been a member

Endpoint

https://badges.pufler.dev/years/{username}

Markdown

[![Years Badge](https://badges.pufler.dev/years/pujux)](https://badges.pufler.dev)


Repos Badge

Repos Badge

Returns a badge containing the number of your public repositories

Endpoint

https://badges.pufler.dev/repos/{username}

Markdown

[![Repos Badge](https://badges.pufler.dev/repos/pujux)](https://badges.pufler.dev)


Gists Badge

Gists Badge

Returns a badge containing the number of your public gists

Endpoint

https://badges.pufler.dev/gists/{username}

Markdown

[![Gists Badge](https://badges.pufler.dev/gists/pujux)](https://badges.pufler.dev)


Updated Badge

Updated Badge

Returns a badge that shows when the repository was last updated

Endpoint

https://badges.pufler.dev/updated/{username}/{repo}

Markdown

[![Updated Badge](https://badges.pufler.dev/updated/pujux/badge-it)](https://badges.pufler.dev)


Created Badge

Created Badge

Returns a badge that shows when the repository was created

Endpoint

https://badges.pufler.dev/created/{username}/{repo}

Markdown

[![Created Badge](https://badges.pufler.dev/created/pujux/badge-it)](https://badges.pufler.dev)


Commits Badge

Commits Badge

Returns a badge that shows the number of commits you have published in a specified periodicity (yearly, monthly, weekly, daily or all)

Endpoint

https://badges.pufler.dev/commits/{periodicity}/{username}

Markdown

[![Commits Badge](https://badges.pufler.dev/commits/monthly/pujux)](https://badges.pufler.dev)


Contributors Display

Contributors Display

Returns an SVG that displays all contributors of the specified repository

You can specify size in pixels that will be used for each avatar, padding in pixels that will be used between the avatars, perRow to control how many avatars are shown per row and bots as either 'true' or 'false' to hide bot contributors

Endpoint

https://badges.pufler.dev/contributors/{user}/{repo}?size={number}&padding={number}&perRow={number}&bots={boolean}

Markdown

[![Contributors Display](https://badges.pufler.dev/contributors/pujux/badge-it?size=50&padding=5&perRow=10&bots=true)](https://badges.pufler.dev)


Last Stars Display

Last Stars Display

Returns an SVG that displays the last starred repositories of the specified user

You can specify count to control how many starred repositories will be shown, padding in pixels that will be used between the repositories and perRow to control how many repositories will be shown per row

Endpoint

https://badges.pufler.dev/last-stars/{user}?count={number}&padding={number}&perRow={number}

Markdown

[![Last Stars Display](https://badges.pufler.dev/last-stars/pujux?count=6&padding=15&perRow=3)](https://badges.pufler.dev)

Got an idea for a badge? ๐Ÿ˜€

Create an issue!

License

Badge-It is licensed under the BSD 3-Clause License.