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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

Reply
cccarv82
Frequent Visitor

API search results with random next page

Hi all,
I'm trying to import data from an API where I have a limitation of 25 results per page for the search and when I have a result with more than 25 results I have a column with the "next page" string to do the search.
 
My question is... How can I automate this process? I mean... if I have 100 pages of results, how can I get all the results pages into one table using this random address?
 
PS.: The random part is the string after "&next=". Each page returns a different string.
 
Example: 

/api/v3/search/stories?query=created%3A2021-12-01..*+is%3Astory&page_size=25&next=225357e4865eac91a3eb3008dd60c124885304a1~49

 
In the above example I need to perform another search using the base URL plus this string to get the next page and so on...
1 REPLY 1
lbendlin
Super User
Super User

Read about API pagination. My recommended approach is to use List.Generate to harvest all URLs and then combine their contents in one step.

Helpful resources

Announcements
June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.