# Docker Hub Image Popularity Tracker (`saint_person/docker-hub-image-popularity-tracker`) Actor

Compare Docker Hub official images by pull count, star count, and freshness. Ranked by popularity. DevOps/infra audience, official Docker Hub API, no key required.

- **URL**: https://apify.com/saint\_person/docker-hub-image-popularity-tracker.md
- **Developed by:** [saint person](https://apify.com/saint_person) (community)
- **Categories:** Developer tools
- **Stats:** 2 total users, 1 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

Pay per event

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

Compare Docker Hub official images by pull count, star count, and freshness — ranked by popularity. DevOps/infra audience. Official Docker Hub v2 API, no key required.

### Who This Is For

- **DevOps/Platform engineers** evaluating base images for reliability and community trust
- **Engineering teams** choosing container runtimes and databases based on ecosystem health
- **Cloud architects** assessing which images have the most active maintenance and adoption
- **Security teams** identifying stale base images that need updating

### Key Features & Value

- **Cross-image popularity ranking**: not a single-image lookup — compare up to 20 images side by side
- **Composite popularity labels**: MEGA (>=15K stars + >=5B pulls), STAR (>=10K stars), SUPER\_POPULAR (>=10B pulls), POPULAR (>=5B pulls), HEALTHY (>=1B pulls), ACTIVE
- **Freshness tracking**: days since last update for each image — spot stale images at a glance
- **Rich metadata**: description, star count, pull count, last update date
- **No API key needed**: uses Docker Hub's public v2 API for official library images

### Quick Start

Run with default top-10 images:

```json
{
  "images": "nginx,ubuntu,alpine,node,postgres,redis,mysql,mongo,python,busybox"
}
```

Or compare your own set:

```json
{
  "images": "nginx,alpine,python,node,traefik,caddy,flink,neo4j,rabbitmq,grafana"
}
```

### Input Parameters

| Parameter | Type | Required | Default | Description |
|-----------|------|----------|---------|-------------|
| `images` | string | Yes | nginx,ubuntu,alpine,node,postgres,redis,mysql,mongo,python,busybox | Comma-separated Docker Hub official image names (max 20) |

### Output Structure

```json
{
  "imageName": "nginx",
  "description": "Official build of Nginx.",
  "starCount": 21340,
  "pullCount": 13178954773,
  "lastUpdated": "2026-07-18",
  "daysSinceUpdate": 1,
  "popularityLabel": "MEGA"
}
```

Each run produces one result item per image, ranked by pull count descending.

### Usage Examples

**1. Base image comparison**
Input: `nginx,ubuntu,alpine,debian,busybox`
Use case: Choose a base image with the best combination of star count, pull count, and freshness.

**2. Database image health check**
Input: `postgres,mysql,mongo,redis,cassandra,mariadb,neo4j,couchdb`
Use case: Compare database image popularity and maintenance recency across options.

**3. AI-agent workflow — weekly infrastructure health report**

```json
{
  "images": "nginx,ubuntu,alpine,postgres,redis,node,python"
}
```

Output feeds into a dashboard that flags images with daysSinceUpdate > 90.

**4. Zapier/automation — Slack alert for stale base images**

- Cron trigger runs the actor weekly
- Filter output rows where `daysSinceUpdate` > 180
- Post to Slack: "🚨 Stale base image: {imageName} hasn't been updated in {daysSinceUpdate} days"

**5. CI/CD — pre-build base image freshness check**
Before a production build, run the actor on your base images. If any show daysSinceUpdate > 90, surface a warning in CI: "Base image {imageName} is {daysSinceUpdate} days stale — consider updating."

**6. Runtime platform comparison**
Input: `traefik,caddy,nginx,haproxy,envoy`
Use case: Compare reverse-proxy/proxy image popularity and maintenance velocity across the ecosystem.

### Integration Notes

- **Zapier/Make/n8n**: HTTP GET output via Apify webhook. Filter on `popularityLabel` or `daysSinceUpdate` field.
- **MCP**: Include as a tool for agents to query Docker image popularity on demand.
- **AI Agent**: Call with `{ "images": "your,images,here" }`, process the ranked list programmatically.
- **API**: Uses Docker Hub's public v2 API — no key management needed for official library images. Community image names (`username/repo`) also work.

### Pricing & Typical Cost

- **Run start**: $0.01 (one per actor execution)
- **Per result item**: $0.003 (one per image)
- **Typical 10-image run**: $0.01 + 10 × $0.003 = **$0.04 total**
- **Maximum 20-image run**: $0.01 + 20 × $0.003 = **$0.07 total**

### Troubleshooting

- **"No results"**: Check image names exist on Docker Hub. Official library images use short names (`nginx`, not `library/nginx`). Community images need full path (`username/repo`).
- **"HTTP 404"**: The image name is not found in Docker Hub's official library. Verify the name or use the community namespace format.
- **Slow run**: The actor makes 1 fast API call per image. With 20 images that's 20 calls — each completes in <1s. Retries add time only on transient errors.
- **Auth**: No API key is needed. Docker Hub's v2 API requires no auth for public repository metadata.

### Changelog

- **1.0** (2026-07-19): Initial release. Cross-image popularity ranking via Docker Hub v2 API.

# Actor input Schema

## `images` (type: `string`):

Comma-separated Docker Hub official image names to compare (max 20). Example: nginx,ubuntu,alpine,node,postgres,redis,mysql,mongo,python,busybox

## Actor input object example

```json
{
  "images": "nginx,ubuntu,alpine,node,postgres,redis,mysql,mongo,python,busybox"
}
```

# 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 = {
    "images": "nginx,ubuntu,alpine,node,postgres,redis,mysql,mongo,python,busybox"
};

// Run the Actor and wait for it to finish
const run = await client.actor("saint_person/docker-hub-image-popularity-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 = { "images": "nginx,ubuntu,alpine,node,postgres,redis,mysql,mongo,python,busybox" }

# Run the Actor and wait for it to finish
run = client.actor("saint_person/docker-hub-image-popularity-tracker").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 '{
  "images": "nginx,ubuntu,alpine,node,postgres,redis,mysql,mongo,python,busybox"
}' |
apify call saint_person/docker-hub-image-popularity-tracker --silent --output-dataset

```

## MCP server setup

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

```

## OpenAPI specification

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