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

Rest api with offset & limit loop script

Hi All,

 

I have searched a lot on the internet and tried a lot, but I cannot find how to solve this now.

So i hope one of you can help me with the following problem.

 

I want to get the data from the following REST API https://developer.simplicate.com/explore
but when I get the data I only get 100 rows.

 

I have seen that you can use the limit and offset function here and that you can still use count and total count in the metadata.
I can't get more rows through the loop than the 100.

Who could help me with a script where he can download all rows for, for example: get /crm/organization

 

 

Thanks in advance for your knowledge and help,

Jerremans

2 REPLIES 2
v-lid-msft
Community Support
Community Support

Hi @Anonymous ,


How about the result after you follow the suggestions mentioned in my original post?Could you please provide more details about it If it doesn't meet your requirement?

 

Best regards,

Community Support Team _ Dong Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Community Support Team _ Dong Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
v-lid-msft
Community Support
Community Support

Hi @Anonymous ,

 

Here is a very similar thread you can refer to: https://community.powerbi.com/t5/Desktop/Trouble-with-Pagnation-for-Airtable/m-p/813722#M391214

 

let Simplicate = 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("http://developer.simplicate.com/api/v2/crm/organization")) else Json.Document(Web.Contents("http://developer.simplicate.com/api/v2/crm/organization?offset="&Last_Key)), // retrieve results per call
    		       Counter = [Counter]+1// internal counter
                      ],
   		each [WebCall]
    ),1)

Best regards,

Community Support Team _ Dong Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Community Support Team _ Dong Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

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.