Is There Any Solutions For Creating 20000+ Products With Shopify API Efficiently

- 1 answer

I found that we just can create a new product with only one shopify api call.If I want to add 20000 plus products on shopify, it will send 20000 plus shopify api request.It's really taken so much time.Should I do it with jobs or instead of it how could I complete this task efficiently?



Adding one product per API call does not mean that you have to wait for the response of each call. As each Product Add request is independent of other requests, you can issue multiple simultaneous requests for Adding products. Doing so you may run in to

HTTP 429 Too Many Requests error

because of Shopify rate limiting. Shopify offers a request bucket size of 40 for general plans and 80 for Shopify Plus plans. Moreover, every response has a call limit header like

X-Shopify-Shop-Api-Call-Limit: 32/40

Further details can be found at Shopify Documentation for REST Admin API rate limits

You can use some Laravel specific Shopify package to make API calls easier and more consistent. API Rate Limit handling would be a plus. As an example have a look at Laravel Shopify but it does not support rate limiting.

For the setup, you can use Laravel Queues to push Products data and then use


numprocs property to configure multiple queue:work processes that genereate concurrent Add Product requests.

Another approach besides API is to generate CSV files as defined in Importing products with a CSV file. However, the maximum file size limit for 1 file is 15 MB.