Is it possible to check for how many unique attributes are being used in a specific sanity database?

2 replies
Last updated: Nov 11, 2020

Hello there, I have a question about unique attributes. Is it possible to check for how many unique attributes are being used in a specific sanity database? And if so, how do I check the number of unique attributes for a project?

Nov 11, 2020, 7:40 PM

Hi Victoria! It's indeed possible to track how many attributes you are using in a specific dataset. You should be able to see the relevant attribute count (

fields.count.value
) and limit (
fields.count.limit
) via this URL:
https://&lt;projectId&gt;.<http://api.sanity.io/v1/data/stats/&lt;datasetName|api.sanity.io/v1/data/stats/&lt;datasetName>&gt;

Nov 11, 2020, 8:57 PM

awesome thanks so much!

Nov 11, 2020, 9:17 PM

Sanity.io: Get the most out of your content

Sanity.io is a platform to build websites and applications. It comes with great APIs that let you treat content like data. Give your team exactly what they need to edit and publish their content with the customizable Sanity Studio. Get real-time collaboration out of the box. Sanity.io comes with a hosted datastore for JSON documents, query languages like GROQ and GraphQL, CDNs, on-demand asset transformations, presentation agnostic rich text, plugins, and much more.

Don't compromise on developer experience. Join thousands of developers and trusted companies and power your content with Sanity.io. Free to get started, pay-as-you-go on all plans.