Docker Hub API
Overview
The Docker Hub API lets you programmatically interact with Docker Hub registries — searching repositories, pulling image metadata, managing tags, and automating image builds. It is the same API that the Docker CLI uses under the hood when you run docker pull or docker push. An API key or Docker Hub credentials are required for private repositories and write operations.
Beginner Tip
Docker Hub API is straightforward for read operations on public images — no auth needed to search or inspect public repos. Authentication via a personal access token (not your password) is required for private images or write operations. Get your token at hub.docker.com > Account Settings > Personal Access Tokens.
Measurement Record
What actually happened when we called this API from our own infrastructure. Every value below was recorded by the request, not copied from the provider's documentation.
- Request
- GET https://hub.docker.com/v2/repositories/library/nginx/tags?page_size=5
- Result
- HTTP 200 · application/json · 27,766 bytes
- Response time
- 265 ms (median of 3) · fastest 256 ms
- Transport
- TLSv1.3 · TLS_AES_256_GCM_SHA384 · certificate issued by Let's Encrypt
- Browser CORS
- No Access-Control-Allow-Origin header — call it from a server, not the browser
- Rate limit
- 180 per window (180 remaining at test time)
- Served by
- cloudflare
- Recorded
- 2026-08-10
Fields Returned
Top-level fields present in the response we captured, with the type and value we actually received.
| Field | Type | Value received |
|---|---|---|
| count | integer | 1283 |
| next | string (url) | https://hub.docker.com/v2/repositories/librar… |
| previous | null | null |
| results | array | [1 item] |
Captured Response
Captured from a real request to https://hub.docker.com/v2/repositories/library/nginx/tags?page_size=5 on 2026-08-10. Long arrays and nested objects are truncated to keep the shape readable.
{
"count": 1283,
"next": "https://hub.docker.com/v2/repositories/library/nginx/tags?page=2&page_size=5",
"previous": null,
"results": [
{
"creator": 1156886,
"id": 1037391008,
"images": [
{
"…": "(11 more fields)"
}
],
"last_updated": "2026-08-05T19:52:15.690518Z",
"last_updater": 1156886,
"last_updater_username": "doijanky",
"name": "stable-trixie",
"repository": 21171,
"full_size": 63093193,
"v2": true,
"tag_status": "active",
"tag_last_pulled": "2026-08-10T19:44:39.116138951Z",
"tag_last_pushed": "2026-08-05T19:52:15.690518Z",
"media_type": "application/vnd.oci.image.index.v1+json",
"…": "(2 more fields)"
}
]
} Field Reference
name Tag name of the image (e.g., "latest", "alpine", "1.25"). full_size Compressed size of the image in bytes as stored on Docker Hub. last_updated ISO 8601 timestamp of the most recent push to this tag. images Per-platform image variants (architecture/OS) included in this tag, e.g., linux/amd64 and linux/arm64. Implementation Example
Calls a real endpoint of this API. Replace any placeholder credentials with your own key.
const url = "https://docs.docker.com/docker-hub/api/latest/";
// Replace headers or query params with the values required by this API.
const response = await fetch(url, {
headers: {
"X-API-Key": "YOUR_API_KEY"
}
});
if (!response.ok) throw new Error(`Request failed: ${response.status}`);
const data = await response.json();
console.log(data); What Can You Build?
Note: These code examples are AI-generated and unverified. Always refer to the official API documentation for accurate usage.
How This API Fails
We deliberately sent this API a broken request and recorded exactly what came back on 2026-08-10. Knowing the shape of an error before you hit it makes error handling much easier to write.
{
"message": "httperror 404: tag 'apisscore-nonexistent-path' not found",
"errinfo": {
"namespace": "library",
"repository": "nginx",
"tag": "apisscore-nonexistent-path"
}
} Common Errors & Troubleshooting
Generated guidance based on this API's documentation, not observed by us. Treat it as a starting point and check against the provider's own error reference.
Measured Score Breakdown
Live HTTP request to the API endpoint
Fully tested on Aug 10, 2026
Technical Specifications
Related Tags
Similar APIs
View All →ApiFlash
ApiFlash provides a REST API that captures full-page or viewport screenshots of any public URL using a headless Chrome browser, returning the image as a PNG, JPEG, or WebP file.
Azure DevOps
Azure DevOps REST API provides programmatic access to all Azure DevOps services including work items, repositories, pipelines, test plans, and artifact feeds.
Base
Base provides programmatic access to building quick backends via REST API.
Blitapp
Blitapp is a screenshot-as-a-service API that lets you capture full-page or viewport screenshots of any web page on a schedule, then automatically sync them to cloud storage like Dropbox or Google Drive.
DomainDb Info
⭐ Beginner's PickDomainsDB.info provides a searchable database of registered domain names, allowing you to find all domains containing specific keywords, phrases, or patterns across various TLDs.