# Cloudflare API **Provider:** Cloudflare **Category:** security **Base URL:** `https://api.cloudflare.com/client/v4` **Auth:** api-key — `Authorization: Bearer YOUR_API_TOKEN` **Rate Limit:** 1,200 requests/5 min (global) **Free Tier:** Yes — [object Object] **Pricing:** Free tier available (freemium) **Docs:** https://developers.cloudflare.com/api/ ## Description The Cloudflare API provides programmatic control over the entire Cloudflare platform. Manage DNS records (A, CNAME, MX, TXT), configure Web Application Firewall rules and IP access rules, issue and renew SSL/TLS certificates, deploy and update Cloudflare Workers (serverless edge functions) and Workers KV, manage Cloudflare Pages projects, configure caching rules, view analytics and threat data, and set up rate limiting. Used for infrastructure automation, security policy management, and edge deployment workflows. ## Endpoints | Method | Endpoint | Description | |--------|----------|-------------| | GET | `https://api.cloudflare.com/client/v4/zones/{zone_id}/dns_records` | List all DNS records for a zone | | POST | `https://api.cloudflare.com/client/v4/zones/{zone_id}/dns_records` | Create a new DNS record | | PATCH | `https://api.cloudflare.com/client/v4/zones/{zone_id}/dns_records/{id}` | Update a DNS record | | GET | `https://api.cloudflare.com/client/v4/zones/{zone_id}/firewall/rules` | List WAF firewall rules | | PUT | `https://api.cloudflare.com/client/v4/accounts/{account_id}/workers/scripts/{name}` | Deploy or update a Worker script | | GET | `https://api.cloudflare.com/client/v4/zones/{zone_id}/analytics/dashboard` | Get traffic and threat analytics | ## Authentication Use an API Token (recommended) with specific permission scopes, or a Global API Key with X-Auth-Email + X-Auth-Key headers. Create tokens at dash.cloudflare.com/profile/api-tokens. ``` Authorization: Bearer YOUR_API_TOKEN ``` ## Sample Request ```bash curl "https://api.cloudflare.com/client/v4/zones/$ZONE_ID/dns_records?type=A" \ -H "Authorization: Bearer $CF_API_TOKEN" ``` ## Sample Response ```json { "success": true, "result": [{ "id": "372e67954025e0ba6aaa6d586b9e0b59", "type": "A", "name": "apimap.dev", "content": "104.21.0.1", "ttl": 1, "proxied": true }] } ``` ## Pricing Details Free: CDN, DDoS protection, DNS. Pro: $20/mo. Business: $200/mo. Enterprise: custom. Workers: 100k req/day free. --- *Source: [API Map](https://apimap.dev/apis/cloudflare/) — CC BY 4.0*