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

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 Like

Are there any examples implenting pagination in jS?

This topic was solved and automatically closed 15 days after the last reply. New replies are no longer allowed.