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

2

Total users

0

Monthly active users

7 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

You can test with Demo Mode first (free, no key needed) to see the output format before committing.


Quick Start

Test with Demo Mode (free, no API key needed)

{
"demoMode": true,
"purgeUrls": "https://example.com",
"pageRuleUrl": "https://example.com"
}

Run with real data

{
"demoMode": false,
"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
demoModebooleantrueNoRun with sample data for testing (no API calls made)

*Required when Demo Mode is off.


Pricing

This actor uses pay-per-event billing:

EventDescriptionPrice
API RequestEach Cloudflare API request processed$0.05

Demo mode is free -- no charges for sample data.


Troubleshooting

"API key is required"

You have Demo Mode turned off but didn't provide an API key. Either:

  • Turn Demo Mode on to test with sample data
  • 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?

Enable Demo Mode in the input. This returns realistic sample data so you can verify the output format works for your workflow.


Built by John Rippy | Actor Arsenal