Help

Fetch API data into airtable until every data point is retrieved usng offsets and limit

Solved
Jump to Solution
663 1
cancel
Showing results for 
Search instead for 
Did you mean: 
seidumohammed64
5 - Automation Enthusiast
5 - Automation Enthusiast

Please any guide on this? 

I am  trying to fetch all the data from the products endpoint of an API using a limit of max 500 data point per fetch and an offset that increment per every fetch

So if the offset is 0, and the fetching max limit of 500 the next offset = 500, 1000, 1500 in that order.

I already have to script fetching the data at max of 500 but I have to always manually set the offsets which is time consuming so I want this to be automated in code. 

If I can get a sample code that does similar I will be glad

 

1 Solution

Accepted Solutions
seidumohammed64
5 - Automation Enthusiast
5 - Automation Enthusiast

After a couple of try and errors I have managed to get this working. The script runs until all the products from the API are populated in my airtable base. I achieved this with a while loop

See Solution in Thread

1 Reply 1
seidumohammed64
5 - Automation Enthusiast
5 - Automation Enthusiast

After a couple of try and errors I have managed to get this working. The script runs until all the products from the API are populated in my airtable base. I achieved this with a while loop