search_products
Search the BuyWhere product catalog by keyword. Treat deliver_to as REQUIRED for buyer-facing use (ISO-3166 country of the end user); it takes precedence over country_code/country and prevents all-market scans. Returns product records with title, description, image, price, and merchant information. Covers e-commerce platforms across Singapore, Malaysia, Indonesia, Thailand, Vietnam, and US. Use compact=true for agent-optimized responses with structured_specs, comparison_attributes, and normalized_price_usd fields. BUY-74597 degraded contract: when the catalog query cannot complete inside the user-facing timeout, this tool returns a 200-OK envelope with meta.status="degraded", meta.emptiness_reason="api_error" with meta.degraded_kind="timeout" (or "partial_timeout" / "auth_failure"), meta.confidence="low", and meta.diagnostic.timed_out_stage naming the failed stage (catalog_search / offer_aggregation / merchant_join). It never returns an unqualified empty result when the cause is timeout, auth failure, upstream exception, or circuit breaker. Agents should branch on meta.degraded === true (or meta.status === "degraded") instead of treating empty data as no_match.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| q | No | Keyword search query | |
| mode | No | Search mode: keyword=FTS only (default, matches REST /v1/products/search), semantic=vector only, hybrid=RRF blend of FTS+vector. Falls back to keyword if vector DB or FLOWAI_EMBED_API_KEY unavailable. | keyword |
| limit | No | Number of results (max 100, default 20) | |
| query | No | Alias for q (accepted for agent convenience; use q). Without this, callers passing `query` get 0 rows and the reltuples-derived total — see BUY-75287. | |
| domain | No | Filter by merchant platform (e.g. lazada, shopee, amazon) | |
| market | No | Alias for country_code (deprecated, use country_code). | |
| offset | No | Pagination offset | |
| region | No | Filter by region (sea, us, eu, au) | |
| compact | No | Return agent-optimized compact shape: structured_specs, comparison_attributes, normalized_price_usd. Reduces response size ~40%. Recommended for agent tool-use. | |
| country | No | Alias for country_code (deprecated, use country_code) | |
| category | No | Filter by product category name (e.g. "Laptops", "Smartphones", "Televisions"). Use to exclude accessories and get actual products. | |
| max_price | No | Maximum price (in currency inferred from country_code, or SGD by default) | |
| min_price | No | Minimum price (in currency inferred from country_code, or SGD by default) | |
| deliver_to | No | Treat as REQUIRED for buyer-facing use: ISO-3166 country of the END USER (e.g. "SG", "US"). Without it results are not shipping-ranked and may be undeliverable. Preferred over country_code/country. | |
| country_code | No | Filter by ISO country code. Also infers default currency for price filters (SG→SGD, US→USD, VN→VND, TH→THB, MY→MYR). |