Welcome to the Airtable Community! If you're new here, check out our Getting Started area to get the most out of your community experience.

Airtable.js always returns all results even if pageSize is used

Topic Labels: API
531 1
Showing results for 
Search instead for 
Did you mean: 

Hi, I am trying to use a pagination in my code, but the airtable.js client always returns all results even if pageSize is used. Moreover, if I use pageSize it will query the data from airtable database one page at a time until it reads them all. How to stop this?

I have intercepted the outgoing requests and these are the urls the client calls


my code:

  async list<T extends TableNames>(baseId: AirtableBaseId, table: T, queryParams?: QueryParams<Tables[T]>): Promise<MetaTable<Tables[T]>[]> {
    return this.airtable
      .select(queryParams) // <- { maxRecords: 5, pageSize:2 }
      .then((r) => { console.debug('r', r); return r })

console.debug prints 5 results.

// Edit, I tried it with


But it only ever returns the first page without the metadata, such as offset. How do I get the same response I get by calling the endpoint directly from Postman?

1 Reply 1

Are there any examples implenting pagination in jS?