Search products
Search for products matching a specific words or characters given.
Documentation Index
Fetch the complete documentation index at: https://www.commercengine.io/docs/llms.txt
Use this file to discover all available pages before exploring further.
Authorizations
Access token
Headers
This param is used to determine product pricing, promotions, and subscription rates. If a valid customer group id is provided, pricing details will be retrieved accordingly. If no matching data is found for the specified customer group id, the system will fall back to the default customer group id. If no data is found for the default group either, the highest applicable price will be returned.
Body
Payload for searching products.
String for searching products, considers the first ten words of any given search query.
To request a specific page of results.
Maximum number of records returned for a page.
provide list of attributes for specific facets or * for all facets. All attributes supported in the filter parameter are also supported here.
Filter expression(s) to narrow results. Omit for no filtering.
Syntax: attribute OPERATOR value
Operators:
| Operator | Description | Example |
|---|---|---|
= | Equal to | product_type = physical |
!= | Not equal to | product_type != bundle |
>, >=, <, <= | Comparison | rating > 4 |
TO | Inclusive range (>= AND <=) | pricing.selling_price 100 TO 500 |
IN [...] | Matches any value in the list | product_type IN [physical,bundle] |
NOT IN [...] | Excludes all values in the list | product_type NOT IN [physical,bundle] |
EXISTS | Attribute is present (even if null or empty) | tags EXISTS |
NOT EXISTS | Attribute is absent | tags NOT EXISTS |
IS NULL | Value is null | variant_id IS NULL |
IS NOT NULL | Value is not null | variant_id IS NOT NULL |
IS EMPTY | Value is "", [], or {} | tags IS EMPTY |
IS NOT EMPTY | Value is not empty | tags IS NOT EMPTY |
AND | Both conditions must match | rating > 4 AND product_type = physical |
OR | Either condition must match | product_type = physical OR product_type = bundle |
NOT | Negates a condition | NOT product_type = bundle |
Important rules:
- Operators are case-sensitive — must be uppercase (
AND, notand). - String value comparison is case-insensitive —
product_type = Physicalmatchesphysical. - Operator precedence:
NOT>AND>OR. Use parentheses to override. - String values containing whitespace must be wrapped in single quotes.
INtakes comma-separated values in square brackets.- Maximum array nesting depth is 2 levels.
Supported attributes: product_type, categories.name, attributes.key, pricing.listing_price, pricing.selling_price, pricing.tax_rate, product_id, variant_id, product_name, variant_name, tags, sku, stock_available, rating
Combining conditions:
- String: Use
AND/ORoperators inline —"rating > 4 AND product_type = physical" - Array of strings: Conditions are combined with AND —
["rating > 4", "product_type = physical"] - Nested arrays: Inner arrays express OR, outer array expresses AND —
["product_type = physical", ["product_type = bundle", "rating > 4"]]
Sort results by attributes. Use asc for ascending order and desc for descending order.
"product_type:desc"
"product_name:asc"