# Docker Hub Scraper & API: Images, Pulls, Stars, Tags (`ponderable_hydrometer/dockerhub-search`) Actor

Docker Hub scraper and API: search container images or look up repositories for pull count, stars, official status, automated-build flag and description, plus last update and the 10 newest image tags with size, architectures and digest. No login.

- **URL**: https://apify.com/ponderable_hydrometer/dockerhub-search.md
- **Developed by:** [Ponderable Hydrometer](https://apify.com/ponderable_hydrometer) (community)
- **Categories:** Developer tools
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.50 / 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?

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 Scraper & API — Images, Pulls, Stars, Tags

**Docker Hub popularity and freshness in one table.** Search Docker Hub or look up specific repositories and get pull counts, stars, official and automated-build flags, descriptions and, if you ask for them, the newest tags with size, architectures and digest. Data comes from the public Docker Hub API; no login or token is needed.

### What you can do with it

- **Compare container images** for a technology (`postgres`, `nginx`, `redis`) by pulls and stars, and filter on `official`.
- **Track adoption** of your own or a competitor's images over time by scheduling the Actor.
- **Check freshness** of the repositories you depend on (`lastUpdated`, newest tags).
- **Read tag details**: size, supported architectures (`linux/amd64`, `linux/arm64`) and digest of the 10 most recently updated tags.

### Input

| Field | Type | Default | Description |
|-------|------|---------|-------------|
| `query` | string | `postgres` | Search terms. Ignored when `repositories` is given. |
| `repositories` | array | — | Specific repositories to look up, e.g. `library/nginx`, `grafana/grafana`. A bare name such as `nginx` means `library/nginx`. |
| `withTags` | boolean | `false` | Add the 10 most recently updated tags per image. |
| `maxResults` | integer | `200` | Stop after this many images (search mode). Docker Hub serves at most 200 search results without login. |

Example: `{"repositories": ["library/nginx", "grafana/grafana"], "withTags": true}`

### What you get

One row per image: `repository`, `description`, `pulls`, `stars`, `official`, `automated`, `lastUpdated`, `url`, and with tags a `tags` list of `{tag, lastUpdated, sizeBytes, architectures, digest}`.

### Output sample

```json
{
  "repository": "library/postgres",
  "description": "The PostgreSQL object-relational database system provides reliability and data integrity.",
  "pulls": 1000000000,
  "stars": 14210,
  "official": true,
  "automated": false,
  "lastUpdated": "2026-11-14T03:12:44.000Z",
  "url": "https://hub.docker.com/_/postgres",
  "tags": [
    {
      "tag": "17.2",
      "lastUpdated": "2026-11-14T03:12:44.000Z",
      "sizeBytes": 158312345,
      "architectures": [
        "linux/amd64",
        "linux/arm64"
      ],
      "digest": "sha256:…"
    }
  ]
}
```

### Use it from the API or an AI agent

```bash
curl -X POST "https://api.apify.com/v2/acts/ponderable_hydrometer~dockerhub-search/run-sync-get-dataset-items?token=<YOUR_API_TOKEN>" \
  -H "Content-Type: application/json" \
  -d '{"query": "postgres", "maxResults": 25}'
```

Through the Apify MCP server, an AI agent can call it as a tool: `https://mcp.apify.com?tools=ponderable_hydrometer/dockerhub-search`.

### Search or lookup

- **Search mode** (`query`): returns Docker Hub's own search ranking. The search API does not include the update time, so `lastUpdated` is `null` in this mode.
- **Lookup mode** (`repositories`): reads each repository directly and fills `lastUpdated`. A repository that does not exist is skipped with a warning in the log.

### Limits and good to know

- Docker Hub rounds very large pull counts (the display shows values such as 1B+; the API gives the exact figure it holds).
- Search results include community images; filter on `official` for the curated ones.
- Tag lookups add one request per image, so `withTags` makes runs slower on large result sets.
- The Actor reads public repositories only; private repositories and vulnerability scan results are not available.
- If nothing is returned for the input, the run ends as FAILED instead of succeeding empty.

### FAQ

**Can I list all tags of an image?** No, only the 10 most recently updated.

**Does it pull or download images?** No. It reads metadata only.

**How do I get the update time of search results?** Run the repositories you care about through lookup mode.

### Pricing

Pay per result — **$0.50 per 1,000 results** (one image = one result), plus Apify's standard per-run start event ($0.00005 per GB of memory, so a fraction of a cent per run). No subscription.

# Actor input Schema

## `query` (type: `string`):

Search Docker Hub, e.g. "postgres" or "nginx". Ignored when repositories are given.

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

Look up these instead, e.g. library/nginx, grafana/grafana.

## `withTags` (type: `boolean`):

Up to 10 newest tags per image with size and architectures.

## `maxResults` (type: `integer`):

Stop after this many images (Docker Hub serves at most 200 search results without login).

## Actor input object example

```json
{
  "query": "postgres",
  "repositories": [],
  "withTags": false,
  "maxResults": 25
}
```

# Actor output Schema

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

All rows produced by this run, as JSON.

# 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 = {
    "maxResults": 25
};

// Run the Actor and wait for it to finish
const run = await client.actor("ponderable_hydrometer/dockerhub-search").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 = { "maxResults": 25 }

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

```

## MCP server setup

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

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/OjhrcgKFp2YO8fKNQ/builds/hAHsvSTGIYnTlCECd/openapi.json
