Help

missing data when called from api

2276 6
cancel
Showing results for 
Search instead for 
Did you mean: 
sunilpanda992
4 - Data Explorer
4 - Data Explorer

i have a airtable with links its 110 in number in airtable but when i use api to access those links i am getting only 100. rest 10 are missing when i use the api  What might be the reason i have provided two pics one of data table and one is my code .

6 Replies 6
sunilpanda992
4 - Data Explorer
4 - Data Explorer

any help  please ?

 

AlliAlosa
10 - Mercury
10 - Mercury

Getting a list of records using the API will return a max of 100 records per call. You have to use the returned offset value to paginate through the rest of the results.

sunilpanda992
4 - Data Explorer
4 - Data Explorer

 hello,  thank you how can i do it ? Can you give me an example or reference to follow

AlliAlosa
10 - Mercury
10 - Mercury

Everyone does it a bit differently, but I would suggest writing a function with a “while” loop that runs until there is no offset value returned. Each iteration calls the api with an endpoint including the offset from the previous call, and pushes the results into an array. That array should be defined before you enter the loop.

I am on my phone but later I can share some sample JavaScript I wrote to do exactly this (not sure what language you need, but it should get you pretty close).

You could also try checking out stackoverflow for examples of code - search something like “loop through paginated api results”.

  • Screenshot from 2024-04-28 11-12-12.png
sunilpanda992
4 - Data Explorer
4 - Data Explorer

Basically my data is like this i am grabbing the record as dict key, as i am using python, the looping to get deal link .  as i am grabbing the whole record  shouldn't it have all the data from the table , my code is in top opening post