# Docker Hub Images, Tags & Pulls Scraper | 2Space (`2space/docker-hub-containers-scraper`) Actor

Fast Docker Hub container registry scraper for DevOps, security, and B2B DevTools teams. Scrapes official and community images, total pull counts, stars, OS/arch tags, digests, and image sizes.

- **URL**: https://apify.com/2space/docker-hub-containers-scraper.md
- **Developed by:** [2Space Group](https://apify.com/2space) (community)
- **Categories:** Developer tools, AI, Lead generation
- **Features:** Limited permissions
- **Stats:** 1 total users, 0 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.70 / 1,000 docker hub images scraped

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

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

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
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.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## 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.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## Docker Hub Images, Tags & Pulls Scraper | 2Space

> **Built by 2Space** · Zero-browser **Docker Hub scraper**, **Docker image metadata API**, **container registry extractor**, and **Docker Hub tags and pull counts** indexer engineered for AI agents, MCP clients, DevOps teams, and container intelligence workflows.

[![Apify Actor](https://img.shields.io/badge/Apify-docker--hub--containers--scraper-00C853?style=flat-square)](https://apify.com/2space/docker-hub-containers-scraper)
[![MCP Ready](https://img.shields.io/badge/MCP-Ready-2563EB?style=flat-square)](https://mcp.apify.com?tools=2space/docker-hub-containers-scraper)
[![Zero Browser](https://img.shields.io/badge/Runtime-Pure%20HTTP-7C3AED?style=flat-square)](https://apify.com/2space/docker-hub-containers-scraper)

Whether you need a fast **Docker Hub scraper** for container catalog discovery, a structured **Docker image metadata API** for AI agent tool calls, a lightweight **container registry extractor** for tracking **Docker Hub tags and pull counts**, or accurate **container image sizes and architectures** (`amd64`, `arm64`, `ppc64le`, `s390x`), this Actor delivers clean, deduplicated JSON records in seconds with zero headless browser overhead.

***

### Why Choose This Scraper?

- **Pure HTTP Speed:** Queries the official Docker Hub v2 search and tag endpoints directly over HTTP without Playwright, Puppeteer, or proxy overhead, finishing default runs in seconds.
- **Official & Community Namespace Mapping:** Automatically maps Docker Official Images (such as `postgres` and `redis`) to the `library` namespace (`library/postgres`, `https://hub.docker.com/_/postgres`) while preserving organization namespaces (`cimg/postgres`, `https://hub.docker.com/r/cimg/postgres`).
- **Flat, Agent-Ready Records:** Outputs clean fields (`repoName`, `namespace`, `shortDescription`, `isOfficial`, `isAutomated`, `starCount`, `pullCount`, `latestTag`, `latestTagSizeMb`, `architectures`, `lastUpdated`, `hubUrl`, `extractedAt`) ready for SQL tables, spreadsheets, LLM context windows, and MCP tool responses.
- **Empty `{}` Input Ready:** Works immediately with zero configuration—running `{}` searches `["postgres", "redis"]`, fetches up to 2 tags per repository, and returns up to 8 deduplicated container records.
- **No Data, No Charge (Pay-Per-Event):** Uses the single `docker-image-scraped` event (`count: 1`), charged **only after** a validated repository record is pushed to the dataset, protected by `maxItems` and `maxCostUsd` spending caps.

***

### Popular Use Cases

- **DevOps & Platform Engineering:** Compare base image compressed sizes (`latestTagSizeMb`), verify multi-architecture availability (`amd64` and `arm64`) before ARM migrations, and inspect `lastUpdated` freshness across candidate images.
- **AI Coding Agents & MCP Workflows:** Give Claude, Cursor, ChatGPT, or Antigravity direct tool access to real-time Docker Hub star counts, pull counts, and latest tag metadata without web browsing.
- **Open-Source Ecosystem & Market Research:** Benchmark container adoption (`pullCount`, `starCount`) across competing databases, runtimes, vector stores, and developer tools.
- **Software Supply-Chain Cataloging:** Build structured inventories of official versus community or automated container repositories for internal catalogs and dependency reviews.

***

### Input Parameters

| Field | Type | Default | Description |
|---|---|---|---|
| `searchQueries` | `string[]` | `["postgres", "redis"]` | Docker Hub search keywords or repository names (e.g., `nginx`, `python`, `alpine`). |
| `includeLatestTags` | `boolean` | `true` | Fetch the repository tags endpoint to populate `latestTag`, `latestTagSizeMb`, `architectures`, and `lastUpdated`. |
| `maxTagsPerRepo` | `integer` | `2` | Number of recent tags to inspect per repository (`1` to `100`). |
| `maxItems` | `integer` | `8` | Hard cap on deduplicated Docker Hub repositories pushed and billed per run (`1` to `1000`). |
| `maxCostUsd` | `number` | `0.25` | Pre-charge spending safety cap in USD for Pay-Per-Event billing. |

***

### Example JSON Output

Each item stored in the default dataset contains flat fields:

```json
{
  "repoName": "postgres",
  "namespace": "library",
  "shortDescription": "The PostgreSQL object-relational database system provides reliability and data integrity.",
  "isOfficial": true,
  "isAutomated": false,
  "starCount": 15062,
  "pullCount": 12797995872,
  "latestTag": "15.20-alpine3.24",
  "latestTagSizeMb": 109.6,
  "architectures": [
    "amd64",
    "ppc64le",
    "386",
    "s390x",
    "arm",
    "arm64",
    "riscv64"
  ],
  "lastUpdated": "2026-11-29T01:07:36.598Z",
  "hubUrl": "https://hub.docker.com/_/postgres",
  "extractedAt": "2026-12-03T03:45:00.000Z"
}
```

Execution diagnostics are also saved to the default Key-Value Store under `RUN_DIAGNOSTICS`, including per-query counts, tag fetch totals, deduplication stats, and spending limit flags.

***

### 1-Prompt MCP & AI Agent Setup

Connect `2space/docker-hub-containers-scraper` to Claude Desktop, Cursor, ChatGPT, or Antigravity in one step using the Apify MCP endpoint:

```text
https://mcp.apify.com?tools=2space/docker-hub-containers-scraper
```

Or add it to your `mcpServers` configuration:

```json
{
  "mcpServers": {
    "apify-docker-hub": {
      "url": "https://mcp.apify.com?tools=2space/docker-hub-containers-scraper",
      "headers": {
        "Authorization": "Bearer YOUR_APIFY_TOKEN"
      }
    }
  }
}
```

Then run a single prompt:

> *"Use docker-hub-containers-scraper to find the top 10 Docker Hub images for `python` and `nginx`, including their pull counts, latest tag sizes in MB, and arm64 support."*

You can also invoke it directly via the Apify REST API:

```text
POST https://api.apify.com/v2/acts/2space~docker-hub-containers-scraper/run-sync-get-dataset-items?token=YOUR_APIFY_TOKEN
```

***

### Pricing & No Data, No Charge

- **Event:** `docker-image-scraped` (`count: 1` per validated pushed repository).
- **No Data, No Charge:** If a search returns 0 valid repositories, `Actor.charge()` is never called.
- **Budget Controls:** Both `maxItems` and `maxCostUsd` are enforced prior to pushing and charging, and Apify's `eventChargeLimitReached` stops the run cleanly as soon as your spending limit is reached.

***

### Issues & Support

Found an edge case with a repository namespace, multi-arch manifest, or schema field? Open an issue on the Actor's **Issues** tab in Apify Console (`https://apify.com/2space/docker-hub-containers-scraper/issues`) with your anonymized input payload and `RUN_DIAGNOSTICS` record.

# Actor input Schema

## `searchQueries` (type: `array`):

Docker Hub search keywords or repository names (e.g., 'postgres', 'redis', 'nginx', 'python').

## `includeLatestTags` (type: `boolean`):

When enabled, fetches the tags endpoint for each repository to extract latestTag, latestTagSizeMb, architectures, and lastUpdated.

## `maxTagsPerRepo` (type: `integer`):

Number of recent tags to request per repository when Include Latest Tags is enabled.

## `maxItems` (type: `integer`):

Hard cap on the maximum number of deduplicated Docker Hub repositories to push and charge.

## `maxCostUsd` (type: `number`):

Pre-charge spending safety cap in USD for Pay-Per-Event billing.

## Actor input object example

```json
{
  "searchQueries": [
    "postgres",
    "redis"
  ],
  "includeLatestTags": true,
  "maxTagsPerRepo": 2,
  "maxItems": 8,
  "maxCostUsd": 0.25
}
```

# Actor output Schema

## `overview` (type: `string`):

Dataset items containing extracted Docker Hub repositories with flat fields.

# 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 = {
    "searchQueries": [
        "postgres",
        "redis"
    ],
    "includeLatestTags": true,
    "maxTagsPerRepo": 2,
    "maxItems": 8,
    "maxCostUsd": 0.25
};

// Run the Actor and wait for it to finish
const run = await client.actor("2space/docker-hub-containers-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 = {
    "searchQueries": [
        "postgres",
        "redis",
    ],
    "includeLatestTags": True,
    "maxTagsPerRepo": 2,
    "maxItems": 8,
    "maxCostUsd": 0.25,
}

# Run the Actor and wait for it to finish
run = client.actor("2space/docker-hub-containers-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 '{
  "searchQueries": [
    "postgres",
    "redis"
  ],
  "includeLatestTags": true,
  "maxTagsPerRepo": 2,
  "maxItems": 8,
  "maxCostUsd": 0.25
}' |
apify call 2space/docker-hub-containers-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,2space/docker-hub-containers-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/1K0IHQqKbzyzKYUyK/builds/bas5rWi8fhLREs3aC/openapi.json
