AirTable Pagination in API Explorer

This might be common for those who know code - but for those that are new to API explorer (like me), I thought I’d post a small thing about AirTable:

AirTable’s max results it will pull is 100 records. If you have a spreadsheet with 500 records for example, you’ll need to call the “offset” parameter.

When you pull your feed into API Explorer, you’ll notice an “offset” field near the bottom. Add a new parameter in API explorer called “offset” (without quotes) and set that long string of numbers/letters as the value. It will pull the NEXT page of 100 records. You’ll notice that the offset at the bottom has changed to a new string of letter/numbers. Set that as the new value of offset, it will pull the NEXT page, and so on.

So you can create a next page button which sets these offset values into your offset parameter of API Explorer. One thing that I’ve noticed is that these offsets letters and numbers tend to change, so it may not work properly if you simply store them. You’ll need to use binding to always set the current and correct value.

Now, setting a ‘previous’ page of records might be a bit different. Feel free to post here to help others if you already have a good method.

Hi @AlexB,

Thanks for your post.

Indeed Airtable uses what we call ‘index’ based pagination. The long string of numbers/letters is actually the identifier of a particular item. When you send a request with the “offset” parameter set with that identifier you actually ask the server to send you the result starting of the item corresponding to that particular identifier.
That’s why the id needs to change from one request to the other if you want to get the full list of result.

For now, the only way to manage the ‘index’ based pagination is indeed to manually recall the request by changing the identifier of the index (through an IntuiFace’s trigger and action mechanism).

One enhancement we have on our roadmap, is that IntuiFace Players manage automatically this kind of pagination based on the parameters provided by API Explorer (like we already did for instance for the page based pagination).

Alban

2 Likes

Great, thanks very much for your input. Always looking forward to new developments!!