Help

Re: Pagination returns 422 error

1416 0
cancel
Showing results for 
Search instead for 
Did you mean: 
Nicholas_Turban
4 - Data Explorer
4 - Data Explorer

Hey,

What exactly does the pagination related API error LIST_RECORDS_ITERATOR_NOT_AVAILABLE mean?

The API docs say

Iteration may timeout due to client inactivity or server restarts. In that case, the client will receive a 422 response with error message LIST_RECORDS_ITERATOR_NOT_AVAILABLE . It may then restart iteration from the beginning.

What does that mean? How am I supposed to deal with that?

The first “page” ie. the first 100 records are always correctly returned, but the next “page” fails randomly; sometimes it works, the next minute it doesn’t.

This is extremely frustrating and a major issue for our use case at the moment. Any help is appreciated.

4 Replies 4
chanmar
4 - Data Explorer
4 - Data Explorer

@Nicholas_Turbanov did you ever figure this out? We are just starting to use Airtable and the API and have been running into this error. It is indeed frustrating and there is not much documentation on how to handle it.

Nicholas_Turban
4 - Data Explorer
4 - Data Explorer

Yes and no.

The value of “offset” consists of two different concatenated values

foobar/recdxxxyyyzzz

The limiter is the slash. The second value, _ recdxxxyyyzzz_, is the last record returned in the response.
But the first value, _ foobar_, is apparently some token that changes over time. So you can make the same paginated calls for some x amount of time until that value changes.

I did not figure out how often the token changes. Basically you always have to query the first page initially and then the subsequent pages. You can’t really make a query for the nth page directly.

Kinda of a weird choice by Airtable if you ask me.

chanmar
4 - Data Explorer
4 - Data Explorer

Thank you for the response! That sounds a bit strange re: the token change, but definitely good to know. It sounds like if our iterative API calls to pull a full list of records are too slow or take longer than the token change, we’d have to start the iteration over and try again.

Chinara_James
6 - Interface Innovator
6 - Interface Innovator

Hi, I have tutorial on how to do pagination with the api. Check out it and let me know if it helped.

How to paginate records in Airtable when using the API | Chinara James

Airtable’s API is great and so is their documentation. However, I came across a small stumbling block while using it to build a simple project. The problem, Airtable returns a maximum of 100 records…