Filters of a listing
kh_filtersRetrieve available filters for a category, brand, tag, or search, including brands, colors, attributes, price ranges, and stock counts, to refine product browsing.
Instructions
List the filters of a category, brand, tag or search: sub-categories, brands, colors and attribute facets (skin type, hair type, free-from, ingredients, gender, ...) with ids and product counts, plus price range and stock counts.
Use before kh_browse: pass brand slugs as brands, color ids as colors, facet keys as facets.
Brands are cut to the 40 biggest and each attribute group to 25 values (omitted says how many
more); ask for one group to see it all. Prices in Toman. price_range is on the list price before
discount (min 0 = out-of-stock items), so its max can be above the dearest payable price.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| tag | No | Collection / campaign tag slug from kh_deals (the part after /tags/), e.g. 'festival-js' (pink box). | |
| group | No | Return only attribute groups whose name contains this, in full, e.g. 'نوع پوست' (skin type). | |
| query | No | Keyword, alone or inside the listing. | |
| brands | No | Brand slugs from kh_brands / kh_filters (OR), e.g. ['simple', 'cerave']. | |
| category_id | No | Category id from kh_categories or kh_search, e.g. 145 (moisturizers). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||