productVariantsCount filter

Hi,

At the moment the productVariantsCount has a query parameter, however the docs and in testing no filters are supported or work.

Are there any plans to support queries here? As the productsCount query works and supports the usual set.
It would be really helpful to be able to count the variants that match a filter

Hey @JordanFinners! You’re right that the query parameter exists on productVariantsCount, but it explicitly doesn’t support any search fields - which is a bit odd!

I looked internally for projects that might have improvements to this this in scope but didn’t find any, initially at least.

If you can share some example use cases I’ll be happy to share them with the Products team and get it on their radar. Can’t promise anything, but the more feedback we get on these things the more likely they are to be considered!

Thank you for looking!
Just to be able to do quick counts for example there are X product variants with tag, or X product variants beginning with SKU etc.
I can’t use the productCounts because each can have a varying number of variants, so it gives a poor estimate of the amount of variants that would be affected by a change or included in a group :slight_smile:

Gotcha - I agree being able to quickly count variants with specific tags or SKU patterns would be useful for impact analysis before making bulk changes.

I’ve passed this feedback along to the Products team, thanks for raising this with us!

Hey @Donal-Shopify I wondered if there were any updates this please? :folded_hands: It would be really helpful for merchants using my app

Hey @JordanFinners, apologies for the delay circling back. I re-checked internally and unfortunately there’s no update I can share. The 2026-04 docs still show “No supported search fields” on productVariantsCount.query, and I couldn’t find any planned work to add filter support there.

I’ve logged your follow-up as a fresh feature request to ensure the continued demand for this is tracked. Thanks for bringing this back up!

Hey, I wondered if there was any updates here if possible please.

It would be a huge win to be able to do this and provide quick overviews to merchants (I had a merchant ask for this, this morning) :folded_hands:

Hey Jordan, thanks for following up and passing on your merchant’s interest in this. I’m looking into this internally and will let you know as soon as I have more info to share - cheers!

Hi Jordan - I appreciate you waiting to hear back from me! I checked this again with the team responsible for the query. There are currently no plans to add filter support to productVariantsCount.

Your renewed interest and the fact a merchant is also asking for it is logged with that team so the demand is on their radar as they consider how the query evolves. In the meantime, paginating productVariants with the relevant filters remains the supported route for a filtered count.

Hey @Donal-Shopify

Not sure if the feedback makes sense or not here, but variant count has be hard to deal with for us as well.

There is not good way to know ahead of time the number of variants on the products. We have to fetch every single product and the field variantsCount to get it. On large catalog it’s slow, even a bulk operation.

Why it’s a problem? A product with 3 variants is not the same as a product with 2000 variants (yes we’ve got the case).
They can cause serious performances issues on our the servers.

There is also not easy way to know the total number of variants on a store. Same problem we have to fetch all products and get the sum.

Hi @Soufiane_Ghzal

Have you tried this way yet?

@quanicetea Thank you so much for sharing! I’m not sure how I could have missed that for so long :astonished_face:

@Soufiane_Ghzal
You might have misread the documentation. The 10k limit is the default; if you want an unlimited count, you need to set the limit to null.

Without default limit

With limit: null

Yes I misread it! I realized it only after I edited my post and finally removed it. Thank you again for your help!