If you just want to consume pages of a paginated service, there is a built in feature for that in the HTTP Request node, so you can let n8n handle all that consuming and incrementing stuff. Take a look at this
if you’re referring to the pagination feature inside the node, using {{$response.header}}, I read that using this method will help data handling. Using the pagination feature, this HTTP request always crashed or took forever.
It is possible that consuming all of the content from a paginated source could fill up memory and slow things down I guess.
The problem your loop has is that you are resetting the value of page to 1 every time you reach the setPage Variable node again.
I thought it would be generally useful to have an example of how to set up a loop like this, so instead of posting it as an answer here, I made a Tips & Tricks post at: Incrementing Your Own Loop Variable
Take a look and see if that helps you get things working.
but I run into the same problem. The “page” parameter in the API request is referencing a fixed value. I can’t reference the incremental page value because it won’t be generated until the first API call
The example workflow in Incrementing Your Own Loop Variable works. Just to be sure, I (locally) added an ‘HTTP Request’ node in the middle that calls this dummy “echo” endpoint URL: https://httpbin.org/anything?page={{ $('Increment Loop Var').first().json.page }} (expression, not fixed value), and that works as expected. I suspect you might still not be doing things the same way. Did you copy the example into a new workflow in your environment and test it? Maybe that would help you examine exactly what’s happening.