Solved

How to Paginate or get a list of all products using domain.com/products.json

zilehuda
Tourist
17 0 2

I am not using any admin API but trying to fetch the products of any shop directly using /products.json endpoint.

 

Example: storename.com/products.json
It returns 30 products by default, we can set the limit param but the upper limit of limit param is 250 so it will not return more than 250 products.
Also, no other query param is working here so how can I paginate it or view all the products of any store using /products.json? 

 

Also, there is no "link" in header.

Accepted Solution (1)

Jason
Shopify Expert
11190 225 2283

This is an accepted solution.

The products.json AJAX api endpoint isn't intended to be used as a replacement to the Admin APIs. As such it has limited max products that can be returned and won't support pagination.

If you need to grab all products from a shop look into using the Admin API instead. Once you've got an app made for this it would be simple enough to include it on shops that you have permissions for.

★ I jump on these forums in my free time to help and share some insights. Not looking to be hired, and not looking for work. http://freakdesign.com.au ★

View solution in original post

Reply 1 (1)

Jason
Shopify Expert
11190 225 2283

This is an accepted solution.

The products.json AJAX api endpoint isn't intended to be used as a replacement to the Admin APIs. As such it has limited max products that can be returned and won't support pagination.

If you need to grab all products from a shop look into using the Admin API instead. Once you've got an app made for this it would be simple enough to include it on shops that you have permissions for.

★ I jump on these forums in my free time to help and share some insights. Not looking to be hired, and not looking for work. http://freakdesign.com.au ★