Pagination Response Structure
Most paginated endpoints return a pagination object with the following structure:Some endpoints use
meta instead of pagination, and current_page instead of page. Always check the endpoint documentation for the exact response structure.Pagination Patterns
The Catalog API uses three main pagination patterns depending on the endpoint type. Examples for each pattern are shown below:- Python
- JavaScript
Pattern 1: GET Endpoints with Query Parameters
Endpoints:/v1/vendors, /v1/usageUse page and page_size as query parameters. Response includes a pagination object.Pattern 2: POST Endpoints with Body Parameters
Endpoints:/v1/listings, /v1/collectionsInclude page and page_size in the request body. Response includes a meta object (not pagination) with current_page (not page).Pattern 3: Execution Status Endpoints
Endpoints:/v1/products/{execution_id}Use page and limit as query parameters (only when status is "completed"). Response includes a pagination object.For
/v1/products/{execution_id}, the pagination response uses limit instead of page_size.Basic Implementation Example
Here’s a simple example of implementing pagination:Best Practices
Using has_next and has_prev
Thehas_next and has_prev boolean fields make it easy to implement navigation controls:
Page Size Recommendations
Important Notes
Response Structure Variations:
- Different endpoints return data in different fields (
data,listings,collections, etc.) - Some endpoints use
paginationobject, others usemetaobject - Some use
pagein response, others usecurrent_page - Always check the endpoint documentation for the exact response structure
Endpoints Without Pagination:
/v1/agentic-search- Returns up to 8 products, no pagination/v1/agentic-search-mini- Returns up to 10 products, no pagination- List executions endpoints (
/v1/crawl) - Uselimitparameter but don’t return pagination metadata