# Docker Hub API
> The container image registry — Docker Hub — as an API. Look up any image (repository) for its description, total pull count and star count, official status, last-updated date and categories, plus the ready-to-run `docker pull` command; list an image's tags and versions with each tag's compressed size, supported platforms (linux/amd64, linux/arm64, …) and publish date; and search the registry of millions of images. Covers everything from official images like nginx, postgres, redis, node, python and ubuntu to vendor images like bitnami/postgresql. Live from the official hub.docker.com API. Ideal for DevOps dashboards, CI/CD and supply-chain tooling, image catalogs and update automation. Open data from Docker Hub.

## Authentication
All requests require your oanor API key in the `x-oanor-key` header. Get one at https://www.oanor.com/developer/keys.

```bash
curl -H "x-oanor-key: oanor_live_…" "https://api.oanor.com/docker-api/..."
```

## Pricing
- **Free** (Free) — 3,700 calls/Mo, 2 req/s
- **Starter** ($5/Mo) — 49,900 calls/Mo, 8 req/s
- **Pro** ($14/Mo) — 244,000 calls/Mo, 20 req/s
- **Mega** ($36/Mo) — 1,216,000 calls/Mo, 50 req/s

## Endpoints

### Docker Hub

#### `GET /v1/image` — Image (repository) metadata

**Parameters:**
- `name` (query, required, string) — Image name, e.g. nginx or bitnami/postgresql Example: `nginx`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/docker-api/v1/image?name=nginx"
```

**Response:**
```json
{
    "data": {
        "image": {
            "name": "nginx",
            "status": "active",
            "full_name": "library/nginx",
            "namespace": "library",
            "categories": [
                "Web servers"
            ],
            "docker_url": "https://hub.docker.com/_/nginx",
            "pull_count": 13047598322,
            "star_count": 21287,
            "description": "Official build of Nginx.",
            "is_official": true,
            "last_updated": "2026-05-24T19:52:26.039369Z",
            "pull_command": "docker pull nginx",
            "canonical_name": "nginx",
            "date_registered": "2014-06-05T19:14:45Z"
        }
    },
    "meta": {
        "timestamp": "2026-05-31T14:24:44.932Z",
        "request_id": "c8358e8e-2f9b-4bed-bc73-743777cc2c76"
    },
    "status": "ok",
    "message": "Image retrieved",
    "success": true
}
```

#### `GET /v1/search` — Search the registry

**Parameters:**
- `q` (query, required, string) — Search term Example: `postgres`
- `limit` (query, optional, string) — Results (1-100, default 20)

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/docker-api/v1/search?q=postgres"
```

**Response:**
```json
{
    "data": {
        "count": 20,
        "query": "postgres",
        "total": 51392,
        "results": [
            {
                "name": "postgres",
                "docker_url": "https://hub.docker.com/_/postgres",
                "pull_count": 10726279840,
                "star_count": 14917,
                "description": "The PostgreSQL object-relational database system provides reliability and data integrity.",
                "is_official": true,
                "is_automated": false,
                "pull_command": "docker pull postgres"
            },
            {
                "name": "cimg/postgres",
                "docker_url": "https://hub.docker.com/r/cimg/postgres",
                "pull_count": 670452093,
                "star_count": 9,
                "description": null,
                "is_official": false,
                "is_automated": false,
                "pull_command": "docker pull cimg/postgres"
            },
            {
                "name": "circleci/postgres",
                "docker_url": "https://hub.docker.com/r/circleci/postgres",
                "pull_count": 509423944,
                "star_count": 35,
                "description": "The PostgreSQL object-relational database system provides reliability and data integrity.",
                "is_official": false,
                "is_automated": false,
                "pull_command": "docker pull circleci/postgres"
            },
            {
                "name": "kas
…(truncated, see openapi.json for full schema)
```

#### `GET /v1/tags` — Image tags / versions

**Parameters:**
- `name` (query, required, string) — Image name, e.g. redis Example: `redis`
- `limit` (query, optional, string) — Max tags (1-100, default 25)

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/docker-api/v1/tags?name=redis"
```

**Response:**
```json
{
    "data": {
        "tags": [
            {
                "name": "trixie",
                "size": 54269113,
                "digest": "sha256:aa049e689e141a4358ad1d4562dc49c88a89fbab711fd8fcc33f684c80b26301",
                "platforms": [
                    "linux/386",
                    "linux/ppc64le",
                    "linux/amd64",
                    "linux/arm/v5",
                    "linux/arm/v7",
                    "linux/arm64/v8",
                    "linux/riscv64",
                    "linux/s390x"
                ],
                "last_updated": "2026-05-28T21:06:02.626978Z"
            },
            {
                "name": "latest",
                "size": 54269113,
                "digest": "sha256:aa049e689e141a4358ad1d4562dc49c88a89fbab711fd8fcc33f684c80b26301",
                "platforms": [
                    "linux/s390x",
                    "linux/amd64",
                    "linux/arm/v5",
                    "linux/arm/v7",
                    "linux/arm64/v8",
                    "linux/386",
                    "linux/ppc64le",
                    "linux/riscv64"
                ],
                "last_updated": "2026-05-28T21:05:59.672296Z"
            },
            {
                "name": "8.8.0-trixie",
                "size": 54269113,
                "digest": "sha256:aa049e689e141a4358ad1d4562dc49c88a89fbab711fd8fcc33f684c80b26301",
                "platforms": [
                    "linux/amd64",
                   
…(truncated, see openapi.json for full schema)
```

### Meta

#### `GET /v1/meta` — Source & options

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/docker-api/v1/meta"
```

**Response:**
```json
{
    "data": {
        "note": "Live Docker Hub data. /v1/image = repository metadata (pull count, stars, description, official flag) + the docker-pull command; /v1/tags = image tags/versions with size, platforms and last-updated; /v1/search = search the registry. Bare names (e.g. nginx) are treated as official library images; use namespace/name (e.g. bitnami/postgresql) for user images.",
        "source": "Docker Hub — the container image registry (hub.docker.com)",
        "endpoints": [
            "/v1/image",
            "/v1/tags",
            "/v1/search",
            "/v1/meta"
        ]
    },
    "meta": {
        "timestamp": "2026-05-31T14:24:45.531Z",
        "request_id": "21a9b0da-7a42-4044-8c33-08bd48f43a05"
    },
    "status": "ok",
    "message": "Meta retrieved",
    "success": true
}
```


---
Marketplace page: https://www.oanor.com/api/docker-api
OpenAPI spec: https://www.oanor.com/api/docker-api/openapi.json
