# Docker Hub Container Pulls, Tags & Image Intel API (`regenerative_cornice/dockerhub-container-registry-api`) Actor

Extract Docker Hub pull counts, stars, latest tags, image sizes (MB), CPU architectures (amd64/arm64), digests, and update freshness via the official Docker Hub API v2. Zero API key—built for DevSecOps, VC tracking, n8n workflows, and AI agents (MCP).

- **URL**: https://apify.com/regenerative_cornice/dockerhub-container-registry-api.md
- **Developed by:** [John Erlbacher](https://apify.com/regenerative_cornice) (community)
- **Categories:** Developer tools, Business, AI
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.50 / 1,000 docker image profileds

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/running/actors-in-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 Container Pulls, Tags & Image Intel API

Extract structured **Docker Hub container image intelligence**—including cumulative **pull counts, star counts, official image status, descriptions, update freshness, latest tag names, compressed image sizes (MB), supported CPU architectures (`amd64`, `arm64`, `arm/v7`, etc.), OCI platforms, SHA-256 digests, and push timestamps**—directly from the official public **Docker Hub Registry API v2** (`https://hub.docker.com/v2/`).

Built for **DevSecOps engineers, software supply-chain auditors, platform engineering teams, VC open-source adoption analysts, competitive intelligence monitors, n8n workflows, and autonomous AI agents via Model Context Protocol (MCP)**.

Because this Actor speaks natively to the official public Docker Hub Registry API v2 (`/v2/repositories/{namespace}/{repo}/`, `/v2/repositories/{namespace}/{repo}/tags/`, and `/v2/search/repositories/`), it requires **zero API keys**, **zero Docker Hub logins**, **zero proxies**, and **zero headless browser overhead**—returning clean, deterministic, schema-validated JSON in seconds.

***

### Key Capabilities

- **Official Docker Hub Registry API v2 (Zero Credentials):** Query any public Docker Official Image (`library/python`, `library/postgres`, `library/nginx`) or organization/community container repository (`n8nio/n8n`, `qdrant/qdrant`, `ollama/ollama`) with zero authentication or proxy costs.
- **Direct Profiling & Registry Search Discovery:** Supply an explicit list of `repositories` (accepting `namespace/repo`, official shorthand like `python`, tagged references like `nginx:1.27`, or full Docker Hub URLs) and/or run keyword discovery via `searchQuery` against `/v2/search/repositories/`. Every discovered repository is automatically enriched with full repository stats and latest tag metadata.
- **Multi-Architecture & Container Size Intelligence:** Inspect each tag's compressed image footprint (`fullSizeMb` and exact `fullSizeBytes`), supported CPU architectures (`amd64`, `arm64`, `arm/v7`, `ppc64le`, `s390x`, `riscv64`), and full OCI platform tuples (`linux/amd64`, `linux/arm64/v8`) while automatically filtering out `unknown/unknown` OCI attestation entries.
- **Supply-Chain Digest & Freshness Tracking:** Capture exact manifest SHA-256 `digest` strings, `lastPushed`, `lastPulled`, `tagStatus`, repository `lastUpdated`, and `dateRegistered` to detect stale base images, verify immutable digest pinning, or alert when upstream container images ship new releases.
- **Open-Source Adoption & VC Traction Signals:** Track live `pullCount` and `starCount` velocities across developer tools, AI inference engines, self-hosted SaaS projects, and vector databases to benchmark commercial open-source momentum.
- **Resilient Rate Control & Graceful Batch Handling:** Includes polite request pacing, automatic exponential backoff with `Retry-After` support on transient HTTP 429/5xx responses, deterministic deduplication, and non-fatal HTTP 404 skipping so one typo never aborts a 100-image audit.

***

### Input Configuration

#### Example Input JSON (Direct Repository Profiling)

```json
{
  "repositories": [
    "library/python",
    "n8nio/n8n"
  ],
  "searchQuery": "",
  "maxTagsPerRepo": 5,
  "maxItems": 10
}
```

#### Example Input JSON (Registry Search Discovery Mode)

```json
{
  "repositories": [],
  "searchQuery": "vector database",
  "officialOnly": false,
  "maxTagsPerRepo": 3,
  "maxItems": 15
}
```

#### Input Parameters

| Field | Type | Default | Description |
| :--- | :--- | :--- | :--- |
| `repositories` | `array<string>` | `["library/python", "n8nio/n8n"]` | Docker Hub repositories to profile (`namespace/repo`, official shorthand like `postgres`, tagged refs, or Docker Hub URLs). Omit or pass `[]` to run purely in `searchQuery` mode. |
| `searchQuery` | `string` | `""` | Optional keyword query executed against `/v2/search/repositories/` to discover and profile matching container repositories. |
| `officialOnly` | `boolean` | `false` | When `true` alongside `searchQuery`, restricts discovered search results to Docker Official Images (`library/*`). |
| `maxTagsPerRepo` | `integer` | `5` | Number of most recently updated tags to fetch per repository (`0`–`100`). Set to `0` for ultra-fast metadata-only pulls without tag lookups. |
| `maxItems` | `integer` | `10` | Maximum total number of deduplicated repository profiles to return across `repositories` and `searchQuery` (`1`–`500`). |

***

### Output Dataset Schema

Each profiled container repository is pushed to the default Apify dataset as a structured JSON record:

```json
{
  "fullName": "n8nio/n8n",
  "namespace": "n8nio",
  "name": "n8n",
  "isOfficial": false,
  "pullCount": 289560551,
  "starCount": 1385,
  "description": "Free and open fair-code licensed node based Workflow Automation Tool.",
  "lastUpdated": "2026-11-22T08:18:04.537709Z",
  "dateRegistered": "2019-10-08T15:18:17Z",
  "isAutomated": false,
  "repositoryType": "image",
  "categories": [],
  "tagCount": 1842,
  "latestTagName": "v3-nightly-20261122-pc",
  "latestTagSizeMb": 357.22,
  "supportedArchitectures": ["amd64", "arm64"],
  "latestTags": [
    {
      "name": "v3-nightly-20261122-pc",
      "fullSizeMb": 357.22,
      "fullSizeBytes": 374567960,
      "architectures": ["amd64", "arm64"],
      "platforms": ["linux/amd64", "linux/arm64"],
      "digest": "sha256:0c01df1e7daa66b707087b8dc11dfa094291a458ff544b0358ccfcb94ac71ece",
      "lastPushed": "2026-11-22T08:18:04.537709Z",
      "lastPulled": "2026-11-22T18:45:12.110000Z",
      "tagStatus": "active"
    }
  ],
  "pullCommand": "docker pull n8nio/n8n",
  "hubUrl": "https://hub.docker.com/r/n8nio/n8n",
  "extractedAt": "2026-11-22T19:05:00Z"
}
```

***

### Pay-Per-Event Pricing (`image-profiled`)

This Actor uses transparent Apify **Pay-Per-Event (PPE)** billing:

- **Event name:** `image-profiled` — charged once per profiled Docker Hub repository pushed to your dataset, deduplicated via deterministic idempotency keys (`dh-<namespace>-<repo>`).
- **Non-existent repositories (HTTP 404) are never charged** and never abort the rest of your batch.
- **Hard budget cap protection:** The Actor checks `event_charge_limit_reached` on every repository and halts immediately when your configured maximum run spend limit is reached.

***

### Automate Base-Image & Open-Source Traction Alerts in n8n

Build a weekly **DevSecOps Container Watchlist** or **VC Pull-Velocity Tracker** in n8n:

1. **Schedule Trigger** — Run daily or every Monday at 08:00 UTC.
2. **HTTP Request Node (Apify Run-Sync Dataset Items)** — `POST` to:
   ```text
   https://api.apify.com/v2/acts/<YOUR_USERNAME>~dockerhub-container-registry-api/run-sync-get-dataset-items?token={{$env.APIFY_TOKEN}}
   ```
   JSON Body:
   ```json
   {
     "repositories": [
       "library/python",
       "library/node",
       "library/postgres",
       "n8nio/n8n",
       "qdrant/qdrant"
     ],
     "maxTagsPerRepo": 5,
     "maxItems": 10
   }
   ```
3. **Database / Slack / Google Sheets Node** — Append `pullCount`, `starCount`, `latestTagName`, `latestTagSizeMb`, and `latestTags[0].digest` to track week-over-week pull growth, alert when image sizes spike unexpectedly, or verify `arm64` Graviton readiness before Kubernetes upgrades.

***

### Use with AI Agents & Model Context Protocol (MCP)

Connect live Docker Hub container telemetry directly to **Claude Desktop, Cursor, Windsurf, or LangGraph agents** via the official Apify MCP Server:

```json
{
  "mcpServers": {
    "apify-dockerhub": {
      "command": "npx",
      "args": [
        "-y",
        "@apify/actors-mcp-server",
        "--actors",
        "<YOUR_USERNAME>/dockerhub-container-registry-api"
      ],
      "env": {
        "APIFY_TOKEN": "<YOUR_APIFY_API_TOKEN>"
      }
    }
  }
}
```

**Example Agent Prompts:**

- *"Profile `library/python`, `library/node`, and `n8nio/n8n` on Docker Hub and compare their pull counts, latest tag sizes in MB, and arm64 support."*
- *"Search Docker Hub for the top 10 `ollama` or LLM inference container images and rank them by pull count and update freshness."*
- *"Check whether `library/postgres` and `library/redis` have published new amd64/arm64 digests in the last 7 days."*

***

### Data Source Attribution

All container repository metadata, pull counts, star counts, search results, tags, image sizes, architectures, and digests are retrieved directly from the official public **Docker Hub Registry API v2** (`https://hub.docker.com/v2/`).

# Actor input Schema

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

List of Docker Hub repositories to profile in `namespace/repo` format (e.g., `library/python`, `n8nio/n8n`), shorthand official names (e.g., `postgres`, `nginx`), or Docker Hub URLs. Leave empty when using `searchQuery` alone.

## `searchQuery` (type: `string`):

Optional Docker Hub search query (via `/v2/search/repositories/`) to discover and profile matching container repositories (e.g., `postgres`, `qdrant`, `ollama`, `n8n`). Can be used alone or combined with `repositories`.

## `officialOnly` (type: `boolean`):

When enabled alongside `searchQuery`, restricts discovered search results to Docker Official Images (`library/*`). Explicitly listed `repositories` are always profiled.

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

Maximum number of most recently updated tags to fetch per repository (0 to 100). Includes tag name, size in MB, supported architectures, digest, and push timestamp.

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

Maximum total number of Docker Hub repository profiles to extract across `repositories` and `searchQuery` (1 to 500).

## Actor input object example

```json
{
  "repositories": [
    "library/python",
    "n8nio/n8n"
  ],
  "searchQuery": "",
  "officialOnly": false,
  "maxTagsPerRepo": 5,
  "maxItems": 10
}
```

# Actor output Schema

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

Structured overview table of profiled Docker Hub container repositories.

## `results` (type: `string`):

All extracted Docker Hub repository profiles including nested `latestTags` metadata.

# 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 = {
    "repositories": [
        "library/python",
        "n8nio/n8n"
    ],
    "searchQuery": "",
    "maxTagsPerRepo": 5,
    "maxItems": 10
};

// Run the Actor and wait for it to finish
const run = await client.actor("regenerative_cornice/dockerhub-container-registry-api").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 = {
    "repositories": [
        "library/python",
        "n8nio/n8n",
    ],
    "searchQuery": "",
    "maxTagsPerRepo": 5,
    "maxItems": 10,
}

# Run the Actor and wait for it to finish
run = client.actor("regenerative_cornice/dockerhub-container-registry-api").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 '{
  "repositories": [
    "library/python",
    "n8nio/n8n"
  ],
  "searchQuery": "",
  "maxTagsPerRepo": 5,
  "maxItems": 10
}' |
apify call regenerative_cornice/dockerhub-container-registry-api --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,regenerative_cornice/dockerhub-container-registry-api"
        }
    }
}
```

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/xuSkO6N98jY3Xw5VT/builds/hGdCZTLmBlrWTNsuU/openapi.json
