Cloudflare Filters API
Last updated Apr 24, 2026 Cloudflare Filters is an API-only component of firewall rules for designing complex criteria that rely on boolean operators and other logic to examine incoming HTTP traffic and look for a match.
Deprecation notice
Cloudflare Firewall Rules has been deprecated. Cloudflare has moved existing firewall rules to WAF custom rules. For more information on this change, refer to the upgrade guide.
For example, a filter matching:
- An HTTP user agent, and
- The HTTP path, and
- The source IP address
Associate a filter with a firewall rule to define the scope of that rule.
Use IP lists within a filter to refer collectively to a group of IP addresses. Refer to the Lists API for more information.
Before getting started with the Cloudflare Filters API, familiarize yourself with rule expressions. For a complete reference, refer to Rules language.
Differences from other Cloudflare APIs
The Firewall Rules API behaves differently from most Cloudflare APIs in two ways:
- API calls accept and return multiple items, and allow applying data changes to multiple items.
- Although API calls return the standard response, the error object follows the JSON API standard ↗︎, such that in an error condition, it is clear which item produced the error and why.
To get started, review What is a filter?, followed by the Cloudflare Filters JSON object and Endpoints.
Was this helpful?
YesNo
On this page
{"@context":"https://schema.org","@type":"TechArticle","@id":"https://developers.cloudflare.com/firewall/api/cf-filters/#page","headline":"Cloudflare Filters API","description":"Manage filters for firewall rules via the API.","url":"https://developers.cloudflare.com/firewall/api/cf-filters/","inLanguage":"en","image":"https://developers.cloudflare.com/firewall/api/cf-filters/og.png?v=4bd390691a96f95a","dateModified":"2026-04-24","publisher":{"@type":"Organization","name":"Cloudflare","description":"One platform for your apps, agents, and workforce. Build, secure, and scale without managing infrastructure","url":"https://www.cloudflare.com/","sameAs":["https://github.com/cloudflare","https://www.linkedin.com/company/cloudflare","https://x.com/cloudflare"],"logo":{"@type":"ImageObject","url":"https://developers.cloudflare.com/logo.svg"},"address":{"@type":"PostalAddress","streetAddress":"101 Townsend St","addressLocality":"San Francisco","addressRegion":"CA","postalCode":"94107","addressCountry":"US"},"contactPoint":[{"@type":"ContactPoint","contactType":"Customer Support","url":"https://support.cloudflare.com/","availableLanguage":["English"]},{"@type":"ContactPoint","contactType":"Sales","url":"https://www.cloudflare.com/contact/","availableLanguage":["English"]}]},"isPartOf":{"@type":"WebSite","@id":"https://developers.cloudflare.com/#website","name":"Cloudflare Docs","url":"https://developers.cloudflare.com/"}}
description: Delete filters or rules with DELETE API requests. title: DELETE examples image: https://developers.cloudflare.com/firewall/api/cf-filters/delete/og.png?v=7424e24a196e746f
Documentation Index
Fetch the complete documentation index at: https://developers.cloudflare.com/firewall/llms.txt
Use this file to discover all available pages before exploring further.
Docs