The returned response was identical 5x, so requests got stopped

My workflow:

I’ve also tried adding the pagina param as a query param, but didn’t work also.

At some point, the node will throw the error The returned response was identical 5x, so requests got stopped. The API that I’m using returns “data”: [ㅤㅤㅤ] when there’s no data in the page:

I had previously written in python using request and it worked:

But I’d like to do the same in n8n. How to make it work?

elif y['data'] == 0

should have been

elif y['data'] == ""

But that doesn’t change our case here lol.

I think it’s solved, used {{ $response.body.data.length === 0 }}. Running more tests to confirm.