# Docker Hub Scraper — Images, Pulls & Tags (`hipersoft/docker-hub-scraper`) Actor

Search Docker Hub or look up exact repositories and get description, star count, pull count, official/automated flags, last updated, categories and tags. Clean public API, no login or key.

- **URL**: https://apify.com/hipersoft/docker-hub-scraper.md
- **Developed by:** [hiper soft](https://apify.com/hipersoft) (community)
- **Categories:** Developer tools
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.0012 / repository scraped

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

Learn more: https://docs.apify.com/platform/actors/running/actors-in-store#pay-per-event

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.
Actors are written with capital "A".

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.
The best way to integrate Actors is as follows.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).

# README

## Docker Hub Scraper — Images, Pulls, Stars & Tags

Search Docker Hub or look up exact repositories and get back clean, structured JSON: short and full description, star count, pull count, official and automated flags, last-updated date, categories, storage size and (optionally) tags with sizes and push dates. It pulls from the public Docker Hub API — **no login, no API key.** Built for DevOps engineers, security teams and OSS researchers who need reliable image metadata at scale.

### Features

- 🔎 **Free-text search** — run any Docker Hub query (`postgres`, `machine learning`) and collect matching repositories in bulk.
- 🎯 **Exact lookups** — pass official images like `nginx` or namespaced repos like `bitnami/postgresql`, combined with search results.
- 📊 **Popularity metrics** — capture `starCount` and `pullCount` for every repository.
- 🏷️ **Official & automated flags** — `isOfficial` and `isAutomated` to filter trusted images.
- 🗂️ **Full details** — optional `fullDescription`, `categories`, `storageSize`, `lastUpdated` and `dateRegistered`.
- 🔖 **Tags on demand** — optional `tags` array with name, `fullSize`, `lastUpdated` and `digest`, capped by `maxTags`.
- 🔗 **Ready to use** — every record includes `dockerHubUrl` and a copy-paste `pullCommand`.

### What you get

Each repository becomes one clean JSON record:

```json
{
  "repoName": "library/nginx",
  "name": "nginx",
  "namespace": "library",
  "isOfficial": true,
  "isAutomated": false,
  "starCount": 19876,
  "pullCount": 10500000000,
  "shortDescription": "Official build of Nginx.",
  "fullDescription": "# What is Nginx?\n\nNginx is an open source reverse proxy server...",
  "categories": ["Web Servers"],
  "storageSize": 67108864,
  "lastUpdated": "2024-05-29T18:44:12.000000Z",
  "dateRegistered": "2014-06-05T21:31:04.000000Z",
  "dockerHubUrl": "https://hub.docker.com/_/nginx",
  "pullCommand": "docker pull library/nginx",
  "tags": [
    { "name": "latest", "fullSize": 72401234, "lastUpdated": "2024-05-29T18:44:12.000000Z", "digest": "sha256:abc123..." }
  ]
}
```

### Input

```json
{
  "queries": ["postgres"],
  "repositories": ["nginx", "bitnami/postgresql"],
  "maxPerQuery": 50,
  "includeDetails": true,
  "includeTags": false,
  "maxTags": 20
}
```

| Field | Description |
|-------|-------------|
| `queries` | Free-text Docker Hub searches (repository name and description). Each is scraped separately. |
| `repositories` | Exact repos by name, e.g. `nginx` (official) or `bitnami/postgresql`, combined with search results. |
| `maxPerQuery` | Maximum repositories to collect per search query (1–1000). |
| `includeDetails` | Fetch each repo's detail (full description, last updated, categories, storage size). |
| `includeTags` | Fetch each repository's tags (name, size, last pushed). |
| `maxTags` | Maximum tags to fetch per repository when tags are included (1–100). |

### Use cases

- Compare pull and star counts across competing images before choosing a base.
- Inventory the tags and sizes available for a set of images in your stack.
- Filter for official images to harden a supply-chain security review.
- Build a catalog of images for a topic (e.g. databases) for research or docs.

### Pricing

Pay-per-event: you're billed a small amount per run and per item scraped — you only pay for what you get. See the **Pricing** tab for current rates.

### FAQ

**Do I need a Docker Hub account or API key?**
No. The actor reads from the public [Docker Hub](https://hub.docker.com/) API, so no login or API key is required.

**How many repositories can I scrape per run?**
Each free-text query can return up to 1000 repositories (`maxPerQuery`), and you can add exact repos — official images like `nginx` or namespaced repos like `bitnami/postgresql` — in the `repositories` field.

**Is scraping Docker Hub allowed?**
This actor only reads publicly available repository metadata through Docker Hub's own public API; it does not pull image layers or access private repos. Review Docker's terms before large-scale or commercial reuse.

**What's the output format?**
Structured JSON — one record per repository with fields such as `starCount`, `pullCount`, `isOfficial`, `shortDescription`, `categories`, `storageSize`, a ready-to-use `pullCommand` and optional `tags`. Export as JSON, CSV, Excel or via the API.

**Can I get the tags for each image?**
Yes. Set `includeTags` to attach a `tags` array (name, `fullSize`, `lastUpdated`, `digest`) and use `maxTags` (1–100) to cap how many tags are fetched per repository.

### Related Actors

Building a supply-chain or DevOps data set? Combine this with our other developer-data scrapers:

- [GitHub Scraper](https://apify.com/hipersoft/github-scraper) — repositories and user profiles with stars, topics, licenses and leads.
- [npm Package Scraper](https://apify.com/hipersoft/npm-scraper) — search and look up npm packages with metadata, dependencies and downloads.
- [PyPI Package Scraper](https://apify.com/hipersoft/pypi-scraper) — metadata, dependencies, licenses and downloads for Python packages.
- [crates.io Scraper](https://apify.com/hipersoft/crates-scraper) — Rust crate metadata, versions, licenses and download trends.

### Notes

This actor uses the public Docker Hub API and reads only publicly available repository data. It is an independent tool and is not affiliated with, endorsed by, or sponsored by Docker, Inc.; "Docker" and "Docker Hub" are trademarks of Docker, Inc.

# Actor input Schema

## `queries` (type: `array`):

Free-text Docker Hub searches (matches repository name and description). Each is scraped separately.

## `repositories` (type: `array`):

Look up specific repos by name, e.g. "nginx" (official) or "bitnami/postgresql". Combined with any search results.

## `maxPerQuery` (type: `integer`):

Maximum repositories to collect per search query.

## `includeDetails` (type: `boolean`):

Fetch each repository's detail (full description, last updated, categories, storage size).

## `includeTags` (type: `boolean`):

Fetch each repository's tags (name, size, last pushed).

## `maxTags` (type: `integer`):

Maximum tags to fetch per repository when tags are included.

## Actor input object example

```json
{
  "queries": [
    "nginx",
    "machine learning"
  ],
  "repositories": [
    "nginx",
    "bitnami/postgresql"
  ],
  "maxPerQuery": 50,
  "includeDetails": true,
  "includeTags": false,
  "maxTags": 20
}
```

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "queries": [
        "postgres"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("hipersoft/docker-hub-scraper").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = { "queries": ["postgres"] }

# Run the Actor and wait for it to finish
run = client.actor("hipersoft/docker-hub-scraper").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "queries": [
    "postgres"
  ]
}' |
apify call hipersoft/docker-hub-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=hipersoft/docker-hub-scraper",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/acts/9rhthV0CxBSw6kqYS/builds/d81J9pYqUsZMzD15S/openapi.json
