Search products
search_productsSearch the merchant's products. For a connected store (Shopify, WooCommerce, BigCommerce, Ecwid, Wix) this queries the store live; otherwise it reads products stored in Foldsquare. The ids it returns are exactly what create_catalog takes as products: { from: "ids", ids: [...] }. Not every store can apply every filter, and a filtered search may stop before it has looked at everything — then partial is true and note says what was covered: the result is not the complete set.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sort | No | Default "relevance", which on most stores means the store's own order; "title" gives a predictable alphabetical order. `coverage.sortApplied` reports what was actually used. | |
| tags | No | Keep only products carrying these tags. Not every store exposes tags — same reporting as productType. | |
| limit | No | How many products to return (default 20). A page size, not a total — use `cursor` for the rest. | |
| order | No | Direction for `sort`. | |
| cursor | No | Continues a previous search: `nextCursor`, with EVERY OTHER ARGUMENT UNCHANGED. A cursor sent with changed filters is refused. | |
| search | No | Free-text match on title and SKU. On a connected store this is the store's own search, so what counts as a match varies by platform; `coverage` says who did the matching. | |
| source | No | Where to read. "auto" (default) queries the connected store if there is one. Use "foldsquare" to find products added with import_products: those are not in the store, so "auto" will never return them. | |
| status | No | Publication status, default active, which leaves drafts out; "any" includes them. | active |
| vendor | No | Keep only these vendors/brands. Exact match, case-insensitive; any one counts. Call list_product_facets first to get the real spellings instead of guessing at them. | |
| tagsMode | No | "any" (default) keeps a product carrying at least one of the tags; "all" requires every one. | |
| productType | No | Keep only these product types. Several platforms have no such field; there the filter is reported under `coverage.unsupported` rather than quietly matching nothing. | |
| availability | No | Purchasability, NOT inventory count: a made-to-order product with zero on hand is in stock. This is what a merchant means by "in stock". Default "any". | |
| collectionId | No | Restrict to one collection/category. Take the id from list_collections — a collection NAME will not work on a connected store. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| note | No | ||
| total | Yes | null when the store does not say | |
| source | Yes | Where the products were read: the store platform or foldsquare | |
| hasMore | Yes | ||
| partial | Yes | true: the search stopped before covering everything; `note` says what was covered | |
| coverage | Yes | Which filters the store applied, and how far the search looked | |
| products | Yes | ||
| returned | Yes | ||
| nextCursor | Yes | Pass as `cursor`, with every other argument unchanged, for the next page | |
| totalIsExact | Yes |