Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
Lina_B
Regular Visitor

Issue with pagination for airtable (no records)

Hello,

 

I tried to apply the pagination formula to obtain more than 100 records from airtable in the power query. Unfortunately, the pagination does not work and I have no more records (I have the names of all the columns but no records (1 record = null). I tried several times with the different formulas found in the forum, but it finds no records. 

 

The formula I used in the Advanced Editor, using my Table, App and Key ID, is as follows: 

 

 

 

let
    Pagination = List.Skip(List.Generate( () => [Last_Key = "init", Counter=0], // Start Value
           each  [Last_Key] <> null, // Condition under which the next execution will happen
           each [ Last_Key = try if [Counter]<1 then "" else [WebCall][Value][offset] otherwise null,// determine the LastKey for the next execution
                       WebCall = try if [Counter]<1 then Json.Document(Web.Contents("https://api.airtable.com/v0/[APP_ID]/[TABLE_ID]", [Headers=[Authorization="Bearer [KEY_ID]"]]))
                        else Json.Document(Web.Contents("https://api.airtable.com/v0/[APP_ID]/[TABLE_ID]?offset="&[WebCall][Value][offset])), // retrieve results per call
                   Counter = [Counter]+1// internal counter
                      ],
           each [WebCall]
    ),1),
 
    #"Converted to Table" = Table.FromList(Pagination, Splitter.SplitByNothing(), null, null, ExtraValues.Error),
in
#"Converted to Table"
 
 
 
Thank you for your help!
1 REPLY 1
PhilipTreacy
Super User
Super User

hi @Lina_B 

I'm a little unclear on the results you are getting.  You say you have no more records, and you have the names of all the columns but no records, yet you say you have 1 record = null?

Maybe if you shared an image of your actual results it would be clearer to me.

Using your code below to connect to my own Airtable account I successfully retrieve data.

Have you tried confirming that your API call below is actually returning data?  You can issue a request directly in your browser like this

 

 

https://api.airtable.com/v0/BASE_ID/TABLE_ID?api_key=keyXXXXXXXXXX

 

 

 Phil


If I answered your question please mark my post as the solution.
If my answer helped solve your problem, give it a kudos by clicking on the Thumbs Up.



Did I answer your question? Then please mark my post as the solution.
If I helped you, click on the Thumbs Up to give Kudos.


Blog :: YouTube Channel :: Connect on Linkedin


Proud to be a Super User!


Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Kudoed Authors