Guides
Pagination & Large Datasets
The Cineamo API uses cursor-based pagination for endpoints that return large datasets.
🔄 How Pagination Works
When a response contains many items, the API returns them in pages. Each response includes:
- A list of items for the current page
- Metadata about pagination
- Links to navigate between pages
Pagination Parameters
Request Parameters
limit- Number of items per page (default: 25, max: 100)cursor- Cursor token for the next/previous page
Example Request
Code
Pagination Response Format
Code
Response Fields
data- Array of items for the current pagepagination.total- Total number of items across all pagespagination.limit- Number of items per pagepagination.has_more- Whether more pages are availablepagination.next_cursor- Cursor for the next pagepagination.prev_cursor- Cursor for the previous page
Iterating Through Pages
Example: Fetch All Pages
Code
Best Practices
- Use appropriate page sizes - Larger pages reduce requests but increase response time
- Implement rate limiting - Don't fetch too many pages too quickly
- Cache results when appropriate
- Handle pagination errors gracefully
- Use cursors instead of offset-based pagination for consistency
Last modified on

