Api response max limit?

PaulSimpson
New Member
2 0 0

Hi All,

I'm developing an app that needs to import all products and orders from stores. I have a user who has about 4000 products in their store, but when I call via the /admin/products.json URL only 48 are returned. The limit property on the request has a default of 50, so confusing that 2 are missing, and a maximum of 250. How do I get all 4000? Is it possible in one request? Or do I need to do several - in which case, for the subsequent requests how do I know where to start from?

Thanks for your help!

Paul

0 Likes
FueledByPizza
Shopify Partner
23 0 6

Hello Paul,

You would need to make 16 requests to the api in order to get all products. (4000 / 250 = 16)

You can use 

GET /admin/products.json?limit=250?page=1

Then just change the page number in a loop for example.

Hope that helps with your problem. 

- Paul

- Paul G | Lead Developer @ FueledByPizza
mhraihan
Shopify Partner
29 0 1
GET /admin/products.json?limit=250&page=1

where page paramater is used for pagination.
danbrow
New Member
1 0 1

Hi, I am facing the same problem. I can`t load more than 250 rows.

The requests for product don't work like this. It works for orders like this but not for the product. Have you made a workaround on it?

Alok_Kasgar1
Shopify Partner
3 0 0

Specifically, you're using ?limit=250?page=2 instead of ?limit=250&page=2 this would cause the page param to be ignored.

0 Likes
IT_Admin1
New Member
2 0 0

is there any solution for this

0 Likes
IT_Admin1
New Member
2 0 0

have you got any solution for this

0 Likes
bredowmax
Explorer
54 1 66

Is this still possible with API version 2020-07? It seems like page=1 does not work anymore - I've only seen page_id

Brian123
New Member
1 0 0

Same here! 2020-07 does'nt support page=2

Please explain!

0 Likes
Jason
Shopify Expert
10039 119 1876

Perhaps this link will help for those looking to use paginated requests:
https://shopify.dev/tutorials/make-paginated-requests-to-rest-admin-api

★ Winning Partner of the Build a Business competition. ★ http://freakdesign.com.au
0 Likes