Find cheapest product
kh_find_cheapestFind the lowest-priced in-stock products for a keyword, sorted by payable price in Toman. Narrow results by category and match all query words.
Instructions
Find the cheapest in-stock products for a keyword, one flat list sorted by payable price (Toman).
Use when the user wants the lowest price for X. The site sorts in-stock matches by payable
price; this drops sponsored items and, by default, loose matches whose title lacks a query
word. Narrow with category_id (kh_categories / kh_search). final_price is the cheapest shade:
check the chosen shade with kh_product. complete=false: matches go on past scanned, raise scan.
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 Persian or English title or brand contains every word of the query. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||