Overview
List endpoints in the InstaView API support pagination to handle large datasets efficiently. Understanding pagination helps you retrieve data optimally without hitting rate limits or performance issues.Pagination Parameters
All list endpoints accept these query parameters:Page number to retrieve (1-indexed)
Number of items per page (max: 100)
Example Request
Response Format
Paginated responses include metadata about the result set:Pagination Metadata
Total number of items across all pages
Current page number
Items per page
Total number of pages
Whether there are more pages after this one
Whether there are pages before this one
Pagination Strategies
Sequential Pagination
Iterate through pages sequentially:Rate-Limited Pagination
Add delays between requests to avoid rate limits:Parallel Pagination
Fetch multiple pages concurrently (if you know the total):Generator-Based Pagination
Use generators for memory-efficient iteration:Filtering with Pagination
Combine filters with pagination:Complex Filtering
Optimizing Page Size
Choose appropriate page sizes:- Small Pages (10-20)
- Medium Pages (50-100)
- Large Pages (100 max)
Use When:
- Displaying in UI with client-side pagination
- Network is slow or unreliable
- Processing items individually
- Faster initial response
- Less memory usage
- Better for mobile clients
- More API calls required
- Higher overhead for large datasets
Dynamic Page Sizing
Adjust page size based on response time:Caching Paginated Results
Cache pages to reduce API calls:Progress Tracking
Show progress for long-running pagination:Best Practices
Use Maximum Page Size for Bulk Operations
Use Maximum Page Size for Bulk Operations
Handle Empty Results
Handle Empty Results
Validate Page Numbers
Validate Page Numbers
Implement Retry Logic
Implement Retry Logic
Consider Memory Constraints
Consider Memory Constraints
Troubleshooting
Page Beyond Total Pages
Page Beyond Total Pages
Invalid Limit Value
Invalid Limit Value
Next Steps
Rate Limiting
Avoid rate limits during pagination
Best Practices
Production-ready patterns
Error Handling
Handle pagination errors
API Reference
See all paginated endpoints