Docker Hub API

The Docker Hub API turns image names into repository data as typed rows — search a keyword and get name, description, stars, pulls and the official/automated flags for every matching image, or pass exact references ("redis", "bitnami/postgresql") and get each repository's full record back, including the date of its last push.

Those are two different jobs — discovery and monitoring — served through one call shape. Requests go out over the TLS tier as plain HTTPS, no browser and no render cost, which is why an image row costs $0.0003. References that do not resolve come back under failed and are never billed, and the row layout matches our npm, PyPI and crates.io collectors, so registry tooling you build once runs across ecosystems.

$0.0003 per delivered image, up to 100 images per run. Nothing delivered means nothing charged.

How the Docker Hub API works

One POST, two modes. With query the collector walks Docker Hub's search results in order and delivers up to 100 ranked images. With images it looks up each reference individually — up to 50 per run — and returns the repository record itself, which is the only mode that carries last_updated.

Inputs

No field is strictly required, but a run needs one of the two modes: query for search or images for detail lookups. max_results (1–100, default 25) caps delivery in both modes — the safety belt when the reference list is generated by another job.

What one image looks like

pulls is the Hub's cumulative all-time counter — it only moves up, so diffing two runs gives you pulls per interval, the closest thing to a public adoption metric Docker publishes. stars is the social signal, is_official and is_automated are the trust flags, and last_updated (detail mode) is the field that catches abandoned images. name comes back bare for officials and as namespace/name for everyone else.

What the Docker Hub API costs

$0.0003 per delivered image ($0.30 per 1,000). Nothing delivered means nothing charged, and the $2 monthly free credit covers roughly 6,666 images here. Volume tiers take up to 30% off.

$0.0003 per delivered image — $0.30 per 1,000. Re-checking every base image referenced across a 500-service infrastructure costs fifteen cents a day; a one-off sweep of an entire vendor namespace is pennies. The first $2 of usage each month is free, which at this price is about 6,666 images before a card is ever involved.

Search runs that match nothing and references that fail to resolve cost nothing at all.

Docker Hub API vs the Hub's own v2 endpoints

Docker Hub's web API is keyless and free, and for a handful of lookups you should call hub.docker.com/v2 yourself — there is no paywall here to pretend about. The friction is operational. Search and repository detail are two endpoints with two response shapes you have to reconcile; the interesting fields sit at different depths and have shifted over the years; and sustained polling from one IP is exactly the traffic pattern the Hub throttles first.

Through the collector both modes come back as one flat row, the fetches are spread across rotating exits instead of hammering from a single address, and the schema is versioned on our side — when the Hub rearranges a payload, the parser is our 3 a.m. problem, not yours. One scope note, stated plainly: this reads the Hub's metadata, not the registry. It does not pull images, list tags or fetch manifests, and it neither consumes nor bypasses Docker's pull rate limits.

Versus scripting hub.docker.com yourself

A curl loop over the v2 endpoints works on the first afternoon. What accumulates afterwards is the boring part:

Delegating buys the merged schema and per-row billing. If you would rather keep your own scripts and just want cleaner egress under them, the residential proxy network this rides on is available on its own.

What people build with it

Base-image freshness audits

Feed the references from your Dockerfiles' FROM lines through detail mode and watch last_updated. An image that has not been pushed in two years is a finding worth a ticket, and this catches it without anyone opening the Hub.

Pull-count adoption tracking

Run the same watchlist weekly and diff pulls. Because the counter is cumulative, the delta is a clean downloads-per-week series — the metric devtool vendors actually put in board decks — for your image and every competitor's.

Namespace and ecosystem research

Search a niche — "postgres backup", "otel collector" — and rank the results by stars and pulls to map who owns a category, which images are official, and where an unserved gap sits.

Limits and what this collector is not

Search delivers at most 100 images per run and detail mode takes up to 50 references; larger inventories parallelise cleanly across runs, up to your plan's rate limit — 60 requests a minute on pay-as-you-go, 1,200 on the largest tier. Counts are whatever the Hub reports at read time; pull totals update on Docker's cadence, not in real time.

Scope: repository-level metadata only. No tag lists, no manifests, no image layers, no vulnerability scans, and nothing that touches — or gets around — Docker's pull rate limits. The data is public catalogue metadata; Docker's terms still govern automated access, so keep your use proportionate and get proper advice where it matters.

FAQ

Is the Docker Hub API free?

Docker Hub's own web API is keyless and free, and this collector adds a free monthly allowance on top: $2 of usage with no card, which covers about 6,666 delivered images. Past that it is $0.0003 per image, and only images actually delivered are ever billed.

Does this bypass Docker Hub pull rate limits?

No, and it does not need to. Pull limits apply to downloading image layers from the registry. This collector reads repository metadata — stars, pull counts, descriptions, last push — from the Hub's web API. It never pulls an image and has no effect on your pull quota in either direction.

Can I get the pull count for a specific image?

Yes. Pass the reference in the images array — redis, or bitnami/postgresql — and the row comes back with pulls, stars, the official and automated flags and last_updated. Up to 50 references per run, and any that do not resolve are reported under failed without being billed.

Does it return tags, manifests or image contents?

No. The unit here is the repository record, so you get metadata about the listing, not the image itself — no tag list, no manifest digests, no layers. If your job needs registry internals, that is a different tool speaking the registry protocol.

Related scrapers