Shopify GraphQL API productsCount query not working

That’s odd… this query seems to be working for me:

curl -X POST \
https://myteststore.myshopify.com/admin/api/2025-01/graphql.json \
-H 'Content-Type: application/json' \
-H 'X-Shopify-Access-Token: shpat_xxxxxxxxxxxxxxxxx' \
-d '{
"query": "query { productsCount(query: \"id:>=1000\") { count } }"
}'

I do the get the ‘field doesn’t exist’ error message if I try older API versions though but it looks like you’re using 2025-01 as well? A few things I’d test:

  • Double-check that you’re on 2025-01, maybe try 2024-10 or unstable also just to make sure
  • Do other queries, like query { shop { name } } work for you?
  • Does this work on another store besides the one you’re testing on?

Best,
Daniel