Our Partner & Developer boards on the community are moving to a brand new home: the .dev community forums! While you can still access past discussions here, for all your future app and storefront building questions, head over to the new forums.

Filter products in search results page with Storefront API

Filter products in search results page with Storefront API

gabrielxfive
Visitor
1 0 2

Hello everyone!

How should I set up my query if I want to return the available filters for specific search results using the Storefront API?

What I want to perform is almost exactly what the "Filter products in a collection" documentation explains, but considering a search result instead of a collection.

It looks like it's possible to do that using Storefront filtering. I wonder if it's possible to do it with Storefront API as well.

 

Thanks in advance

Gabriel Manussakis

Replies 2 (2)

tmstn
Shopify Partner
14 0 16

I am looking into doing this now.

 

I am going to achieve this by performing a search using using the same parameters as the original search, plus any extra filters the customer applies on the front end.

 

You can learn more about querying products here: https://shopify.dev/api/storefront/2022-01/queries/products

hendrik_mltch
Shopify Partner
4 0 0

Hi @gabrielxfive ,

did you managed to do it?