Overview
Several Lindo AI API endpoints support cursor-based pagination to help you efficiently browse through large datasets. You can safely navigate lists with guaranteed stability, even if new objects are created or deleted while you’re still requesting pages. Paginated endpoint responses include:data: the list of returned items.has_more: indicates whether there are more elements available.next_cursor: the cursor to use for fetching the next page (only present whenhas_moreis true).
Parameters
All paginated endpoints support the following query parameters:The number of items to return per page. Default is
20, maximum is 100, and minimum is 1.The cursor from which to start retrieving items. Use the
next_cursor value from the previous response to get the next page.Response Format
Paginated endpoints return responses in the following format:An array containing the actual resources for the current page.
Indicates whether there are more items available beyond the current page.
The cursor to use for fetching the next page. Only present when
has_more is true.Example Usage
First Page
Next Page
Code Examples
JavaScript
Python
Best Practices
Use appropriate page sizes
Use appropriate page sizes
Choose a
limit that balances performance and usability. Smaller pages (20-50 items) are good for real-time applications, while larger pages (100 items) work better for bulk processing.Handle pagination gracefully
Handle pagination gracefully
Always check the
has_more field before attempting to fetch additional pages. This prevents unnecessary API calls when you’ve reached the end of the dataset.Consider rate limits
Consider rate limits
Be mindful of API rate limits when paginating through large datasets. Implement appropriate delays between page requests if processing many pages.
Don't store cursors long-term
Don't store cursors long-term
Cursors are designed for immediate pagination use. Don’t store them for later use as they may expire or become invalid.
Error Handling
Pagination requests may return the following validation errors:| Error | Description |
|---|---|
validation_error | Invalid cursor format or limit out of range (1-100) |

