Pagination not working

Hello,
I’m trying to configure the pagination of a HTTP request.
I have the domain of the api https://riverzshop.ro and the endpoint ‘/api/v2/products&manufacturer_id=x&start=10&limit10’
Everytime I’m calling this api I will receive in the response in meta the next url which will be something like this: “/api/v2/products&manufacturer_id=x&start=20&limit10”
At this moment I tried every possibility but everytime my api will only be https://riverzshop.ro when the pagination is done and is not getting the next path for pagination. Even if it’s the first run of the pagination I will only call ‘https://riverzshop.ro
My workflow is:

At this moment I tried everything but nothing it’s working. I need to run through every page till the ‘next’ field is null and to add every data of the pages in a json.

Can you please help me do it?

Thank you in advance!

Hi Cosmin,

You can try this method in n8n:
Set your initial API URL with a Set node, then use an HTTP Request node to fetch the first batch of data. Next, add a Loop node to control the pagination. After each request, use an IF or Function node to check if the response contains a meta.next field. If it does, the Loop node updates the URL to the next page and continues fetching data. This process repeats automatically until there are no more pages (when meta.next is null), ensuring all records are collected. This way, n8n handles the pagination for you, and you can aggregate all results once the loop completes.