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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
kevinEGE
Regular Visitor

How to deal with paginated API

I enabled the API for some tables in Bubble, but it returns a paginated API. The API uses the 'Cursor' parameter to delimit the start of the data and each page contains 100 data items. There is no parameter to effectively change the page, so when Cursor=0, for example, the result will be an API with data from 0 to 99 (100 data items). I would like to know how to configure Power Query to first retrieve all data from the table and then create an incremental model for this same table, as all tables have unique ID and date fields.

1 ACCEPTED SOLUTION
BA_Pete
Super User
Super User

Hi @kevinEGE ,

 

Find the total number of records available from the endpoint. It's usually the highest-level return from the endpoint and should look something like this:

 

BA_Pete_2-1683293035387.png

 

Once you have that, then you can build a list of numbers split by your page limit (100 in your case), something like this:

BA_Pete_3-1683293074883.png

 

Convert this list to a table, then add a new custom column, something like this:

Table.AddColumn(
    previousStepName,
    "newColumnName",
    each Json.Document(
        Web.Contents(
            "https://api.root.com/",
            [
                RelativePath="relative/path.api",
                Query=
                [
                    api_key=apiKey,
                    _start=Text.From([youNumberListColumnName]),
                    _limit="100"    // if required
                ]
            ]
        )
    )
)

 

Once you have your column filled with nested records you can expand it and start drilling down to your actual data:

 

BA_Pete_4-1683293434086.png

 

 

Pete



Now accepting Kudos! If my post helped you, why not give it a thumbs-up?

Proud to be a Datanaut!




View solution in original post

1 REPLY 1
BA_Pete
Super User
Super User

Hi @kevinEGE ,

 

Find the total number of records available from the endpoint. It's usually the highest-level return from the endpoint and should look something like this:

 

BA_Pete_2-1683293035387.png

 

Once you have that, then you can build a list of numbers split by your page limit (100 in your case), something like this:

BA_Pete_3-1683293074883.png

 

Convert this list to a table, then add a new custom column, something like this:

Table.AddColumn(
    previousStepName,
    "newColumnName",
    each Json.Document(
        Web.Contents(
            "https://api.root.com/",
            [
                RelativePath="relative/path.api",
                Query=
                [
                    api_key=apiKey,
                    _start=Text.From([youNumberListColumnName]),
                    _limit="100"    // if required
                ]
            ]
        )
    )
)

 

Once you have your column filled with nested records you can expand it and start drilling down to your actual data:

 

BA_Pete_4-1683293434086.png

 

 

Pete



Now accepting Kudos! If my post helped you, why not give it a thumbs-up?

Proud to be a Datanaut!




Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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 Solution Authors