Cloudflare R2
by developers.cloudflare.com
Hosting and storage
Added on November 1st, 2026
Checked and working on November 1st, 2026
Visit developers.cloudflare.com →
What it does
Cloudflare R2 stores files in the cloud and serves them without fees for outgoing data. It speaks the Amazon S3 API, so existing S3 SDKs and tools can upload, list and download objects; there is also a Workers API for code that runs on Cloudflare. Access uses API tokens from a Cloudflare account. Free each month for 10 GB of storage, 1 million write and 10 million read operations; usage above that is paid. An official Cloudflare MCP server at https://mcp.cloudflare.com/mcp lets AI agents manage R2 buckets and other Cloudflare resources.
At a glance
- API key
- Needed, free · More APIs with a free key
- Pricing
- Free each month for 10 GB of storage, 1 million write and 10 million read operations; usage above that is paid.
- Formats
- XML
- Interface
- REST, MCP
- Provider
- developers.cloudflare.com
- Last checked
- Working on November 1st, 2026
More information: https://developers.cloudflare.com/r2/api/s3/api/
Compare: Backblaze B2 Cloud Storage API vs Cloudflare R2
Is this your service? Show that it is listed
Put this badge on your website or in your README; it links to this page. About the badge
Example request
curl
curl 'https://YOUR_ACCOUNT_ID.r2.cloudflarestorage.com/' \
-H 'Authorization: AWS4-HMAC-SHA256 Credential=YOUR_API_KEY/20261101/auto/s3/aws4_request, SignedHeaders=host;x-amz-date, Signature=...'
JavaScript
const response = await fetch("https://YOUR_ACCOUNT_ID.r2.cloudflarestorage.com/", {
headers: {
"Authorization": "AWS4-HMAC-SHA256 Credential=YOUR_API_KEY/20261101/auto/s3/aws4_request, SignedHeaders=host;x-amz-date, Signature=...",
},
});
const text = await response.text();
console.log(text);
Python
import requests
response = requests.get(
"https://YOUR_ACCOUNT_ID.r2.cloudflarestorage.com/",
headers={
"Authorization": "AWS4-HMAC-SHA256 Credential=YOUR_API_KEY/20261101/auto/s3/aws4_request, SignedHeaders=host;x-amz-date, Signature=...",
},
timeout=30,
)
print(response.text)
Replace YOUR_API_KEY with your own key.