# Retrieve blob


[API catalog](/reference/api/) · [Registry overview](/reference/api/registry/latest/) · [Product manual](https://docs.docker.com/docker-hub/repos/) · [OpenAPI specification](/reference/api/registry/latest.yaml)

API version: 2



`GET /v2/{name}/blobs/{digest}`

Download the blob identified by digest from the registry.

Blobs include image layers and configuration objects. Clients must use the digest from the manifest to retrieve a blob.

This endpoint may return a `307 Temporary Redirect` to a CDN or storage location. Clients must follow the redirect to obtain the actual blob content.

The blob content is typically a gzipped tarball (for layers) or JSON (for configs). The MIME type is usually `application/octet-stream`.


## Connection and access

[API connection and authentication guidance](/reference/api/registry/latest/#authentication)


Server: `https://registry-1.docker.io`

Effective security: alternatives are OR; schemes within an alternative are AND. An empty array declares no HTTP authentication requirement.

```json
[
  {
    "registryToken": []
  }
]
```
## Example request

Replace placeholders and provide the required credentials or request body.

```console
curl \
  --request GET \
  --header "Authorization: Bearer ${REGISTRY_TOKEN}" \
  --header 'Accept: application/octet-stream' \
  'https://registry-1.docker.io/v2/library%2Fubuntu/blobs/sha256:abc123def456...'
```

## Parameters

### name

Location: path. Required: yes.

Repository Name

```json
{
  "description": "Repository Name",
  "example": "library/ubuntu",
  "in": "path",
  "name": "name",
  "pointer": "/paths/~1v2~1{name}~1blobs~1{digest}/get/parameters/0",
  "required": true,
  "schema": {
    "type": "string"
  }
}
```

### digest

Location: path. Required: yes.

Digest of the Blob

```json
{
  "description": "Digest of the Blob",
  "example": "sha256:abc123def456...",
  "in": "path",
  "name": "digest",
  "pointer": "/paths/~1v2~1{name}~1blobs~1{digest}/get/parameters/1",
  "required": true,
  "schema": {
    "type": "string"
  }
}
```

## Request and responses

### Response 200 application/octet-stream

Blob content returned directly


Schema:

```json
{
  "format": "binary",
  "type": "string"
}
```



Headers:

```json
{
  "Content-Length": {
    "description": "Size of the blob in bytes",
    "example": 32768,
    "schema": {
      "type": "integer"
    }
  },
  "Content-Type": {
    "description": "MIME type of the blob",
    "example": "application/octet-stream",
    "schema": {
      "type": "string"
    }
  },
  "Docker-Content-Digest": {
    "description": "Digest of the returned blob",
    "example": "sha256:abc123def456...",
    "schema": {
      "type": "string"
    }
  }
}
```


small-layer:
```text
<binary data not shown>
```


### Response 307 

Temporary redirect to blob location

No response content is declared.




Headers:

```json
{
  "Location": {
    "description": "Redirect URL for blob download (e.g., S3 or CDN)",
    "example": "https://cdn.docker.io/blobs/library/ubuntu/abc123...",
    "schema": {
      "type": "string"
    }
  }
}
```



### Response 401 

Authentication required

No response content is declared.






### Response 403 

Access denied

No response content is declared.






### Response 404 

Blob not found

No response content is declared.






### Response 429 

Too many requests

No response content is declared.






## Complete operation contract

```json
{
  "description": "Download the blob identified by digest from the registry.\n\nBlobs include image layers and configuration objects. Clients must use the digest from the manifest to retrieve a blob.\n\nThis endpoint may return a `307 Temporary Redirect` to a CDN or storage location. Clients must follow the redirect to obtain the actual blob content.\n\nThe blob content is typically a gzipped tarball (for layers) or JSON (for configs). The MIME type is usually `application/octet-stream`.\n",
  "operationId": "GetBlob",
  "parameters": [
    {
      "description": "Repository Name",
      "example": "library/ubuntu",
      "in": "path",
      "name": "name",
      "required": true,
      "schema": {
        "type": "string"
      }
    },
    {
      "description": "Digest of the Blob",
      "example": "sha256:abc123def456...",
      "in": "path",
      "name": "digest",
      "required": true,
      "schema": {
        "type": "string"
      }
    }
  ],
  "responses": {
    "200": {
      "content": {
        "application/octet-stream": {
          "examples": {
            "small-layer": {
              "summary": "Example binary blob (gzipped tar layer)",
              "value": "\u003cbinary data not shown\u003e"
            }
          },
          "schema": {
            "format": "binary",
            "type": "string"
          }
        }
      },
      "description": "Blob content returned directly",
      "headers": {
        "Content-Length": {
          "description": "Size of the blob in bytes",
          "example": 32768,
          "schema": {
            "type": "integer"
          }
        },
        "Content-Type": {
          "description": "MIME type of the blob",
          "example": "application/octet-stream",
          "schema": {
            "type": "string"
          }
        },
        "Docker-Content-Digest": {
          "description": "Digest of the returned blob",
          "example": "sha256:abc123def456...",
          "schema": {
            "type": "string"
          }
        }
      }
    },
    "307": {
      "description": "Temporary redirect to blob location",
      "headers": {
        "Location": {
          "description": "Redirect URL for blob download (e.g., S3 or CDN)",
          "example": "https://cdn.docker.io/blobs/library/ubuntu/abc123...",
          "schema": {
            "type": "string"
          }
        }
      }
    },
    "401": {
      "description": "Authentication required"
    },
    "403": {
      "description": "Access denied"
    },
    "404": {
      "description": "Blob not found"
    },
    "429": {
      "description": "Too many requests"
    }
  },
  "summary": "Retrieve blob",
  "tags": [
    "Blobs"
  ],
  "x-codeSamples": [
    {
      "label": "cURL",
      "lang": "Bash",
      "source": "# GET (download) a blob\ncurl -L \\\n  -H \"Authorization: Bearer $TOKEN\" \\\n  https://registry-1.docker.io/v2/library/ubuntu/blobs/sha256:abc123... \\\n  -o layer.tar.gz\n"
    }
  ]
}
```

## Referenced schemas




