Cloudflare API - DNS, Zones, Cache & Security
Pricing
from $0.01 / 1,000 results
Cloudflare API - DNS, Zones, Cache & Security
Manage your Cloudflare infrastructure programmatically. Configure DNS records, manage zones, purge cache, set up page rules, and control security settings through a single interface. Features Zone Management DNS Management Cache Control Page Rules Security & Analytics
Pricing
from $0.01 / 1,000 results
Rating
0.0
(0)
Developer

John Rippy
Actor stats
0
Bookmarked
2
Total users
1
Monthly active users
a day ago
Last modified
Categories
Share
"CDN & DNS Management" by John Rippy | johnrippy.link
🏆 2025 Zapier Automation Hero of the Year — Project Phoenix: A 95-step AI sales pipeline cutting development time by 50%. Read more →
Manage your Cloudflare infrastructure programmatically. Configure DNS records, manage zones, purge cache, set up page rules, and control security settings through a single interface.
Features
Zone Management
- list_zones - List all zones in your account
- get_zone - Get detailed zone information
- get_zone_settings - Get all zone settings
- update_zone_setting - Update a specific zone setting
DNS Management
- list_dns_records - List all DNS records for a zone
- get_dns_record - Get a specific DNS record
- create_dns_record - Create a new DNS record
- update_dns_record - Update an existing DNS record
- delete_dns_record - Delete a DNS record
Cache Control
- purge_cache - Purge all cached content for a zone
- purge_cache_by_url - Purge specific URLs from cache
Page Rules
- list_page_rules - List all page rules
- create_page_rule - Create a new page rule
- delete_page_rule - Delete a page rule
Security & Analytics
- list_firewall_rules - List firewall rules
- get_analytics - Get zone analytics data
- get_user - Get current user information
Use Cases
- DevOps Automation - Automate DNS changes during deployments
- Multi-site Management - Manage DNS across multiple domains
- Cache Invalidation - Purge cache after content updates
- SSL Management - Configure SSL settings programmatically
- Security Automation - Manage firewall rules based on events
- Infrastructure as Code - Version control your Cloudflare config
- Monitoring - Pull analytics data for custom dashboards
Authentication
Create an API token at dash.cloudflare.com/profile/api-tokens
Recommended permissions:
- Zone:Read - For listing and reading zones
- DNS:Edit - For managing DNS records
- Cache Purge:Purge - For cache operations
- Page Rules:Edit - For page rule management
DNS Record Types
| Type | Description | Example Content |
|---|---|---|
| A | IPv4 address | 192.168.1.1 |
| AAAA | IPv6 address | 2001:db8::1 |
| CNAME | Canonical name | target.example.com |
| TXT | Text record | v=spf1 include:_spf.google.com ~all |
| MX | Mail exchange | mail.example.com |
| NS | Name server | ns1.example.com |
| SRV | Service record | 10 5 5060 sip.example.com |
| CAA | Certificate authority | 0 issue "letsencrypt.org" |
Output Format
{"task": "list_dns_records","success": true,"results": [{"id": "abc123","type": "A","name": "www.example.com","content": "192.168.1.1","proxied": true,"ttl": 1,"created_on": "2024-01-15T10:00:00Z","modified_on": "2024-01-20T14:00:00Z"}],"count": 1,"timestamp": "2024-01-20T14:30:00Z"}
Zone Settings
Common settings you can update:
ssl- SSL mode (off, flexible, full, strict)always_use_https- Redirect HTTP to HTTPSmin_tls_version- Minimum TLS versionautomatic_https_rewrites- Rewrite HTTP URLs to HTTPSbrowser_cache_ttl- Browser cache TTLdevelopment_mode- Development mode (bypass cache)minify- Minify JS/CSS/HTMLrocket_loader- Rocket Loader for JS
Pricing
$0.01 per query (all tasks)
Rate Limits
Cloudflare API rate limit: 1,200 requests per 5 minutes
The actor handles rate limiting automatically with exponential backoff.
Security Notes
- Use scoped API tokens instead of global API keys
- Set token expiration dates
- Only grant necessary permissions
- Never expose tokens in client-side code