Find cheapest product
kh_find_cheapestFind the minimum in-stock price for a product keyword, returning a flat list sorted by payable price in Toman. Filter by category or require all query words in titles.
Instructions
Find the cheapest in-stock products for a keyword, one flat list by payable price (Toman).
Use for the lowest price of X. Drops loose matches whose title lacks a query word (match_all_words). Narrow with category_id. complete=false: matches go on past scanned, raise scan. Next: kh_product.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| scan | No | Max search results to scan, cheapest first, 300 per request. | |
| limit | No | Max offers to return. | |
| query | Yes | Product name or keyword, Persian or English, e.g. 'کرم مرطوب کننده' or 'cerave'. | |
| category_id | No | Category id from kh_categories or kh_search, e.g. 145 (moisturizers). | |
| match_all_words | No | Keep only products whose title or brand contains every query word. |