Pagination Help

Describe the problem/error/question

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.
  • n8n EXECUTIONS_PROCESS setting (default: own, main): ??
  • Running n8n via n8n cloud

It looks like your topic is missing some important information. Could you provide the following if applicable.

  • n8n version:
  • Database (default: SQLite):
  • n8n EXECUTIONS_PROCESS setting (default: own, main):
  • Running n8n via (Docker, npm, n8n cloud, desktop app):
  • Operating system:

Hi @PastafarianPirate

Thanks for posting here and welcome to the community! :tada:

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

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.