Price Filter Not Working with useProductSearch Hook

I’m using the useProductSearch hook to search for products and apply a price range filter, but the price filter doesn’t seem to work at all. It keeps returning products outside the specified price range.

Here’s my code:

const { products, loading, error, fetchMore } = useProductSearch({
    query: "shirt",
    first: 50,
    filters: {
      price: {
        min: 50,
        max: 200,
      },
    },
  });

Here’s output:

**
Issue**

Even though I’m applying a price filter between $50 – $200, the response still includes products priced below that range.

Questions

Why is the price filter not working with useProductSearch?

Is there another recommended way to filter products by price using the Storefront API or Hooks?

If anyone has solved this or knows the correct way to apply price filters, I would really appreciate the help!

I also encountered the same issue, and I realized that because of the user’s current currency, the value passed into price needs to be converted to the user’s currency — it’s not defaulted to USD.

We have a ticket to track search issues - are you still stuck with this?

Yes, this issue is still unresolved and requires further attention.

I am still facing the price filter issue, Any update on this issue?

Yes, any update please ?

Upon further investigation (internal ticket id #89427) is seems as if there’s undocumented nuance to product search with a currency filter:

  • All input filter values are treated as USD
  • A product will be returned if any of it’s variants fall in to the range

In my testing locally this does seem to hold true but it would be good to see specific examples if they do not follow this and I can investigate further.