Docker Hub API
Free Docker Hub API with no key for public images: repository metadata, pull counts, stars, tags and last-updated dates. Tested curl example and live JSON.
Endpoint tested and returned HTTP 200 on 2026-08-19
What is the Docker Hub API?
The Docker Hub API provides free, key-free access to public repository metadata — description, pull count, star count, available tags and last-updated timestamps — for any public container image.
Public repository data on Docker Hub is readable without authentication, which makes it easy to display image popularity, check available tags, or detect when a base image has been updated.
The pull count is the headline metric and is genuinely useful for judging whether an image is widely trusted. Note that anonymous pulls from Docker Hub are rate limited at the registry level — that is a separate concern from this metadata API, which is not.
Quick facts
- Base URL
https://hub.docker.com/v2- Authentication
- Public repository metadata needs no auth. Private repos and higher registry pull limits require a token.
- Rate limit
- No published limit on metadata reads. Image pulls themselves are separately rate limited.
- Pricing
- Free for public metadata.
- CORS
- Not enabled — call it from your server
- Official docs
- Read the docs
How to use the Docker Hub API
Every request below was executed against the live API on 2026-08-19, and the response shown is the real body it returned — not an illustration.
1. Fetch metadata for an official image
GET https://hub.docker.com/v2/repositories/library/nginx
curl 'https://hub.docker.com/v2/repositories/library/nginx'const res = await fetch("https://hub.docker.com/v2/repositories/library/nginx");
if (!res.ok) throw new Error(`Request failed: ${res.status}`);
const data = await res.json();
console.log(data);import requests
res = requests.get("https://hub.docker.com/v2/repositories/library/nginx", timeout=20)
res.raise_for_status()
print(res.json()){
"user": "library",
"name": "nginx",
"namespace": "library",
"repository_type": "image",
"status": 1,
"status_description": "active",
"description": "Official build of Nginx.",
"is_private": false,
"is_automated": false,
"star_count": 21360,
"pull_count": 13277909756,
"last_updated": "2026-08-19T19:51:34.274983Z",
"last_modified": "2026-08-19T19:14:19.323791Z",
"date_registered": "2014-06-05T19:14:45Z",
"collaborator_count": 0,
"affiliation": null,
"hub_user": "stackbrew",
"has_starred": false,
"full_description": "# Quick reference\n\n-\t**Maintained by**: \n\t[the NGINX Docker Maintainers](https://github.com/nginxinc/docker-nginx)\n\n-\t**Where to get help**: \n\t[the Docker Community Slack](https://dockr.ly/comm-slack), [Server Fault](https://serverfault.com/help/on-topic), [Unix & Linux](https://unix.stackexchange.com/help/on-topic), or [Stack Overflow](https://stackoverflow.com/help/on-topic)\n\n# Supported tags and respective `Dockerfile` links\n\n-\t[`1.31.4`, `mainline`, `1`, `1.31`, `latest`, `1.31.4-trixie`, `mainline-trixie`, `1-trixie`, `1.31-trixie`, `trixie`](https://github.com/nginx/docker-nginx/blob/b8590bd36b4504b9b847fcf2e98a9111dcae85fa/mainline/debian/Dockerfile)\n\n-\t[`1.31.4-perl`, `mainline-perl`, `1-perl`, `1.31-perl`, `perl`, `1.31.4-trixie-perl`, `mainline-trixie-perl`, `1-trixie-perl`, `1.31-trixie-perl`, `trixie-perl`](https://github.com/nginx/docker-nginx/blob/b8590bd36b4504b9b847fcf2e98a9111dcae85fa/mainline/debian-perl/Dockerfile)\n\n-\t[`1.31.4-otel`, `mainline-otel`, `1-otel`, `1.31-otel`, `otel`, `1Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
<namespace>/<repository> | path | Required | Image namespace and name; official images use `library`. library/nginx |
tags | path | Optional | Append /tags to list available tags. tags |
page_size | integer | Optional | Results per page on list endpoints. 25 |
Response fields
name / namespacestring- Repository name and owning namespace.
descriptionstring- Short repository description.
star_countinteger- Number of stars.
pull_countinteger- Total pulls — the main popularity signal.
last_updatedstring- ISO timestamp of the most recent push.
is_officialboolean- Whether this is a Docker Official Image.
What you can build with the Docker Hub API
- Show image popularity and last-updated date in internal tooling
- Detect when a base image has been rebuilt and trigger a rebuild
- List available tags for a version picker
- Audit which images your infrastructure depends on and how current they are
Common errors and how to fix them
404
Unknown repository, or an official image queried without the library namespace.
Fix: Official images live under `library`, so nginx is `library/nginx`.
401
The repository is private.
Fix: Private repositories require a bearer token obtained from the Docker Hub login endpoint.
Docker Hub API — frequently asked questions
Does the Docker Hub API need authentication?
Not for public repository metadata. Private repositories require a token, and separately, anonymous image pulls from the registry are rate limited.
How do I query an official image like nginx?
Official images live under the `library` namespace, so the path is /v2/repositories/library/nginx.
How do I list all tags for an image?
Append /tags to the repository path. The response is paginated, so follow the `next` link for images with many tags.
Is pull_count a reliable popularity measure?
It is the best available signal, but it counts automated CI pulls too, so very high numbers partly reflect build pipelines rather than distinct human users.
Tools that pair with this API
JSON Formatter
Format, beautify and minify JSON online with 2-space, 4-space or tab indentation. Sort keys alphabetically and catch syntax errors instantly — free and private.
JSON Validator
Free online JSON validator: validate JSON and find syntax errors with the exact line and column. See root type, key counts and depth — instant and 100% private.
Docker Hub is an independent third-party service and is not affiliated with ByteTools or ByteVancer. Details on this page were verified on 2026-08-19; always check the official documentation before relying on this API in production, as terms and limits can change.