Help

Upcoming database upgrades. Airtable functionality will be reduced for ~15 minutes at 06:00 UTC on Feb. 4 / 10:00 pm PT on Feb. 3. Learn more here

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

Solved
Jump to Solution
136 1
cancel
Showing results for 
Search instead for 
Did you mean: 

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

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

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