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
Anonymous
Not applicable

Getting the next pages of a JSON API

Hi,

 

I'm trying to get data into PowerBI through an API. I chose "web" and connected the data like this:

 

= Web.Contents("myurl")

 

The data is loading to such format:

next(URL)?pageSize=5&currentPage=2
self(URL)?pageSize=5&currentPage=1
events[List]
statistics[Record]

 

I can only change the max page size to 2000, but I have way more records. Is there a way to load every page of the data?

I tried to find an answer, read many blog posts, for example from Chris Webb or this one https://medium.com/@marktiedemann/how-to-do-pagination-in-power-query-430460c17c78, but none of it seems to work (or I'm simply not able to apply it correctly)... any hints? 🙂

3 REPLIES 3
Icey
Community Support
Community Support

Hi @Anonymous ,

 

Are the replies above helpful?

 

If they are, please always accept the replies making sense as solution to your question so that people who may have the same question can get the solution directly.

 

If not, please give us more details.

 

 

Best Regards,

Icey

Greg_Deckler
Community Champion
Community Champion

@ImkeF @edhans 



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

Hi @Anonymous ,

you can find a couple of approaches here: https://community.powerbi.com/t5/Desktop/how-to-create-a-query-that-paginates/td-p/20047

 

Please try some of them out. If they don't work, please post what you've tried so far with corresponding error messages to that we can narrow it down further.

 

Imke Feldmann (The BIccountant)

If you liked my solution, please give it a thumbs up. And if I did answer your question, please mark this post as a solution. Thanks!

How to integrate M-code into your solution -- How to get your questions answered quickly -- How to provide sample data -- Check out more PBI- learning resources here -- Performance Tipps for M-queries

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.