> ## Documentation Index
> Fetch the complete documentation index at: https://docs.webrouter.net/llms.txt
> Use this file to discover all available pages before exploring further.

# Docker Hub

> Docker Hub repositories and image tags: descriptions, pull and star counts, last update, tag digests, sizes and platforms.

![](https://mintcdn.com/webrouter/gPu3tCeozwRcDBjt/logo/data-apis/docker-hub.webp?fit=max\&auto=format\&n=gPu3tCeozwRcDBjt\&q=85\&s=d165d045498c18ff99c040108e94a4fd)

[Web Catalog · Developer](https://docs.webrouter.net/data-apis.md?category=developer)

Key optional

Endpoints

4

Auth

Key in header

[Vendor docs](https://docs.docker.com/reference/api/hub/latest/) · Serves `hub.docker.com`

## Setup

| Variable | | What it is |
| - | - | - |
| `DOCKER_HUB_TOKEN` | some calls | a short-lived bearer JWT from POST [https://hub.docker.com/v2/auth/token](https://hub.docker.com/v2/auth/token) with your username and a personal access token; needed for private repositories and endpoints the docs mark as authenticated |

Put them in your environment or `.env`; [Data APIs](https://docs.webrouter.net/vendors.md) covers the other ways.

## Notes

* Public repositories are readable without a token. The bearer token is a JWT minted from POST /v2/auth/token (\{identifier, secret}); it expires, so refresh DOCKER\_HUB\_TOKEN when calls start returning 401.
* Rate-limited: a 429 carries Retry-After (seconds). These limits are separate from image pull limits.
* Lists page with page and page\_size and return count, next and previous.

## Endpoints

GET

List a namespace's repositories

Repositories of a user or organization, with pull counts, stars and last update.

[Open](#docker-hub-repositories-list)

GET

Get a repository

One repository's description, pull count, star count, status and dates.

[Open](#docker-hub-repositories-get)

GET

List a repository's tags

Tags with digests, sizes, platforms and last-pushed dates.

[Open](#docker-hub-tags-list)

GET

Get a tag

One tag's digest, images per platform, size and dates.

[Open](#docker-hub-tags-get)

### List a namespace's repositories

GET

`/v2/namespaces/{namespace}/repositories`

`docker-hub.repositories.list`

Repositories of a user or organization, with pull counts, stars and last update.

Input

<table>
  <thead>
    <tr>
      <th>
        Name
      </th>

      <th>
        Type
      </th>

      <th>
        In
      </th>

      <th>
        Notes
      </th>
    </tr>
  </thead>

  <tbody>
    <tr><td>`namespace` required</td><td>string</td><td>path</td><td>Namespace: a Docker Hub user or organization; library for official images. Example `library`</td></tr>
    <tr><td>`page`</td><td>integer</td><td>query</td><td>Page number, starting at 1. Example `1`</td></tr>
    <tr><td>`page_size`</td><td>integer</td><td>query</td><td>Items per page; default 10. Example `100`</td></tr>

    <tr>
      <td>
        `name`
      </td>

      <td>
        string
      </td>

      <td>
        query
      </td>

      <td>
        Only repositories whose name contains this.
      </td>
    </tr>

    <tr><td>`ordering`</td><td>string</td><td>query</td><td>Sort field; prefix - for descending. One of `name`, `-name`, `last_updated`, `-last_updated`, `pull_count`, `-pull_count`</td></tr>
  </tbody>
</table>

[Vendor docs](https://docs.docker.com/reference/api/hub/latest/) · Same job: [Libraries.io](https://docs.webrouter.net/data-apis/libraries-io.md#libraries-io-repositories-projects), [PyPI](https://docs.webrouter.net/data-apis/pypi.md#pypi-simple-list), [RubyGems.org](https://docs.webrouter.net/data-apis/rubygems.md#rubygems-owners-gems)

```python Python theme={null}
router.call_data_api("docker-hub.repositories.list", {'namespace': 'library', 'page': 1, 'page_size': 100})
```

```text MCP theme={null}
call_data_api(endpoint="docker-hub.repositories.list", params={"namespace": "library", "page": 1, "page_size": 100})
```

### Get a repository

GET

`/v2/namespaces/{namespace}/repositories/{repository}`

`docker-hub.repositories.get`

One repository's description, pull count, star count, status and dates.

Input

<table>
  <thead>
    <tr>
      <th>
        Name
      </th>

      <th>
        Type
      </th>

      <th>
        In
      </th>

      <th>
        Notes
      </th>
    </tr>
  </thead>

  <tbody>
    <tr><td>`namespace` required</td><td>string</td><td>path</td><td>Namespace: a Docker Hub user or organization; library for official images. Example `library`</td></tr>
    <tr><td>`repository` required</td><td>string</td><td>path</td><td>Repository name within the namespace. Example `nginx`</td></tr>
  </tbody>
</table>

[Vendor docs](https://docs.docker.com/reference/api/hub/latest/) · Same job: [crates.io](https://docs.webrouter.net/data-apis/crates-io.md#crates-io-crates-get), [Libraries.io](https://docs.webrouter.net/data-apis/libraries-io.md#libraries-io-projects-get), [npm registry](https://docs.webrouter.net/data-apis/npm.md#npm-packages-get), [PyPI](https://docs.webrouter.net/data-apis/pypi.md#pypi-project-get), [RubyGems.org](https://docs.webrouter.net/data-apis/rubygems.md#rubygems-gems-get)

```python Python theme={null}
router.call_data_api("docker-hub.repositories.get", {'namespace': 'library', 'repository': 'nginx'})
```

```text MCP theme={null}
call_data_api(endpoint="docker-hub.repositories.get", params={"namespace": "library", "repository": "nginx"})
```

### List a repository's tags

GET

`/v2/namespaces/{namespace}/repositories/{repository}/tags`

`docker-hub.tags.list`

Tags with digests, sizes, platforms and last-pushed dates.

Input

<table>
  <thead>
    <tr>
      <th>
        Name
      </th>

      <th>
        Type
      </th>

      <th>
        In
      </th>

      <th>
        Notes
      </th>
    </tr>
  </thead>

  <tbody>
    <tr><td>`namespace` required</td><td>string</td><td>path</td><td>Namespace: a Docker Hub user or organization; library for official images. Example `library`</td></tr>
    <tr><td>`repository` required</td><td>string</td><td>path</td><td>Repository name within the namespace. Example `nginx`</td></tr>
    <tr><td>`page`</td><td>integer</td><td>query</td><td>Page number, starting at 1. Example `1`</td></tr>
    <tr><td>`page_size`</td><td>integer</td><td>query</td><td>Items per page; default 10. Example `100`</td></tr>
  </tbody>
</table>

[Vendor docs](https://docs.docker.com/reference/api/hub/latest/) · Same job: [crates.io](https://docs.webrouter.net/data-apis/crates-io.md#crates-io-crates-versions), [PyPI](https://docs.webrouter.net/data-apis/pypi.md#pypi-release-get), [RubyGems.org](https://docs.webrouter.net/data-apis/rubygems.md#rubygems-gems-versions)

```python Python theme={null}
router.call_data_api("docker-hub.tags.list", {'namespace': 'library', 'repository': 'nginx', 'page': 1, 'page_size': 100})
```

```text MCP theme={null}
call_data_api(endpoint="docker-hub.tags.list", params={"namespace": "library", "repository": "nginx", "page": 1, "page_size": 100})
```

> [!NOTE]
>
> * The docs list bearer auth for this endpoint; set DOCKER\_HUB\_TOKEN if an anonymous call is refused.

### Get a tag

GET

`/v2/namespaces/{namespace}/repositories/{repository}/tags/{tag}`

`docker-hub.tags.get`

One tag's digest, images per platform, size and dates.

Input

<table>
  <thead>
    <tr>
      <th>
        Name
      </th>

      <th>
        Type
      </th>

      <th>
        In
      </th>

      <th>
        Notes
      </th>
    </tr>
  </thead>

  <tbody>
    <tr><td>`namespace` required</td><td>string</td><td>path</td><td>Namespace: a Docker Hub user or organization; library for official images. Example `library`</td></tr>
    <tr><td>`repository` required</td><td>string</td><td>path</td><td>Repository name within the namespace. Example `nginx`</td></tr>
    <tr><td>`tag` required</td><td>string</td><td>path</td><td>Tag name. Example `latest`</td></tr>
  </tbody>
</table>

[Vendor docs](https://docs.docker.com/reference/api/hub/latest/) · Same job: [crates.io](https://docs.webrouter.net/data-apis/crates-io.md#crates-io-crates-versions), [PyPI](https://docs.webrouter.net/data-apis/pypi.md#pypi-release-get), [RubyGems.org](https://docs.webrouter.net/data-apis/rubygems.md#rubygems-gems-versions)

```python Python theme={null}
router.call_data_api("docker-hub.tags.get", {'namespace': 'library', 'repository': 'nginx', 'tag': 'latest'})
```

```text MCP theme={null}
call_data_api(endpoint="docker-hub.tags.get", params={"namespace": "library", "repository": "nginx", "tag": "latest"})
```

> [!NOTE]
>
> * The docs list bearer auth for this endpoint; set DOCKER\_HUB\_TOKEN if an anonymous call is refused.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.