How AI is powering better personalization in e-commerce [with Vercel]. Sign up now

How to solve "attribute/datatype count exceeds limit of 2000" error?

8 repliesLast updated: Nov 29, 2025

Hi guys, it looks like I reached the number of attributes limit on my project. (
Total attribute/datatype count 2001 exceeds limit of 2000 (including submitted mutations
). Is there any way to solve this?
AI Update

I feel your pain - hitting that 2000 attribute limit can be frustrating! This is a real constraint in Sanity's architecture, but there are several ways to address it.

Understanding the Problem

The attribute/datatype count includes every unique field path in your schema across all document types. This adds up quickly, especially with:

Solutions to Reduce Attribute Count

1. Switch to Document-Level Localization

If you're using field-level translation (like having title.en, title.fr, etc.), this is likely your biggest culprit. As explained in Sanity's official documentation on the attribute limit, switching to document-level localization creates separate documents for each language rather than multiplying fields within a single document.

The @sanity/document-internationalization plugin makes this transition manageable. This approach dramatically reduces attribute count because you're reusing the same schema structure across language documents instead of creating unique paths for each language field.

2. Audit and Simplify Your Schema

3. Use References Instead of Nested Objects

Instead of deeply nesting objects, consider breaking them into separate document types and using references. This can reduce the total unique paths in your schema.

4. Track Your Current Count

You can monitor your attribute usage by visiting this URL:

https://<projectId>.api.sanity.io/v1/data/stats/<datasetName>

The attribute count is in fields.count.value and the limit is in fields.count.limit.

Immediate Steps

Plan Limits

The attribute limits vary by plan:

Note that this is currently a hard technical limit - there's no pay-as-you-go option for extra attributes.

The good news is that following these best practices typically results in a better-structured, more maintainable content model anyway! The best practices section in the docs has great examples of how to structure your content efficiently.

Show original thread
8 replies

Was this answer helpful?

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.

Related contributions