Do Objects count towards Sanity's Document limit?
No, objects do not count toward Sanity's document limit for a given pricing tier!
Here's the key distinction:
What counts as a "document":
- Only document types count toward your document limit
- Document types are top-level content structures that have
type: 'document'in your schema - They appear in your Studio sidebar and have system fields like
_id,_rev,_createdAt, etc. - Examples: pages, blog posts, products, authors
What doesn't count:
- Object types - These are reusable schema structures used within documents (like address objects, SEO metadata objects, etc.)
- They don't exist independently and can't be created as standalone content
- They're just structured data nested inside documents
Document limits by plan: According to the technical limits documentation:
- Maximum documents: 10 million (customizable for Enterprise customers)
- Free plan: 2,000 unique attributes
- Growth plan: 10,000 unique attributes
- Enterprise plan: Custom attribute limits
What you should be aware of: While objects don't count as documents, they do contribute to your attribute limit. An attribute is any unique path/datatype combination across all documents in your dataset. So if you have complex nested objects with many fields, those fields count as attributes.
For example, an array like [2.718, 3.14, "abc", "def", true] counts as 4 attributes (1 for the array itself, plus 3 for the datatypes: float, string, and boolean).
Bottom line: Use as many object types as you need to structure your content effectively - they won't eat into your document count, only into your attribute limit, which is typically quite generous.
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.