Loop as long as needed - 3rd party API is a bit vague

I have a 3rd API, where I can loop to pull records by 100 max(“skip 100, take 100”). Unfortunately this API doesn’t tell me the amount of records in total. Therefore I need to pull until a response has less than 100 results.

The loop action needs to know how many iterations are needed beforehand.

Probably I need to loop within a script element, to achieve what I need?
Is there a smarter way to do it?