openbridge.products.search(query)
Searches products by a text query.
This is a chainable method. Call .list() to execute.
Parameters
| Param | Type | Required | Description |
|---|
query | string | Yes | Search query string |
Returns
ProductsQueryBuilder (chainable)
Examples
Basic search
const { items } = await openbridge.products.search('cotton shirt').list()
With limit
const { items } = await openbridge.products.search('blue').limit(20).list()
With field selection
const { items } = await openbridge.products
.search('summer dress')
.limit(10)
.select(['title', 'handle', 'priceRange', 'featuredImage'])
.list()
Search within collection
const { items } = await openbridge.products
.collection('womens')
.search('dress')
.limit(12)
.list()