Skip to main content
shoppy.products.limit(count)
Sets the maximum number of products to return.
This is a chainable method. Call .list() to execute.

Parameters

ParamTypeRequiredDefaultDescription
countnumberYes10Max products to return

Returns

ProductsQueryBuilder (chainable)

Examples

Basic

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

With collection

const { items } = await shoppy.products
    .collection('featured')
    .limit(6)
    .list()

Large batch

const { items } = await shoppy.products.limit(100).list()