---
description: Apply GraphQL Analytics API rate limits per account and per zone, so usage scales with the number of resources you query.
title: Account-based rate limiting
image: https://developers.cloudflare.com/og-docs.png
---

[Skip to content](#main-content)

> Documentation Index  
> Fetch the complete documentation index at: https://developers.cloudflare.com/analytics/llms.txt  
> Use this file to discover all available pages before exploring further.

# Account-based rate limiting

Last updated Aug 26, 2026|Copy as Markdown|[View as Markdown](https://69edd8d5.previews.developers.cloudflare.com/analytics/graphql-api/account-based-rate-limiting/index.md)|[Agent setup](https://69edd8d5.previews.developers.cloudflare.com/agent-setup/)

By default, the GraphQL Analytics API applies rate limits per user or per API token. As you grow — adding more zones and accounts — all of your analytics traffic competes for that single per-credential quota.

**Account-based rate limiting** applies limits per account and per zone instead. Each account and zone gets its own independent budget, so a single user or token can query many resources at once without exhausting one shared quota. This is the recommended model if you query analytics across multiple zones or accounts.

## Benefits

* **Scales with your footprint.** Throughput grows with the number of accounts and zones you query, instead of being capped by a single per-credential limit.
* **Higher quotas for Enterprise.** Enterprise customers receive higher default per-account (15 rps) and per-zone (10 rps) quotas.
* **Easy limit increases.** Need more headroom? Get in touch, we can accommodate needed increases to your limits.

## Enable account-based rate limiting

Send the following HTTP header with your requests to the existing GraphQL API endpoint (`https://api.cloudflare.com/client/v4/graphql`):

```txt
X-Rate-Limit-Type: account-based
```

Your endpoint URL and credentials stay the same. Requests without this header continue to use the default per-user / per-token limits, so you can adopt this gradually.

## Limits

| Scope        | Default limit                                           |
| ------------ | ------------------------------------------------------- |
| Each account | 1 request per second (300 requests per 5-minute window) |
| Each zone    | 1 request per second (300 requests per 5-minute window) |

A single `accounts` block counts one request against the referenced account. A single `zones` block counts one request against the referenced zone; if the `zones` block is nested inside an `accounts` block, it counts against that account instead.

Because limits apply per resource, the total throughput available to one user or token scales with the number of distinct accounts and zones you query.

Note

If you send more than one request per second sustained to a **single** account or zone, request a higher limit for that resource (refer to [Request higher limits](#request-higher-limits)).

## Query requirements

Most queries work unchanged. Only queries that select a **list** or **range** of zones at the top (`viewer`) level need adjusting: nest those zones inside a single `accounts` block. The adjusted queries are valid under **both** rate limiting models.

Querying a single zone — no change:

```graphql
{
  viewer {
    zones(filter: { zoneTag: "<ZONE_TAG>" }) {
      # ...
    }
  }
}
```

Querying a single account — no change:

```graphql
{
  viewer {
    accounts(filter: { accountTag: "<ACCOUNT_TAG>" }) {
      # ...
    }
  }
}
```

Querying a list or range of zones — nest inside the owning account:

```graphql
# Not supported: a list of zones at the viewer level
{
  viewer {
    zones(filter: { zoneTag_in: ["<ZONE_A>", "<ZONE_B>"] }) {
      # ...
    }
  }
}

# Supported: the same zones nested inside their account
{
  viewer {
    accounts(filter: { accountTag: "<ACCOUNT_TAG>" }) {
      zones(filter: { zoneTag_in: ["<ZONE_A>", "<ZONE_B>"] }) {
        # ...
      }
    }
  }
}
```

The same applies to range filters such as `zoneTag_gt`. The query semantics are identical — you only need the account tag that owns the zones, which you already have.

## Request higher limits

If you need more than the default per-account or per-zone throughput, contact your Cloudflare account team to request an increase for the specific accounts and zones you query. Increases under this model are applied per resource and take effect quickly, without an engineering release.

## Rate limit errors

When a limit is exceeded, the API returns an error with `extensions.code` set to `budget`, naming the account or zone that was throttled:

```json
{
  "data": null,
  "errors": [
    {
      "extensions": { "code": "budget", "timestamp": "2026-01-01T01:01:01Z" },
      "message": "Account <ACCOUNT_TAG> has exceeded its rate limit. Please try again after 5 minutes. Refer to this page for more details about rate limits: https://developers.cloudflare.com/analytics/graphql-api/limits/",
      "path": null
    }
  ]
}
```

The equivalent zone error reports `Zone <ZONE_TAG> has exceeded its rate limit`. Retry after the 5-minute window, spread traffic across resources, or [request a higher limit](#request-higher-limits).

Was this helpful?

YesNo

## On this page

[![](https://69edd8d5.previews.developers.cloudflare.com/_astro/logo.te5VL_aD.svg)Docs](https://69edd8d5.previews.developers.cloudflare.com/)

```json
{"@context":"https://schema.org","@type":"TechArticle","@id":"https://developers.cloudflare.com/analytics/graphql-api/account-based-rate-limiting/#page","headline":"GraphQL API - Account-based rate limiting · Cloudflare Analytics docs","description":"Apply GraphQL Analytics API rate limits per account and per zone, so usage scales with the number of resources you query.","url":"https://developers.cloudflare.com/analytics/graphql-api/account-based-rate-limiting/","inLanguage":"en","image":"https://developers.cloudflare.com/og-docs.png","dateModified":"2026-08-26","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/"}}
```
