Technical limits
A list of Content Lake limits.
This article describes limits in Content Lake. Note that a project may have additional limits depending on its plan. See the pricing page for plan-specific details. Most limits cause the API to reject the call with an error. A few are applied silently and are noted where they appear. If you need higher limits, contact Sanity support.
Sanity uses standard SI units, so 1 MB is 1,000,000 bytes.
Datasets
The following limits apply to datasets:
- Maximum number of documents:
- Free plan: 10,000 documents
- Growth plan: 50,000 documents
- Enterprise plan: 1,000,000 documents or more, depending on the plan
- Maximum total size of JSON documents: 10 GB
- Maximum number of unique attributes across all documents:
- Free plan: 2,000 attributes
- Growth plan: 10,000 attributes
- Enterprise plan: 10,000 attributes
- Maximum dataset name length: 64 characters
How attributes are counted
An attribute here is considered to be any unique attribute/datatype combination, so an attribute attr containing a string, integer, and null value (in different documents) counts as 3 attributes. Additionally, arrays count as 1 extra attribute per unique datatype they contain, so the array [2.718, 3.14, "abc", "def", true] counts as 4 attributes (1 for the array itself, and 3 for the datatypes float, string, and boolean).
Documents
The following limits apply to individual documents:
- Maximum JSON document size: 32 MB
- Maximum number of attributes:
- Free and Growth plans: 1,000 attributes
- Enterprise plan: 8,000 attributes
- Maximum attribute nesting depth: 20 levels
- Maximum searchable term length: 1,024 UTF-8 characters. Terms longer than this are not indexed, and no error is returned.
Listeners
Maximum concurrent listeners for the various project plans:
- Free plan: 1,000 listeners
- Growth plan: 5,000 listeners
- Enterprise plan: 10,000 listeners
What happens when you exceed the listener limit
If you hit the maximum concurrent listener limit, you get the error Max listener limit exceeded at <LIMIT>.
API calls
The following limits apply to API calls:
- Maximum working set retrieved from Content Lake: 500 MB
- Maximum query execution time: 1 minute
- Maximum mutation execution time: 3 minutes
- Maximum export execution time: 5 minutes
- Maximum listener connection lifetime: 4 hours. Connections are dropped between 3 hours 50 minutes and 4 hours.
- Maximum execution time for the deprecated Scheduling API: 1 minute. Use Scheduled Drafts or Content Releases instead.
Rate limits
Resource rate limits
Creation limits are enforced for the following resources.
- Maximum new organizations per user: 5 per hour
- Maximum new projects per organization: 5 per hour
API rate limits
Two rate limits apply: one per source IP and one for the number of concurrent queries.
API rate limits per IP
API rate limits are enforced per client IP address per second. If you exceed a rate limit, the API returns HTTP 429 responses for any further requests of that type until the next period begins.
- Maximum mutation rate: 25 req/s (combined
POSTto/data/mutateandPOSTto/data/actions) - Maximum upload rate: 25 req/s (
POSTto/assets/) - Maximum global API call rate: 500 req/s
- Maximum global API Content Delivery Network (CDN) call rate: unlimited for cached responses
API concurrent rate limits
Concurrent API requests are also rate limited per dataset:
- Maximum concurrent queries to API: 500
- Maximum concurrent mutations to API: 100
The API CDN itself isn't rate limited, but misses (uncached requests) are subject to these concurrency limits.
HTTP requests
The following limits apply to HTTP requests:
- Maximum combined request headers size: 15 KB
- Maximum request body size: 100 MB
- Maximum mutation request body size: 4 MB
When request headers exceed 15 KB
If your request headers exceed 15 KB, switch from GET to POST and put the payload in the request body. See Queries — the POST form.
API CDN HTTP requests
The following limits apply to /data endpoints (not asset endpoints):
The maximum POST size is 307,200 bytes.
Assets
The following limits apply to assets:
- Maximum image size: 256 megapixels
- Maximum output dimensions (from transforms): 8,192 pixels
- Supported image upload formats:
pngjpgjpegbmpgiftiffsvgpsdwebpheifavif
- Maximum upload duration:
- Dataset assets: 5 minutes
- Media Library assets: 1 hour
Animated images with transforms
- Maximum size of animated images with transforms: 256 megapixels
- Calculated as: width × height × frame count = total pixels.
- Divide total pixels by 1,000,000 to get megapixels.
This limit applies to on-demand transforms for supported animated image formats. Animated output is supported for gif and webp only. A transform that exceeds 256 megapixels across all frames does not fail — it returns a static image.
Users
The following limits apply to users:
- Maximum number of users per project: 1,000
User attributes are available on certain Enterprise plans:
- Maximum attributes per user: 50
- Maximum user attribute name length: 32 characters
- Maximum user attribute value length: 1,024 characters
Contact Sanity if you need more than 1,000 users on a single project.
Content releases
The following limits apply to content releases:
- Maximum number of document versions in a release: 1,000.
- Maximum total size of JSON documents in a release: 100 MB.
The total size of JSON documents in a release refers to the sum of the size of each JSON document in bytes.
Releases batch in sets of 10 MB. Documents may not publish at the exact same moment if they exist in different 10 MB blocks.
For best practices on avoiding rate limits, including guidance on static site builds, retry logic, and CDN usage, see the rate limiting section on the API CDN page.
Hierarchy
Public beta
The hierarchy primitive is in public beta. The limits and validation rules in this section may change before general availability.
The following limits apply to documents that participate in the hierarchy primitive (sanity.tree, sanity.directory, sanity.symlink, and any other document that carries a parent reference).
- Maximum hierarchy depth: 20 levels. The
sanity.treeis level 0; asanity.directoryimmediately under it is level 1. - Maximum
namelength onsanity.directory: 255 characters. parentandtargetmust be strong references (_weak: trueis rejected).parentmust reference asanity.treeorsanity.directory. Other types are rejected.parentmust not reference itself.- Cycles are rejected at mutation time (a directory cannot become its own ancestor).
sanity.symlinkdocuments cannot target themselves.
For the full list of validation errors, see the hierarchy error reference.
Where these limits are enforced
Some of these constraints are enforced by the Content Lake API, but consuming applications such as Media Library may enforce extra limitations.