cloudflare-api

Generates curl commands and scripts for bulk Cloudflare REST API operations.

3|1|Updated Feb 26, 2026
One-click install
npx skills add https://github.com/wopal-cn/wopal-space-ontology --skill cloudflare-api-wopal-cn
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: cloudflare-api
Source: https://github.com/wopal-cn/wopal-space-ontology/tree/main/skills/cloudflare-api
Command: npx skills add https://github.com/wopal-cn/wopal-space-ontology --skill cloudflare-api-wopal-cn

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Wrangler CLI and MCP servers handle single Cloudflare operations well but fall short on bulk changes, fleet-wide configuration, and features they don't expose, forcing tedious one-at-a-time work across zones, DNS records, and account resources. ## Core Features & Use Cases - Bulk DNS and Redirect Operations: Batch create, export, and find-and-replace DNS records, plus generate bulk 301 redirect rules from CSV files. - Zone and Security Management: Configure custom hostnames for white-label domains, email routing rules, cache purges, WAF rules, rate limiting, and fleet-wide zone settings. - Developer Platform APIs: Query D1 databases across an account, bulk read/write KV namespaces, manage R2 buckets via the S3 API, query Vectorize indexes, and inject Queue messages. - Use Case: You need to migrate 50 DNS records to a new IP and apply strict SSL settings across 20 zones. This Skill generates a rate-limited bash script that updates every record and zone in one run. ## Quick Start Ask the AI to generate a script that exports all DNS records from your zone and updates every A record pointing to an old IP address using the Cloudflare API.

Frequently Asked Questions about cloudflare-api

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I bulk update DNS records with the Cloudflare API?

Read records from a CSV file and loop through POST or PATCH calls to the /zones/{zone_id}/dns_records endpoint with your API token. Add a short sleep between calls to stay within the 1200 requests per 5 minutes rate limit.

When should I use the Cloudflare API instead of wrangler?

Use wrangler or MCP for single operations like deploying a Worker or creating one D1 database. Use the REST API directly for bulk changes, fleet-wide zone settings, custom hostnames, email routing, and cross-database queries.

How do I set up custom hostnames for white-label client domains?

POST to the /zones/{zone_id}/custom_hostnames endpoint with the client hostname and SSL settings. The client then adds a CNAME record pointing their subdomain to your Worker domain, and you poll the hostname status until active.

What are the Cloudflare API rate limits?

Most endpoints allow 1200 requests per 5 minutes, cache purges are limited to 1000 calls per day, and zone creation is capped at 5 per minute. Scripts should include sleep intervals or controlled parallelism to stay within limits.

Can I query multiple D1 databases in one script?

Yes, the D1 query REST endpoint accepts SQL with bound parameters per database ID, so a script can loop over multiple database IDs in one account. Wrangler only targets one database at a time.

Why are my Vectorize metadata filters not matching vectors?

Metadata indexes must be created before inserting vectors, since vectors inserted earlier are not retroactively indexed. Filter values are also case-sensitive, so verify exact string matches.