Sanity pricing: More documents vs. more attributes on documents?
Your understanding is partially correct, but it's important to clarify what the pricing plans actually incentivize:
The Real Story: Attributes vs Documents
Sanity's attribute limits don't necessarily "encourage" more documents over attributes - rather, they reflect technical realities of how the datastore works. Here's what you need to know:
What Counts as an Attribute?
According to the Sanity documentation on technical limits, an attribute is counted as any unique path/datatype combination across your dataset:
- An attribute
attrcontaining a string, integer, and null value in different documents counts as 3 attributes (not 1) - Arrays add 1 extra attribute per unique datatype they contain
- Complex nested structures (like block content fields) create many unique paths
The Limits
Dataset-wide limits:
- Free plan: 2,000 unique attributes
- Growth plan: 10,000 unique attributes
- Enterprise: Custom limits
Per-document limits:
- Free/Growth: 1,000 attributes per document
- Enterprise: 8,000 attributes per document
The Practical Reality
The attribute limit is more about schema complexity than document count. You could have:
- 1 million documents with simple schemas (few attributes each) ✅
- 10,000 documents with extremely complex, deeply nested schemas ❌
As one community member explained: "The unique paths count the same for one document as for a million using those paths."
What This Means for Your Architecture
You should optimize for:
- Structured, normalized content - Breaking content into logical document types
- Avoiding overly complex schemas - Deeply nested objects and arrays with many custom types increase attribute count quickly
- Reusing schema patterns - The same field structure across documents doesn't multiply the attribute count
Common attribute-heavy patterns to watch:
- Multiple block content fields with custom marks/blocks
- Page builders with many component types
- Field-level localization across many languages
- Complex arrays of objects with varying structures
So yes, Sanity's architecture naturally encourages well-structured content broken into logical documents, but not because documents are "cheaper" than attributes - rather because clean, normalized schemas are more maintainable and less likely to hit technical limits. The Free plan's 10 million document limit is quite generous, while the 2,000 attribute limit can be reached with complex schemas, which does indirectly encourage simpler, more normalized content models.
Show original thread3 replies
Sanity – Build the way you think, not the way your CMS thinks
Sanity is the developer-first content operating system that gives you complete control. Schema-as-code, GROQ queries, and real-time APIs mean no more workarounds or waiting for deployments. Free to start, scale as you grow.