Pagination

Starting in API version 2019-07 Shopify only support relative pagination. You can fetch the next set of data using nextPageParameters

For example, let's say you want to fetch multiple pages of products, you can do the following. Note that the maximum limit per retrieval call is 250 items.

(async () => {
  let params = { limit: 10 };

  do {
    const products = await shopify.product.list(params);

    console.log(products);

    params = products.nextPageParameters;
  } while (params !== undefined);
})().catch(console.error);

Last updated