Cloudflare API - DNS, Zones, Cache & Security avatar

Cloudflare API - DNS, Zones, Cache & Security

Pricing

from $0.01 / 1,000 results

Go to Apify Store
Cloudflare API - DNS, Zones, Cache & Security

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

The Howlers

The Howlers

Maintained by Community

Actor stats

0

Bookmarked

1

Total users

0

Monthly active users

2 days ago

Last modified

Share

Manage Cloudflare programmatically. Configure DNS records, manage zones, purge cache, set up page rules, and control security settings. Perfect for DevOps automation, multi-site management, and infrastructure-as-code workflows.

BYOK (Bring Your Own Key) -- you provide your own API credentials.


Before You Start

This actor requires your own API credentials to fetch real data.

Where to get your key: Cloudflare API token with appropriate permissions


Quick Start

Run with real data

{
"task": "list_zones",
"recordType": "A",
"recordTtl": 1,
"recordProxied": true,
"purgeUrls": "https://example.com",
"pageRuleUrl": "https://example.com",
"apiToken": "YOUR_API_KEY_HERE"
}

Input Parameters

ParameterTypeDefaultRequiredDescription
taskstring"list_zones"Yes*The operation to perform on Cloudflare
zoneIdstring-NoCloudflare zone ID (found in zone overview dashboard)
zoneNamestring-NoDomain name to look up zone ID (alternative to zoneId)
recordIdstring-NoDNS record ID for get/update/delete operations
recordTypestring"A"NoType of DNS record
recordNamestring-NoDNS record name (e.g., 'www', '@' for root, or full domain)
recordContentstring-NoDNS record content/value (e.g., IP address, target domain)
recordTtlinteger1NoTime to live in seconds (1 = automatic)
recordProxiedbooleantrueNoWhether traffic is proxied through Cloudflare (orange cloud)
recordPriorityinteger-NoPriority for MX records
purgeUrlsstring-NoComma-separated URLs to purge from cache
pageRuleUrlstring-NoURL pattern for page rule (e.g., 'example.com/images/')
pageRuleActionsstring-NoJSON array of page rule actions
settingIdstring-NoZone setting to update (e.g., 'ssl', 'always_use_https', 'minify')
settingValuestring-NoNew value for the setting
analyticsStartDatestring-NoStart date for analytics (ISO format)
analyticsEndDatestring-NoEnd date for analytics (ISO format)
apiTokenstring-Yes*Cloudflare API token with appropriate permissions
webhookUrlstring-NoURL to receive results via webhook for automation platforms

Pricing

This actor uses pay-per-event billing:

EventDescriptionPrice
API RequestEach Cloudflare API request processed$0.05

Troubleshooting

"API key is required"

  • Add your API key in the input

"API error 403" or "Unauthorized"

Your API key is invalid, expired, or doesn't have access to this specific API endpoint. Double-check your key and account permissions.

"API error 429" or "Rate limit"

Too many requests. Wait a minute and try again, or reduce the number of items per run.

No results or empty dataset

Check the run log for error messages. Common causes:

  • Invalid input format (check the examples above)
  • API key without proper permissions
  • The target data doesn't exist or is too small to track

How do I test without an API key?

Run the actor without an API token, or set demoMode to true, and it returns labeled sample zones, DNS records, and settings showing the exact output format. Every sample item carries demo: true and a _notice field, and no calls are made to the Cloudflare API. Sample runs charge no task events; provide your own Cloudflare API token to receive live data.


Built by John Rippy | Actor Arsenal