Discuss and resolve questions on Liquid, JavaScript, themes, sales channels, and site speed enhancements.
The shopify documentation shows that it is possible to request for suggested query terms along with products and collections when performing predictive search.
but when i go to the developer documentation to actually implement it, there is no mention of the "query" option in the returned predictive_search_resources object. so i don't find any actually practical solution to this.
any help would be appreciated!
Thank you!
Several months later and still no mention in the docs.
Did you manage to solve this in the end Husseiny?
Found an example of the returned query object in the documentation.
{
"url": STRING e.g, "/search?_pos=1&_psq=cos&_ss=e&_v=1.0&q=costume",
"text":STRING,
"styled_text": STRING e.g, "<mark>cos</mark><span>tume</span>",
}
They're nested in the returned predictive_search object and accessible via:
predictive_search.resources.queries
Hope that helps!
June brought summer energy to our community. Members jumped in with solutions, clicked ...
By JasonH Jun 5, 2025Learn how to build powerful custom workflows in Shopify Flow with expert guidance from ...
By Jacqui May 7, 2025Did You Know? May is named after Maia, the Roman goddess of growth and flourishing! ...
By JasonH May 2, 2025