Skip to main content
shoppy.products.list()
Executes the query and returns multiple products.

Returns

ProductsResult
{
  items: ShopifyProduct[];
  pageInfo: ShopifyPageInfo;
}

Examples

Basic

const { items, pageInfo } = await shoppy.products.list()

With options

const { items } = await shoppy.products
    .limit(20)
    .select(['title', 'handle', 'priceRange'])
    .list()

From collection

const { items } = await shoppy.products
    .collection('new-arrivals')
    .limit(8)
    .list()
const { items } = await shoppy.products.search('blue shirt').limit(10).list()

Full chain

const { items, pageInfo } = await shoppy.products
    .collection('sale')
    .search('cotton')
    .limit(12)
    .select([
        'title',
        'handle',
        'priceRange',
        'featuredImage',
        'availableForSale'
    ])
    .list()