# Docker Hub Scraper (`klondikeking/docker-hub-scraper`) Actor

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

## Pricing

$1.00 / 1,000 image extracteds

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/actors/running/actors-in-store.md#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 - Container Image Metadata & Analytics

Extract comprehensive Docker Hub image metadata including pull counts, star ratings, tags, architectures, and vulnerability insights. This Actor enables DevOps teams, security researchers, and marketplace analysts to gather intelligence on container images at scale.

### Use Cases

**DevOps Intelligence** — Monitor popular base images, track update frequency, and identify deprecated containers in your infrastructure. Compare pull counts and community adoption to make informed technology choices.

**Security Auditing** — Extract image metadata to identify outdated containers, analyze layer information, and track vulnerability exposure across your Docker Hub dependencies.

**Marketplace Analysis** — Research container trends, identify high-usage images, and analyze the competitive landscape of Docker Hub's 10M+ container ecosystem.

**CI/CD Integration** — Automatically validate base image freshness before deployments by checking last update timestamps and available architectures.

### Input

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `imageNames` | Array | Yes | List of Docker image names (e.g., "nginx", "library/node", "username/repo") |
| `includeTags` | Boolean | No | Extract detailed tag information (default: true) |
| `maxTagsPerImage` | Integer | No | Maximum tags to extract per image, 0 = all (default: 20) |
| `proxyConfiguration` | Object | No | Proxy settings for requests |

### Output

The Actor outputs a dataset with the following fields:

```json
{
  "name": "nginx",
  "namespace": "library",
  "repository": "nginx",
  "description": "Official build of Nginx.",
  "pullCount": 2150000000,
  "starCount": 7854,
  "lastUpdated": "2026-04-10T12:34:56.789Z",
  "isOfficial": true,
  "isPrivate": false,
  "architectures": ["amd64", "arm64", "arm/v7"],
  "tags": [
    {
      "name": "latest",
      "digest": "sha256:abc123...",
      "size": 58720256,
      "os": "linux",
      "architecture": "amd64",
      "lastPushed": "2026-04-10T12:34:56.789Z"
    }
  ],
  "url": "https://hub.docker.com/_/nginx"
}
```

### Pricing

Pay Per Event: $0.001 per image extracted

Pricing is calculated based on the number of images successfully processed. Tag extraction is included at no additional cost. Proxy usage is billed separately based on your Apify proxy plan.

### Limitations

- Docker Hub API has rate limits (approximately 100 requests per 5 minutes for unauthenticated requests)
- Private repositories require authentication (not supported in this version)
- Vulnerability scanning data requires Docker Hub Pro subscription (not accessible via public API)
- Image layer details are limited to tag-level information

### FAQ

**Q: Can I extract data from private repositories?**
A: This version only supports public repositories. Private repository support requires authentication tokens.

**Q: How do I format image names correctly?**
A: Use the format "namespace/repo" for user images or just "imagename" for official library images (e.g., "nginx", "bitnami/redis").

**Q: What happens if an image does not exist?**
A: The Actor logs the error and continues processing other images. Errors are recorded in the stats output.

**Q: Is there a limit to how many images I can process?**
A: There is no hard limit, but consider Docker Hub rate limits. Use proxy rotation for large batches.

### Changelog

- **v1.0.12** — Refreshed build, aligned actor title with live Store listing
- **v1.0.11** — Refreshed build, aligned actor metadata with live Store listing
- **v1.0.10** — Refreshed build, validated dependency tree and cloud runtime
- **v1.0.7** — Refreshed build, hardened proxy routing and ignore files
- **v1.0.0** — Initial release with image metadata, tag extraction, and PPE pricing

# Actor input Schema

## `imageNames` (type: `array`):

List of Docker Hub image names to scrape (e.g., 'nginx', 'library/node', 'username/repo')

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

Extract detailed tag information for each image

## `maxTagsPerImage` (type: `integer`):

Maximum number of tags to extract per image (0 = all)

## `proxyConfiguration` (type: `object`):

Configure proxy settings for the scraper

## Actor input object example

```json
{
  "imageNames": [
    "nginx",
    "node",
    "redis"
  ],
  "includeTags": true,
  "maxTagsPerImage": 20,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

# Actor output Schema

## `dataset` (type: `string`):

Default dataset containing image data

## `stats` (type: `string`):

Key-value store with extraction statistics

# 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 = {
    "imageNames": [
        "nginx",
        "node",
        "redis"
    ],
    "includeTags": true,
    "maxTagsPerImage": 20,
    "proxyConfiguration": {
        "useApifyProxy": true
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("klondikeking/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 = {
    "imageNames": [
        "nginx",
        "node",
        "redis",
    ],
    "includeTags": True,
    "maxTagsPerImage": 20,
    "proxyConfiguration": { "useApifyProxy": True },
}

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

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

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

```

## CLI example

```bash
echo '{
  "imageNames": [
    "nginx",
    "node",
    "redis"
  ],
  "includeTags": true,
  "maxTagsPerImage": 20,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}' |
apify call klondikeking/docker-hub-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,klondikeking/docker-hub-scraper"
        }
    }
}

```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/vu1iWIvJLlgf6geye/builds/IusOANeJeRFQ5qlD9/openapi.json
