Pagination
Overview
Mixedbread API uses cursor-based pagination for endpoints that return large result sets. This approach provides consistent performance regardless of dataset size and ensures reliable pagination even when data is being modified.
Supported Endpoints
Cursor-based pagination is used for:
Pagination Parameters
Request Parameters
Include these query parameters in your requests:
Parameter | Type | Description | Default |
---|---|---|---|
before | string | Cursor for pagination. Returns items before this cursor. | - |
after | string | Cursor for pagination. Returns items after this cursor. | - |
limit | integer | Maximum number of items to return (1-100). | 20 |
Important Notes:
- Use either
before
ORafter
, not both - Cursors are opaque strings - don't parse or modify them
- Always include
limit
to control result size
Response Format
All paginated responses include:
Field | Type | Description |
---|---|---|
data | array | The actual results for the current page |
first_cursor | string | Cursor pointing to the first item in current page |
last_cursor | string | Cursor pointing to the last item in current page |
has_more | boolean | Whether more results are available |
Navigation Patterns
Forward Pagination
Start with no cursor to get the first page:
Continue with last_cursor
from the previous response:
Backward Pagination
Use first_cursor
with before
parameter:
Related Topics
- Rate Limiting: Understand request limits during pagination
- Error Handling: Handle pagination errors gracefully
- Vector Stores API: Vector store-specific pagination examples
Rate Limiting
Documentation on API rate limits with tier-based quotas. Learn about request limits, how to handle rate limiting responses, and strategies for optimizing your API usage.
Error Handling
Documentation on error handling with the Mixedbread API. Learn about common status codes, how to handle them, and best practices for error handling.
Last updated: July 12, 2025