How can we retrieve the filter options in a category with REST API?

In the product category page, I have the filters as below and it depends on each category.

  • Product Category Filter
  • Filter by stock
  • Filter by on stock
  • Filter by price
  • Filter by Manufacturer


So I just want to retrieve this values in REST API. How can we achieve this?

  • Have you tried search criteria ? Oct 30, 2018 at 9:13
  • @AdityaShah Actually, I just want to list all the available filters for the particular category. I'm not aware of the search criteria. If you can point out that would be better. Thanks Oct 30, 2018 at 9:15
  • I added an answer Oct 30, 2018 at 9:35
  • @AdityaShah updated the Qn. Oct 30, 2018 at 9:58
  • Well,I have provided a link. Oct 30, 2018 at 10:18

1 Answer 1


How can we retrieve the filter options in a category with REST API?

GET    /V1/categories/:categoryId/products

Now, apply searchCriteria

The searchCriteria query parameter allows you to search across multiple objects in a collection. You can use the fields query parameter in conjunction with searchCriteria to limit the output. The question mark (?) that precedes fields in all the other examples in this document is replaced with an ampersand (&).

The following query returns only the sku and name parameters for product items whose category_gear attribute includes the value 86.

GET http://<host>/rest/V1/products/?searchCriteria[filter_groups][0][filters][0][field]=category_gear&searchCriteria[filter_groups][0][filters][0][value]=86&searchCriteria[filter_groups][0][filters][0][condition_type]=finset&fields=items[sku,name]


GET http://<magento_host>/rest/V1/products?
  • 1
    I think the question is to get the available filters for a particular category. Nov 20, 2019 at 13:19
  • Yes @Mohitchauhan We can achieve this by above :) for particular category you need to pass specific ID in here -> /V1/categories/:categoryId Nov 20, 2019 at 14:34
  • Question is for available layer navigation filter by current category/current id Not search by category Jun 12, 2020 at 10:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.