How to handle API pagination effectively on Make
Handle API pagination in Make by using Iterator modules with HTTP requests in loops, tracking pagination parameters like page numbers or cursors, and implementing proper termination conditions. Configure bundle settings and use aggregators to collect all paginated results into a single dataset.
Prerequisites
- Basic understanding of Make.com scenarios
- Knowledge of HTTP modules and API endpoints
- Experience with JSON data handling
- Understanding of iteration and loops in Make
Step-by-Step Instructions
Set up the initial HTTP request module
?page=1&limit=100. In the Headers section, add your authentication headers. Set the Parse response option to Yes to automatically handle JSON responses.Create variables to track pagination state
currentPage (set to 1), hasMoreData (set to true), and allResults (set to empty array []). These variables will track your pagination progress throughout the scenario execution.Configure the repeater module for pagination loop
{{your-endpoint}}?page={{1.i}}&limit=100.Add pagination logic with filters
{{length(2.data)}} > 0 (assuming 'data' is your results array). On the second route, add a filter for {{length(2.data)}} = 0 to handle the end condition. This will control when to continue or stop pagination.Process and store paginated results
{{2.data}}. Follow this with your data processing modules (filters, transformations, etc.). Use an Array Aggregator module to collect processed results, setting the Source Module to your iterator and Target structure type to Custom.Handle different pagination styles
{{2.next_cursor}} in subsequent requests. For offset-based pagination, calculate offset as {{(1.i - 1) * 100}}. For link-based pagination, extract the next URL from response headers using {{2.headers.Link}} and parse it appropriately.Implement proper error handling and limits
Optimize and finalize the pagination flow
Common Issues & Troubleshooting
Infinite loops consuming all operations
Set a reasonable Repeats limit in your Repeater module and add proper termination conditions. Use Flow Control > Break modules to exit loops when no more data is available.
API rate limiting errors (429 status)
Add Tools > Sleep modules between requests with 1-2 second delays. Implement exponential backoff in error handlers and reduce your request frequency or batch sizes.
Missing data between pagination requests
Check that your pagination parameters are correctly incrementing. Verify the API's pagination method (page-based vs cursor-based) and ensure you're using the correct approach for that specific API.
Memory or timeout issues with large datasets
Process data in smaller chunks by reducing your limit parameter. Use Data Store modules to persist intermediate results and break large pagination jobs into multiple scenario runs.