pujux/badge-it
An API serving useful badges for your GitHub Profile README ๐๐ Formerly known as git-badges.
Badge-It
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
Returns a badge containing the visitor counter for your repository
Endpoint
https://badges.pufler.dev/visits/{username}/{repo}
Markdown
[](https://badges.pufler.dev)
Years Badge
Returns a badge containing the number of years you have been a member
Endpoint
https://badges.pufler.dev/years/{username}
Markdown
[](https://badges.pufler.dev)
Repos Badge
Returns a badge containing the number of your public repositories
Endpoint
https://badges.pufler.dev/repos/{username}
Markdown
[](https://badges.pufler.dev)
Gists Badge
Returns a badge containing the number of your public gists
Endpoint
https://badges.pufler.dev/gists/{username}
Markdown
[](https://badges.pufler.dev)
Updated Badge
Returns a badge that shows when the repository was last updated
Endpoint
https://badges.pufler.dev/updated/{username}/{repo}
Markdown
[](https://badges.pufler.dev)
Created Badge
Returns a badge that shows when the repository was created
Endpoint
https://badges.pufler.dev/created/{username}/{repo}
Markdown
[](https://badges.pufler.dev)
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
[](https://badges.pufler.dev)
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
[](https://badges.pufler.dev)
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
[](https://badges.pufler.dev)
Got an idea for a badge? ๐
Create an issue!
License
Badge-It is licensed under the BSD 3-Clause License.