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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
ioniPeis
Regular Visitor

API pagination next_page parameter

Hello, I need to iterate using the next_page parameter to be able to fecth all the api records joining each page in a single final table. In each call I can fecth 1000 records and I have no way of knowing in advance how many pages there are or how many records there are.
Any help will be very valuable.
Thanks in advance.

 

https://WEB/api/3/API_KEY/contact?page=1

Captura de Pantalla 2021-05-16 a la(s) 11.39.56.png

3 REPLIES 3
mahoneypat
Microsoft Employee
Microsoft Employee

Please see this video with a walkthrough of one way to do this.

Power BI - Tales From The Front - REST APIs - YouTube

 

Pat

 





Did I answer your question? Mark my post as a solution! Kudos are also appreciated!

To learn more about Power BI, follow me on Twitter or subscribe on YouTube.


@mahoneypa HoosierBI on YouTube


Hi Pat, Thanks, I just saw the video, it is a good resource but it is not my case as I do not have the total_count parameter. If I had it, I could generate a list of number from 1 to (total_count / 1000) to know how many pages I need to have all the records, but it is not possible.

 

Jon

selimovd
Super User
Super User

Hey @ioniPeis ,

 

check the following articles, they describe exactly your scenario:

Loop through Multiple Web Pages using Power Query - Adatis

Iterating over an unknown number of pages in Power Query - avoid endless loops - Power BI (powerbi-p...

 

If you need any help please let me know.
If I answered your question I would be happy if you could mark my post as a solution ✔️ and give it a thumbs up 👍
 
Best regards
Denis
 

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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