Skip to content
Cloudflare Docs

Rate Limiting

The Rate Limiting API lets you define rate limits and write code around them in your Worker.

You can use it to enforce:

  • Rate limits that are applied after your Worker starts, only once a specific part of your code is reached
  • Different rate limits for different types of customers or users (ex: free vs. paid)
  • Resource-specific or path-specific limits (ex: limit per API route)
  • Any combination of the above

The Rate Limiting API is backed by the same infrastructure that serves rate limiting rules.

Get started

First, add a