Better Fetch

Docker Hub Scraper

Search Docker Hub repositories, fetch one public repository's metadata, or list one page of tag metadata through Docker Hub JSON endpoints, returning normalized image names, pulls, stars, official flags, timestamps, URLs, sizes, digests, architectures, and OS fields.

Overview

Docker Hub Scraper gives agents and DevOps workflows structured access to public Docker Hub repository metadata. Search public image repositories by keyword, fetch one exact repository by name or Docker Hub URL, or list a bounded page of tags for a repository. The tool normalizes namespaces, image names, repository URLs, pull counts, stars, official and automated flags, privacy labels when returned, repository type, status, descriptions, registration and update timestamps, tag names, tag URLs, image sizes, digests, architectures, operating systems, variants, and last-updated metadata. It is designed for container ecosystem research, image popularity monitoring, DevOps catalog enrichment, supply-chain inventory, base-image discovery, migration planning, and agent-readable Docker image context.

Last validated: Jul 3, 2026

Playground

search = keyword search; repository = one repository metadata record; tags = one page of repository tags.

Optional Docker Hub repository name when repository is not supplied.

Maximum search result or tag rows to return.

Keyword query for search mode.

Optional Docker Hub namespace when repository is not supplied.

Repository name or Docker Hub URL for repository/tags modes, such as nginx, library/nginx, nginxinc/nginx-unprivileged, or https://hub.docker.com/r/library/nginx.

Sign in to run this tool

~1 credit per run · runs against your account

Input

mode"search" | "repository" | "tags"default: "search"

search = keyword search; repository = one repository metadata record; tags = one page of repository tags.

namestring

Optional Docker Hub repository name when repository is not supplied.

limitintegerdefault: 10

Maximum search result or tag rows to return.

querystring

Keyword query for search mode.

namespacestring

Optional Docker Hub namespace when repository is not supplied.

repositorystring

Repository name or Docker Hub URL for repository/tags modes, such as nginx, library/nginx, nginxinc/nginx-unprivileged, or https://hub.docker.com/r/library/nginx.

Output

modestringrequired

Mode used for this run

tagsobject[]

Docker Hub tag rows

countintegerrequired

Number of repository or tag rows returned

querystring

Search query used

next_urlstring

Docker Hub pagination URL when returned

repositorystring

Resolved namespace/name repository

source_urlstringrequired

Docker Hub JSON URL fetched

repositoriesobject[]

Docker Hub repository search rows

repository_recordobject

Exact repository metadata record

repository_record.namestring

Repository name

repository_record.rankinteger

Result rank

repository_record.statusinteger

Status code

repository_record.namespacestring

Repository namespace

repository_record.repo_namestring

namespace/name repository identifier

repository_record.is_privateboolean

Private flag when returned

repository_record.pull_countinteger

Pull count

repository_record.star_countinteger

Star count

repository_record.affiliationstring

Affiliation label when returned

repository_record.descriptionstring

Longer description when returned

repository_record.is_officialboolean

Official image flag

repository_record.is_automatedboolean

Automated build flag

repository_record.last_updatedstring

Last update timestamp

repository_record.last_modifiedstring

Last metadata modification timestamp

repository_record.repository_urlstring

Docker Hub repository URL

repository_record.date_registeredstring

Registration timestamp

repository_record.repository_typestring

Repository type

repository_record.short_descriptionstring

Short description

repository_record.status_descriptionstring

Status description

Examples

nginx-search

{
  "mode": "search",
  "limit": 3,
  "query": "nginx"
}

nginx-repository

{
  "mode": "repository",
  "repository": "nginx"
}

nginx-tags

{
  "mode": "tags",
  "limit": 3,
  "repository": "library/nginx"
}

Use cases

Container discovery

Search Docker Hub for images by keyword and rank candidates by pulls, stars, official status, and descriptions.

Image monitoring

Fetch repository metadata and tag update timestamps for base images, vendor images, or internal dependency watchlists.

Supply-chain inventory

Collect repository URLs, namespaces, tag sizes, digests, architectures, and OS metadata before deeper SBOM or vulnerability checks.

FAQ

Does Docker Hub Scraper require a Docker Hub login?

No. Version 0.1 uses public Docker Hub JSON endpoints and only returns metadata visible without account-specific authentication.

Does it download container images or layers?

No. It returns repository and tag metadata. It does not pull images, download layers, inspect filesystems, or scan vulnerabilities.

How do I query official images such as nginx?

Pass repository nginx or library/nginx. The tool resolves single-part names to the official library namespace.

Use it anywhere

MCP (Claude, Cursor, any client)

# Add the Better Fetch MCP connector (or paste the URL into
# Claude → Settings → Connectors → Add custom connector):
claude mcp add --transport http better-fetch https://betterfetch.co/api/mcp \
  --header "Authorization: Bearer bf_your_key_here"

# Then ask for the tool by name: docker_hub_scraper

REST

curl -sS -X POST "https://betterfetch.co/api/tools/docker_hub_scraper/run" \
  -H "Authorization: Bearer bf_your_key_here" \
  -H "Content-Type: application/json" \
  -d '{"input": {"mode":"search","limit":3,"query":"nginx"}}'

Run locally

git clone https://github.com/better-fetch/tools/tree/main/tools/docker-hub-scraper && cd docker-hub-scraper && npm i
BETTER_FETCH_API_KEY=bf_your_key_here npx bf-tool run --input '{"mode":"search","limit":3,"query":"nginx"}'