# Docker Hub API

> Image repositories, tags, search and organizations from Docker Hub's public pages.

Category: Developer & Tech. Region: Global. 7 endpoints at `https://api.hoshime.com/v1/dockerhub/<endpoint>`, `GET` with query parameters, answering `{data, meta}` (see https://hoshime.com/docs/responses.md). Reference: https://hoshime.com/docs/platforms/dockerhub
## GET /v1/dockerhub/repository

Description, pulls, stars and dates of one public image repository.

Scope: `social:read` · Units: 1 · Cached: 60 min

| Parameter | Type | Required | Description |
|---|---|---|---|
| `repo` | string | yes | Repository as namespace/name, library/name or a bare official image name, or hub.docker.com URL. (e.g. library/nginx) |
| `tunnel` | string | no | Id or name of one of your tunnels: the call reads the source from the machine that runs `hoshime tunnel`, through its own connection. Fails with 409 tunnel_unavailable when no machine is connected. Cannot be combined with proxy. |
| `proxy` | string | no | Your own http:// or https:// proxy, such as http://user:pass@proxy.example.com:8080, on a public address. The call reads the source only through it. |
| `profileId` | string | no | Browser profile whose login the call sends (its cookies), so the source answers as that account. Without tunnel or proxy it leaves through the profile's own residential IP. Needs the browser:read scope. Data read logged in is for your account only. |

Response data fields: `dateRegistered` (string), `description` (string), `name` (string), `namespace` (string), `official` (boolean), `pullCount` (integer (int64)), `starCount` (integer (int64)), `updatedAt` (string), `url` (string)

```bash
curl "https://api.hoshime.com/v1/dockerhub/repository?repo=library%2Fnginx" -H "Authorization: Bearer $HOSHIME_TOKEN"
```

## GET /v1/dockerhub/tags

Tags of one public image repository, 25 per page, as Docker Hub lists them.

Scope: `social:read` · Units: 1 · Cached: 10 min · Paginated: cursor

| Parameter | Type | Required | Description |
|---|---|---|---|
| `repo` | string | yes | Repository as namespace/name, library/name or a bare official image name, or hub.docker.com URL. (e.g. library/nginx) |
| `cursor` | string | no | meta.pagination.nextCursor of the previous page. Omit it for the first page. |
| `tunnel` | string | no | Id or name of one of your tunnels: the call reads the source from the machine that runs `hoshime tunnel`, through its own connection. Fails with 409 tunnel_unavailable when no machine is connected. Cannot be combined with proxy. |
| `proxy` | string | no | Your own http:// or https:// proxy, such as http://user:pass@proxy.example.com:8080, on a public address. The call reads the source only through it. |
| `profileId` | string | no | Browser profile whose login the call sends (its cookies), so the source answers as that account. Without tunnel or proxy it leaves through the profile's own residential IP. Needs the browser:read scope. Data read logged in is for your account only. |

Response data fields: `architectures` (string[]), `digest` (string), `fullSize` (integer (int64)), `name` (string), `updatedAt` (string)

```bash
curl "https://api.hoshime.com/v1/dockerhub/tags?repo=library%2Fnginx" -H "Authorization: Bearer $HOSHIME_TOKEN"
```

## GET /v1/dockerhub/search

Public image repositories that match a search, 25 per page, as Docker Hub ranks them.

Scope: `social:read` · Units: 1 · Cached: 30 min · Paginated: cursor

| Parameter | Type | Required | Description |
|---|---|---|---|
| `query` | string | yes | Search terms. (e.g. nginx) |
| `cursor` | string | no | meta.pagination.nextCursor of the previous page. Omit it for the first page. |
| `tunnel` | string | no | Id or name of one of your tunnels: the call reads the source from the machine that runs `hoshime tunnel`, through its own connection. Fails with 409 tunnel_unavailable when no machine is connected. Cannot be combined with proxy. |
| `proxy` | string | no | Your own http:// or https:// proxy, such as http://user:pass@proxy.example.com:8080, on a public address. The call reads the source only through it. |
| `profileId` | string | no | Browser profile whose login the call sends (its cookies), so the source answers as that account. Without tunnel or proxy it leaves through the profile's own residential IP. Needs the browser:read scope. Data read logged in is for your account only. |

Response data fields: `automated` (boolean), `description` (string), `name` (string), `official` (boolean), `pullCount` (integer (int64)), `starCount` (integer (int64)), `url` (string)

```bash
curl "https://api.hoshime.com/v1/dockerhub/search?query=nginx" -H "Authorization: Bearer $HOSHIME_TOKEN"
```

## GET /v1/dockerhub/tag

One tag of a public image repository: its digest, size and the image of each architecture.

Scope: `social:read` · Units: 1 · Cached: 10 min

| Parameter | Type | Required | Description |
|---|---|---|---|
| `repo` | string | yes | Repository as namespace/name, library/name or a bare official image name, or hub.docker.com URL. (e.g. library/nginx) |
| `tag` | string | yes | Tag name, such as latest or 1.27-alpine. (e.g. latest) |
| `tunnel` | string | no | Id or name of one of your tunnels: the call reads the source from the machine that runs `hoshime tunnel`, through its own connection. Fails with 409 tunnel_unavailable when no machine is connected. Cannot be combined with proxy. |
| `proxy` | string | no | Your own http:// or https:// proxy, such as http://user:pass@proxy.example.com:8080, on a public address. The call reads the source only through it. |
| `profileId` | string | no | Browser profile whose login the call sends (its cookies), so the source answers as that account. Without tunnel or proxy it leaves through the profile's own residential IP. Needs the browser:read scope. Data read logged in is for your account only. |

Response data fields: `digest` (string), `fullSize` (integer (int64)), `images` (TagImage[]), `images[].architecture` (string), `images[].digest` (string), `images[].lastPushed` (string), `images[].os` (string), `images[].size` (integer (int64)), `images[].variant` (string), `name` (string), `updatedAt` (string)

```bash
curl "https://api.hoshime.com/v1/dockerhub/tag?repo=library%2Fnginx&tag=latest" -H "Authorization: Bearer $HOSHIME_TOKEN"
```

## GET /v1/dockerhub/namespaceRepos

Public repositories of one namespace or organization, 25 per page, as Docker Hub lists them.

Scope: `social:read` · Units: 1 · Cached: 30 min · Paginated: cursor

| Parameter | Type | Required | Description |
|---|---|---|---|
| `namespace` | string | yes | Namespace or organization name, such as bitnami. (e.g. bitnami) |
| `cursor` | string | no | meta.pagination.nextCursor of the previous page. Omit it for the first page. |
| `tunnel` | string | no | Id or name of one of your tunnels: the call reads the source from the machine that runs `hoshime tunnel`, through its own connection. Fails with 409 tunnel_unavailable when no machine is connected. Cannot be combined with proxy. |
| `proxy` | string | no | Your own http:// or https:// proxy, such as http://user:pass@proxy.example.com:8080, on a public address. The call reads the source only through it. |
| `profileId` | string | no | Browser profile whose login the call sends (its cookies), so the source answers as that account. Without tunnel or proxy it leaves through the profile's own residential IP. Needs the browser:read scope. Data read logged in is for your account only. |

Response data fields: `description` (string), `name` (string), `namespace` (string), `pulls` (integer (int64)), `stars` (integer (int64)), `updatedAt` (string)

```bash
curl "https://api.hoshime.com/v1/dockerhub/namespaceRepos?namespace=bitnami" -H "Authorization: Bearer $HOSHIME_TOKEN"
```

## GET /v1/dockerhub/officialImages

The official images of Docker Hub (the library namespace), 25 per page.

Scope: `social:read` · Units: 1 · Cached: 30 min · Paginated: cursor

| Parameter | Type | Required | Description |
|---|---|---|---|
| `cursor` | string | no | meta.pagination.nextCursor of the previous page. Omit it for the first page. |
| `tunnel` | string | no | Id or name of one of your tunnels: the call reads the source from the machine that runs `hoshime tunnel`, through its own connection. Fails with 409 tunnel_unavailable when no machine is connected. Cannot be combined with proxy. |
| `proxy` | string | no | Your own http:// or https:// proxy, such as http://user:pass@proxy.example.com:8080, on a public address. The call reads the source only through it. |
| `profileId` | string | no | Browser profile whose login the call sends (its cookies), so the source answers as that account. Without tunnel or proxy it leaves through the profile's own residential IP. Needs the browser:read scope. Data read logged in is for your account only. |

Response data fields: `description` (string), `name` (string), `namespace` (string), `pulls` (integer (int64)), `stars` (integer (int64)), `updatedAt` (string)

```bash
curl "https://api.hoshime.com/v1/dockerhub/officialImages" -H "Authorization: Bearer $HOSHIME_TOKEN"
```

## GET /v1/dockerhub/org

One Docker Hub organization: its full name, company, location and join date.

Scope: `social:read` · Units: 1 · Cached: 60 min

| Parameter | Type | Required | Description |
|---|---|---|---|
| `name` | string | yes | Organization name, such as bitnami. (e.g. bitnami) |
| `tunnel` | string | no | Id or name of one of your tunnels: the call reads the source from the machine that runs `hoshime tunnel`, through its own connection. Fails with 409 tunnel_unavailable when no machine is connected. Cannot be combined with proxy. |
| `proxy` | string | no | Your own http:// or https:// proxy, such as http://user:pass@proxy.example.com:8080, on a public address. The call reads the source only through it. |
| `profileId` | string | no | Browser profile whose login the call sends (its cookies), so the source answers as that account. Without tunnel or proxy it leaves through the profile's own residential IP. Needs the browser:read scope. Data read logged in is for your account only. |

Response data fields: `avatarUrl` (string), `bio` (string), `company` (string), `createdAt` (string), `followerCount` (integer (int64)), `followingCount` (integer (int64)), `fullName` (string), `id` (string), `location` (string), `name` (string), `postCount` (integer (int64)), `url` (string), `username` (string), `verified` (boolean)

```bash
curl "https://api.hoshime.com/v1/dockerhub/org?name=bitnami" -H "Authorization: Bearer $HOSHIME_TOKEN"
```
