---
title: Get Bucket
---

[Skip to content](#_top)

[API Reference](https://developers.cloudflare.com/api/python)

[R2](https://developers.cloudflare.com/api/python/resources/r2)

[Buckets](https://developers.cloudflare.com/api/python/resources/r2/subresources/buckets)

Copy Markdown

Open in **Claude**Open in **ChatGPT**Open in **Cursor**

---

**Copy Markdown****View as Markdown**

# Get Bucket

r2.buckets.get(strbucket\_name, BucketGetParams\*\*kwargs) -> [Bucket](<https://developers.cloudflare.com/api/python/resources/r2#(resource)%20r2.buckets%20%3E%20(model)%20bucket%20%3E%20(schema)>)

GET/accounts/{account\_id}/r2/buckets/{bucket\_name}

Gets properties of an existing R2 bucket.

##### Security

API Token

The preferred authorization scheme for interacting with the Cloudflare API. [Create a token](https://developers.cloudflare.com/fundamentals/api/get-started/create-token/).

**Example:**`Authorization: Bearer Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY`

##### ParametersExpand Collapse

account\_id: str

Cloudflare account ID that owns the R2 resource.

maxLength32

[Link to this property](<#(resource)%20r2.buckets%20%3E%20(method)%20get%20%3E%20(params)%20default%20%3E%20(param)%20account_id%20%3E%20(schema)>)

bucket\_name: str

Name of the bucket.

maxLength64

minLength3

[Link to this property](<#(resource)%20r2.buckets%20%3E%20(method)%20get%20%3E%20(params)%20default%20%3E%20(param)%20bucket_name%20%3E%20(schema)>)

<details>

<summary>

cf\_r2\_jurisdiction: Optional\[Literal\["default", "eu", "us", 2 more]]

</summary>

One of the following:

"default"

<a href="#(resource)%20r2.buckets%20%3E%20(method)%20get%20%3E%20(params)%20default%20%3E%20(param)%20cf-r2-jurisdiction%20%3E%20(schema)%20%3E%20(member)%200">Link to this property</a>

"eu"

<a href="#(resource)%20r2.buckets%20%3E%20(method)%20get%20%3E%20(params)%20default%20%3E%20(param)%20cf-r2-jurisdiction%20%3E%20(schema)%20%3E%20(member)%201">Link to this property</a>

"us"

<a href="#(resource)%20r2.buckets%20%3E%20(method)%20get%20%3E%20(params)%20default%20%3E%20(param)%20cf-r2-jurisdiction%20%3E%20(schema)%20%3E%20(member)%202">Link to this property</a>

"fedramp"

<a href="#(resource)%20r2.buckets%20%3E%20(method)%20get%20%3E%20(params)%20default%20%3E%20(param)%20cf-r2-jurisdiction%20%3E%20(schema)%20%3E%20(member)%203">Link to this property</a>

"fedramp-high"

<a href="#(resource)%20r2.buckets%20%3E%20(method)%20get%20%3E%20(params)%20default%20%3E%20(param)%20cf-r2-jurisdiction%20%3E%20(schema)%20%3E%20(member)%204">Link to this property</a>

</details>

[Link to this property](<#(resource)%20r2.buckets%20%3E%20(method)%20get%20%3E%20(params)%20default%20%3E%20(param)%20cf-r2-jurisdiction%20%3E%20(schema)>)

##### ReturnsExpand Collapse

<details>

<summary>

class Bucket: …

A single R2 bucket.

</summary>

creation\_date: Optional\[str]

Creation timestamp.

<a href="#(resource)%20r2.buckets%20%3E%20(model)%20bucket%20%3E%20(schema)%20%3E%20(property)%20creation_date">Link to this property</a>

<details>

<summary>

jurisdiction: Optional\[Literal\["default", "eu", "us", 2 more]]

Jurisdiction where objects in this bucket are guaranteed to be stored.

</summary>

One of the following:

"default"

<a href="#(resource)%20r2.buckets%20%3E%20(model)%20bucket%20%3E%20(schema)%20%3E%20(property)%20jurisdiction%20%3E%20(member)%200">Link to this property</a>

"eu"

<a href="#(resource)%20r2.buckets%20%3E%20(model)%20bucket%20%3E%20(schema)%20%3E%20(property)%20jurisdiction%20%3E%20(member)%201">Link to this property</a>

"us"

<a href="#(resource)%20r2.buckets%20%3E%20(model)%20bucket%20%3E%20(schema)%20%3E%20(property)%20jurisdiction%20%3E%20(member)%202">Link to this property</a>

"fedramp"

<a href="#(resource)%20r2.buckets%20%3E%20(model)%20bucket%20%3E%20(schema)%20%3E%20(property)%20jurisdiction%20%3E%20(member)%203">Link to this property</a>

"fedramp-high"

<a href="#(resource)%20r2.buckets%20%3E%20(model)%20bucket%20%3E%20(schema)%20%3E%20(property)%20jurisdiction%20%3E%20(member)%204">Link to this property</a>

</details>

<a href="#(resource)%20r2.buckets%20%3E%20(model)%20bucket%20%3E%20(schema)%20%3E%20(property)%20jurisdiction">Link to this property</a>

<details>

<summary>

location: Optional\[Literal\["apac", "eeur", "enam", 3 more]]

Location of the bucket.

</summary>

One of the following:

"apac"

<a href="#(resource)%20r2.buckets%20%3E%20(model)%20bucket%20%3E%20(schema)%20%3E%20(property)%20location%20%3E%20(member)%200">Link to this property</a>

"eeur"

<a href="#(resource)%20r2.buckets%20%3E%20(model)%20bucket%20%3E%20(schema)%20%3E%20(property)%20location%20%3E%20(member)%201">Link to this property</a>

"enam"

<a href="#(resource)%20r2.buckets%20%3E%20(model)%20bucket%20%3E%20(schema)%20%3E%20(property)%20location%20%3E%20(member)%202">Link to this property</a>

"weur"

<a href="#(resource)%20r2.buckets%20%3E%20(model)%20bucket%20%3E%20(schema)%20%3E%20(property)%20location%20%3E%20(member)%203">Link to this property</a>

"wnam"

<a href="#(resource)%20r2.buckets%20%3E%20(model)%20bucket%20%3E%20(schema)%20%3E%20(property)%20location%20%3E%20(member)%204">Link to this property</a>

"oc"

<a href="#(resource)%20r2.buckets%20%3E%20(model)%20bucket%20%3E%20(schema)%20%3E%20(property)%20location%20%3E%20(member)%205">Link to this property</a>

</details>

<a href="#(resource)%20r2.buckets%20%3E%20(model)%20bucket%20%3E%20(schema)%20%3E%20(property)%20location">Link to this property</a>

name: Optional\[str]

Name of the bucket.

maxLength64

minLength3

<a href="#(resource)%20r2.buckets%20%3E%20(model)%20bucket%20%3E%20(schema)%20%3E%20(property)%20name">Link to this property</a>

<details>

<summary>

storage\_class: Optional\[Literal\["Standard", "InfrequentAccess"]]

Storage class for newly uploaded objects, unless specified otherwise.

</summary>

One of the following:

"Standard"

<a href="#(resource)%20r2.buckets%20%3E%20(model)%20bucket%20%3E%20(schema)%20%3E%20(property)%20storage_class%20%3E%20(member)%200">Link to this property</a>

"InfrequentAccess"

<a href="#(resource)%20r2.buckets%20%3E%20(model)%20bucket%20%3E%20(schema)%20%3E%20(property)%20storage_class%20%3E%20(member)%201">Link to this property</a>

</details>

<a href="#(resource)%20r2.buckets%20%3E%20(model)%20bucket%20%3E%20(schema)%20%3E%20(property)%20storage_class">Link to this property</a>

</details>

[Link to this property](<#(resource)%20r2.buckets%20%3E%20(model)%20bucket%20%3E%20(schema)>)

### Get Bucket

Python

HTTPTypeScriptPythonGoTerraform

```
import os
from cloudflare import Cloudflare

client = Cloudflare(
    api_token=os.environ.get("CLOUDFLARE_API_TOKEN"),  # This is the default and can be omitted
)
bucket = client.r2.buckets.get(
    bucket_name="example-bucket",
    account_id="023e105f4ecef8ad9ca31a8372d0c353",
)
print(bucket.creation_date)
```

200 example

```
{
  "errors": [
    {
      "code": 1000,
      "message": "message",
      "documentation_url": "documentation_url",
      "source": {
        "pointer": "pointer"
      }
    }
  ],
  "messages": [
    "string"
  ],
  "result": {
    "creation_date": "creation_date",
    "jurisdiction": "default",
    "location": "apac",
    "name": "example-bucket",
    "storage_class": "Standard"
  },
  "success": true
}
```

##### Returns Examples

200 example

```
{
  "errors": [
    {
      "code": 1000,
      "message": "message",
      "documentation_url": "documentation_url",
      "source": {
        "pointer": "pointer"
      }
    }
  ],
  "messages": [
    "string"
  ],
  "result": {
    "creation_date": "creation_date",
    "jurisdiction": "default",
    "location": "apac",
    "name": "example-bucket",
    "storage_class": "Standard"
  },
  "success": true
}
```