The following limits apply to SQL API queries:
| Limit | Value |
|---|---|
| SQL statements per request | 1 |
| SQL statement length | 10 KiB |
| Parser nesting depth | 10 |
| Datasets per statement | 1 |
| Accounts per statement | 1 |
| Minimum time constraint | A lower timestamp bound is required. |
ORDER BY |
Requires LIMIT, except for Workers Analytics Engine datasets. |
LIMIT and OFFSET |
Non-negative integer literals. OFFSET normally requires LIMIT. |
The lower timestamp bound and tenancy scope can be supplied in SQL or through the JSON request fields.
Dataset-specific limits can restrict field availability, the number of selected fields, historical retention, query duration, and the maximum number of returned rows. These limits depend on the dataset, your plan, and the account or zone being queried. A dataset-specific maximum page size rejects an explicit LIMIT above the maximum. It does not add a limit to a query that omits one.
The API also applies request-rate, concurrency, queue, execution-time, and resource-consumption limits. Cloudflare can adjust these operational limits to protect service availability.
When a request exceeds a rate or resource limit, the API returns HTTP 429, 507, or 503. Reduce the requested time range or returned row count before retrying. Honor the Retry-After response header when it is present.