# Docker Hub Image Scraper (`lulzasaur/dockerhub-scraper`) Actor

Scrape Docker Hub container images. Search by keyword or fetch specific repos. Get pull counts, star counts, tags, descriptions, and image metadata.

- **URL**: https://apify.com/lulzasaur/dockerhub-scraper.md
- **Developed by:** [lulz bot](https://apify.com/lulzasaur) (community)
- **Categories:** E-commerce
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $10.00 / 1,000 results

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 Image Scraper

Scrape Docker Hub container images and repository metadata. Search by keyword or fetch specific images by name. Extract pull counts, star counts, tags with sizes, descriptions, and full repository details.

### Modes

| Mode | Description |
|------|-------------|
| `search` | Search images by keyword |
| `image` | Fetch details for specific images by namespace/name |

### Output Fields

| Field | Description |
|-------|-------------|
| `name` | Image/repository name |
| `namespace` | Docker Hub namespace (e.g. "library", "bitnami") |
| `description` | Short description |
| `starCount` | Number of stars |
| `pullCount` | Total pull count |
| `lastUpdated` | ISO timestamp of last update |
| `isOfficial` | Whether it's an official Docker image |
| `isAutomated` | Whether builds are automated |
| `tags` | Latest 10 tags with name, size, lastPushed, digest |
| `fullDescription` | Full README/description (truncated to 2000 chars) |
| `sourceUrl` | Direct URL to the Docker Hub page |
| `scrapedAt` | ISO timestamp of scrape |

### Input Options

- **Mode**: `search` or `image`
- **Search Queries**: Keywords (e.g. "nginx", "python web framework")
- **Image Names**: Specific images in namespace/name format (e.g. "library/nginx", "bitnami/postgresql"). For official images you can use just the name (e.g. "nginx").
- **Max Results**: Up to 500 per query
- **Proxy**: Optional proxy configuration

### Example Output

```json
{
  "name": "nginx",
  "namespace": "library",
  "description": "Official build of Nginx.",
  "starCount": 19500,
  "pullCount": 4200000000,
  "lastUpdated": "2026-04-20T08:00:00.000Z",
  "isOfficial": true,
  "isAutomated": false,
  "tags": [
    {
      "name": "latest",
      "size": 67108864,
      "lastPushed": "2026-04-20T08:00:00.000Z",
      "digest": "sha256:abc123..."
    }
  ],
  "fullDescription": "# What is Nginx?...",
  "sourceUrl": "https://hub.docker.com/r/library/nginx",
  "scrapedAt": "2026-04-26T12:00:00.000Z"
}
```

### Use Cases

- **DevOps Research**: Find popular base images for your stack
- **Security Auditing**: Monitor image update frequency and tag digests
- **Popularity Tracking**: Track pull counts and stars over time
- **Container Inventory**: Build a catalog of images used in your org
- **Competitive Analysis**: Compare similar container solutions

### Notes

- Uses the public Docker Hub API v2 (no authentication required for public repos)
- Tag details include size and digest for vulnerability tracking
- Full descriptions are truncated to 2000 characters to keep output manageable
- Rate limits are generous; the scraper adds small delays between requests

***

### Run on Apify

This scraper runs on the [Apify platform](https://apify.com/?fpr=lulzasaur) — a full-stack web scraping and automation cloud. Sign up for a free account to get started with 30-day trial of all features.

[Try Apify free ->](https://apify.com/?fpr=lulzasaur)

# Actor input Schema

## `mode` (type: `string`):

Choose 'search' to search images by keyword, or 'image' to fetch specific images by namespace/name.

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

Keywords to search for (mode=search). E.g. 'nginx', 'python web framework'.

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

Specific images to fetch (mode=image). Format: namespace/name or library/name for official images. E.g. 'library/nginx', 'bitnami/postgresql'.

## `limit` (type: `integer`):

Maximum number of images to return per search query.

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

Optional proxy to use.

## Actor input object example

```json
{
  "mode": "search",
  "searchQueries": [
    "nginx"
  ],
  "imageNames": [],
  "limit": 100
}
```

# 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("lulzasaur/dockerhub-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 = {}

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

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,lulzasaur/dockerhub-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/ooHgGScQFuY8O0BeU/builds/DPBAhcl7QHmodoetM/openapi.json
