# Docker Hub Image Tracker (`gochujang/docker-hub-tracker`) Actor

Track Docker Hub images: pull counts, star ratings, official/verified status, image tags, digest, OS/architecture, layer count, and vulnerability data. Search by keyword or fetch specific images. Monitor popular containers and base images.

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

## Pricing

Pay per usage

This Actor is paid per platform usage. The Actor is free to use, and you only pay for the Apify platform usage, which gets cheaper the higher subscription plan you have.

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

## 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 Image Tracker

Track Docker Hub images: pull counts, tags, size, architecture support, vulnerability scan status, official images, stars, and update frequency. Search images by keyword or fetch specific repositories. Returns tag history, layer count, and platform support.

### Features

- **Image stats**: pull count, star count, official/automated status, last updated
- **Tag details**: tag name, digest, size, OS, architecture, last pushed timestamp
- **Search**: find images by keyword, optionally filtered to official images only
- **Batch processing**: track multiple images in parallel with concurrency control
- **404 handling**: gracefully skips images that do not exist

### Input

| Field | Type | Description | Default |
|-------|------|-------------|---------|
| `images` | `string[]` | Docker image names to track | — |
| `searchKeyword` | `string` | Keyword to search Docker Hub | — |
| `maxSearchResults` | `integer` | Max images from search (1–100) | `25` |
| `includeTags` | `boolean` | Fetch latest 10 tags per image | `true` |
| `officialOnly` | `boolean` | Filter to official Docker images only | `false` |

**Image name formats accepted:**

- `nginx` — official library image
- `python:3.12` — tag is stripped, latest data fetched
- `grafana/grafana` — organization image
- `myorg/myrepo:tag` — tag stripped, namespace/name used

At least one of `images` or `searchKeyword` must be provided.

### Output

Each record contains:

```json
{
  "namespace": "library",
  "name": "nginx",
  "full_name": "library/nginx",
  "description": "Official build of Nginx.",
  "is_official": true,
  "is_automated": false,
  "pull_count": 1000000000,
  "star_count": 20000,
  "last_updated": "2024-11-01T10:00:00Z",
  "content_types": ["image"],
  "media_types": ["application/vnd.docker.distribution.manifest.v2+json"],
  "top_tags": [
    {
      "name": "latest",
      "digest": "sha256:abc123...",
      "last_pushed": "2024-11-01T10:00:00Z",
      "size": 73400000,
      "os": "linux",
      "arch": "amd64",
      "layer_count": null
    }
  ],
  "fetched_at": "2024-11-15T12:00:00Z"
}
```

### Usage Examples

#### Track specific images

```json
{
  "images": ["nginx", "redis", "python:3.12", "grafana/grafana"],
  "includeTags": true
}
```

#### Search for database images

```json
{
  "searchKeyword": "postgresql",
  "maxSearchResults": 10,
  "includeTags": false
}
```

#### Official images only

```json
{
  "searchKeyword": "python",
  "officialOnly": true,
  "maxSearchResults": 5,
  "includeTags": true
}
```

#### Combined: specific images + search

```json
{
  "images": ["nginx", "redis"],
  "searchKeyword": "monitoring",
  "maxSearchResults": 5,
  "includeTags": true
}
```

### Pricing

- **$0.002 per image analyzed** (Pay-Per-Event)
- No authentication required — uses public Docker Hub API
- No proxy needed

### Notes

- Official library images use `library` as the namespace (e.g. `library/nginx`)
- Tags returned are the 10 most recently pushed, sorted by Docker Hub's default order
- Rate limits: Docker Hub public API allows generous usage without authentication
- The Actor runs without any API keys or tokens required

***

### Related actors

- [GitHub Repo Stats](https://apify.com/gochujang/github-repo-stats) — GitHub star growth and contributor count for the source repo behind each Docker image
- [npm Package Trends](https://apify.com/gochujang/npm-package-trends) — npm download trends for Node.js packages that often ship as Docker images
- [PyPI Downloads Tracker](https://apify.com/gochujang/pypi-downloads-tracker) — Python package download stats for Python-based Docker images

### Feedback

If this actor helps your DevOps research, a review helps others find it: [Leave a review on Apify Store](https://apify.com/gochujang/docker-hub-tracker#reviews)

# Actor input Schema

## `images` (type: `array`):

Docker image names (e.g. \['nginx', 'postgres', 'ubuntu'])

## `searchKeyword` (type: `string`):

Search Docker Hub for matching images (used if images list is empty)

## `maxSearchResults` (type: `integer`):

Maximum number of images to return from search (1–100)

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

Include top tags for each image

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

Filter to official Docker images only

## Actor input object example

```json
{
  "maxSearchResults": 25,
  "includeTags": true,
  "officialOnly": false
}
```

# Actor output Schema

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

No description

# 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 = {};

// Run the Actor and wait for it to finish
const run = await client.actor("gochujang/docker-hub-tracker").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 = {}

# Run the Actor and wait for it to finish
run = client.actor("gochujang/docker-hub-tracker").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 '{}' |
apify call gochujang/docker-hub-tracker --silent --output-dataset

```

## MCP server setup

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

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/mgbaDsv5wD0QS98xQ/builds/s0me7NWb9PCYgSszd/openapi.json
