Spaces at beginning of product tags

8 0 4



I unfortunately ran into a situation where I had a task that was adding product tags with a space at the beginning of each tag. So now I am trying to fix this, but I can't seem to make a graphQL API call that only pulls products with the tag that has a space at the beginning, it pulls all products with the tag whether there's a space at the front or not. Does anyone know how I can isolate products that are tagged with a tag that starts with a space?

Reply 1 (1)

Shopify Staff
1326 218 460

Hi @Reliked,


Thanks for your post. We've been having difficulty replicating there being a space at the beginning of tags as the system tries to prevent that from happening in the web admin as well as through the REST and GraphQL API's, which is making it difficult to test querying for them that way. Some questions that come to mind are:


  • Do you have more information on how these tags with spaces in front were added? ie. an API call, a CSV import
  • Are you sure they're normal spaces as opposed to some kind of special character?


Hope you have a great day

Developer Support @ Shopify
- Was this reply helpful? Click Like to let us know!
- Was your question answered? Mark it as an Accepted Solution
- To learn more visit or the Shopify Web Design and Development Blog