APIYard
Back to APIs
DevOpsBearer TokenFree tier

Docker Hub

The Docker Hub API provides access to image metadata, tags, repository information, and organization management.

Base URL

https://hub.docker.com/v2
containersimagestagsrepositoriesDocker

Endpoints

GET/repositories/{namespace}/{name}/

Get details about a Docker Hub repository.

const response = await fetch("https://hub.docker.com/v2/repositories/library/node/", {
  method: "GET",
  headers: {
  "Content-Type": "application/json",
  "Authorization": "Bearer YOUR_ACCESS_TOKEN"
  }
});

const data = await response.json();
console.log(data);

Response Preview

{
  "name": "node",
  "namespace": "library",
  "description": "Node.js is a JavaScript-based platform for server-side and networking applications.",
  "pull_count": 12400000000,
  "star_count": 14000,
  "is_official": true
}
GET/repositories/{namespace}/{name}/tags

List all available tags for a Docker image.

const response = await fetch("https://hub.docker.com/v2/repositories/library/node/tags?page_size=5", {
  method: "GET",
  headers: {
  "Content-Type": "application/json",
  "Authorization": "Bearer YOUR_ACCESS_TOKEN"
  }
});

const data = await response.json();
console.log(data);

Response Preview

{
  "count": 842,
  "results": [
    { "name": "22-alpine", "full_size": 40123456, "last_updated": "2024-05-01T10:00:00Z" },
    { "name": "lts", "full_size": 395678901, "last_updated": "2024-05-01T10:00:00Z" }
  ]
}