π Report Bug Β· π§ Submit PR Β· β Star Repo Β· π Sponsor Β· π¬ Discussions
π User Statistics - Get total pull counts across all repositories πΌοΈ Docker Stats Card - Embed Docker Hub stats as an SVG card π¦ Repository Details - Fetch detailed repository information π·οΈ Tag Listing - List all image tags for a repository π Search - Search Docker Hub repositories π Batch Stats - Get stats for multiple users in one request π Popular Repos - Discover popular Docker Hub repositories π OpenAPI Spec - Full OpenAPI specification endpoint π Bilingual - English & Chinese support π§ͺ Interactive Testing - Try APIs directly in the documentation β‘ Fast - Built with Hono.js for lightweight API responses π Rate Limiting - Built-in rate limit headers for API protection
npm i -g vercel
vercel --prodnpm install
npm run devVisit http://localhost:3000
Get total pull counts for a Docker Hub user.
| Parameter | Type | Required | Description |
|---|---|---|---|
| username | string | β | Docker Hub username |
| fields | string | β | Comma-separated fields to return |
Example:
curl "http://localhost:3000/api/user/stats?username=xuxuclassmate"Response:
{
"success": true,
"username": "xuxuclassmate",
"repositoryCount": 5,
"totalPulls": 123456,
"totalStars": 789,
"repositories": [...],
"timestamp": "2026-04-06T10:00:00.000Z"
}Returns an SVG card for Docker Hub stats.
| Parameter | Type | Required | Description |
|---|---|---|---|
| username | string | β | Docker Hub username |
| style | string | β | Card style: gradient, minimal, dark, light, github (default: gradient) |
Example:
<img src="https://docker-hub-pull-counter.vercel.app/api/docker-stats?username=xuxuclassmate" alt="Docker Hub Stats Card" />| Style | Description |
|---|---|
| gradient | Blue gradient (default) |
| minimal | Clean white minimal style |
| dark | Pure black dark style |
| light | Light blue sky style |
| github | GitHub-inspired dark style |
Example URLs for each style:
<img src="https://docker-hub-pull-counter.vercel.app/api/docker-stats?username=xuxuclassmate&style=gradient" alt="Gradient Card" />
<img src="https://docker-hub-pull-counter.vercel.app/api/docker-stats?username=xuxuclassmate&style=minimal" alt="Minimal Card" />
<img src="https://docker-hub-pull-counter.vercel.app/api/docker-stats?username=xuxuclassmate&style=dark" alt="Dark Card" />
<img src="https://docker-hub-pull-counter.vercel.app/api/docker-stats?username=xuxuclassmate&style=light" alt="Light Card" />
<img src="https://docker-hub-pull-counter.vercel.app/api/docker-stats?username=xuxuclassmate&style=github" alt="GitHub Card" />List all available card styles.
curl "https://docker-hub-pull-counter.vercel.app/api/docker-stats/styles"Response:
{
"success": true,
"styles": ["gradient", "minimal", "dark", "light", "github"],
"default": "gradient"
}Get detailed information about a repository.
| Parameter | Type | Required | Description |
|---|---|---|---|
| namespace | string | β | Docker Hub namespace |
| repo | string | β | Repository name |
List all tags for a repository.
| Parameter | Type | Required | Description |
|---|---|---|---|
| namespace | string | β | Docker Hub namespace |
| repo | string | β | Repository name |
| limit | integer | β | Max tags to return (default: 100) |
Search Docker Hub repositories.
| Parameter | Type | Required | Description |
|---|---|---|---|
| q | string | β | Search query |
| page | integer | β | Page number (default: 1) |
| page_size | integer | β | Results per page (default: 25) |
Get statistics for multiple Docker Hub users in a single request.
| Parameter | Type | Required | Description |
|---|---|---|---|
| usernames | string | β | Comma-separated list of usernames (max 10) |
Example:
curl "http://localhost:3000/api/batch/stats?usernames=node,python,golang"Response:
{
"success": true,
"total": 3,
"successful": 3,
"failed": 0,
"results": [...],
"timestamp": "2026-04-06T10:00:00.000Z"
}Get popular Docker Hub repositories.
| Parameter | Type | Required | Description |
|---|---|---|---|
| page | integer | β | Page number (default: 1) |
| page_size | integer | β | Results per page (default: 25, max: 100) |
Example:
curl "http://localhost:3000/api/popular/repos?page=1&page_size=10"Get the OpenAPI specification for this API in JSON format.
Example:
curl "http://localhost:3000/api/openapi.json"Embed a live SVG card anywhere that supports an image tag. The card fetches fresh Docker Hub user statistics for each request, so it does not need to call the public JSON endpoint first.
<img src="https://docker-hub-pull-counter.vercel.app/api/docker-stats?username=xuxuclassmate" alt="Docker Hub Stats Card" />The card includes:
- Total Pulls
- Repository Count
- Total Stars
/api/user/stats and /api/docker-stats fetch fresh Docker Hub user statistics on every request and return Cache-Control: no-store so totalPulls stays current.
Visit the deployed URL to access the interactive API documentation with:
- Live testing interface
- Parameter customization
- SVG card preview
- Real-time response display
- Language switcher (EN/δΈζ)
- Unauthenticated: ~100-200 requests/hour
- Authenticated: Higher limits (configure DOCKER_USERNAME and DOCKER_PASSWORD)
| Variable | Description |
|---|---|
| DOCKER_USERNAME | Docker Hub username for authenticated Docker Hub requests (optional) |
| DOCKER_PASSWORD | Docker Hub password for authenticated Docker Hub requests (optional) |
| UPSTASH_REDIS_REST_URL | Upstash Redis REST URL for API usage stats |
| UPSTASH_REDIS_REST_TOKEN | Upstash Redis REST token |
MIT
If this project helps you, consider supporting us:
- π GitHub Sponsors - Become a sponsor
- β Buy Me a Coffee - One-time support
- β Star this repo - It's free and means a lot!
XuXuClassMate
- GitHub: @XuXuClassMate
- Docker Hub: xuxuclassmate
- Organization: InnoNestX