I have 2 sets of modules that call an api to get data.
“Get Company Pages” calls the api and get the total pages and page number. “Get Companies” then calls the same api and paginates through to get all the data.
“Get Subscription Pages” calls the subscriptions endpoint and get the total pages and page number.
“HTTP Request” then calls the same api and paginates through to get all the data. However, it fails with “The returned response was identical 5x, so requests got stopped”
I know i missed something but??
Information on your n8n setup
n8n version:1.72.1
Database (default: SQLite): whatever the hosted version uses.
Thanks for posting here and welcome to the community!
There’s two ways you can do pagination with the HTTP node. Either if the response contains pages or a next URL variable.
In your case you wanna use pages and for this you will need to update the page to fetch for each run. So use the option below:
Then for your query you only need to set the page variable and you can use the built-in n8n variable $pageCount to update the page number dynamically.
See here:
Btw, we recommend to use predefined credentials instead of putting them in the header parameters of the node.
Have a look in our docs - HTTP Request credentials | n8n Docs