Skip to main content
shoppy.products.search(query)
Searches products by a text query.
This is a chainable method. Call .list() to execute.

Parameters

ParamTypeRequiredDescription
querystringYesSearch query string

Returns

ProductsQueryBuilder (chainable)

Examples

const { items } = await shoppy.products.search('cotton shirt').list()

With limit

const { items } = await shoppy.products.search('blue').limit(20).list()

With field selection

const { items } = await shoppy.products
    .search('summer dress')
    .limit(10)
    .select(['title', 'handle', 'priceRange', 'featuredImage'])
    .list()

Search within collection

const { items } = await shoppy.products
    .collection('womens')
    .search('dress')
    .limit(12)
    .list()