Pagination
Most list endpoints in the Betflow B2B API return paginated results.
Request Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
page | integer | 1 | Page number (1-indexed) |
page_size | integer | 20 | Number of results per page |
Some endpoints use these parameters in the query string (GET requests) and others in the request body (POST requests). Check the API Reference for each endpoint's specifics.
Response Format
Paginated responses follow this structure:
{
"results": [
{ "id": 1, "name": "Basketball" },
{ "id": 2, "name": "Football" }
],
"total_count": 45,
"page": 1,
"page_size": 20,
"total_pages": 3
}
| Field | Description |
|---|---|
results | Array of items for the current page |
total_count | Total number of items across all pages |
page | Current page number |
page_size | Number of items per page |
total_pages | Total number of pages |
Example
Fetch the second page of NBA teams:
curl "https://api.odditt.com/v1/references/teams?league_key=nba&page=2&page_size=10" \
-H "X-API-Key: YOUR_API_KEY"
Tips
- Start with page 1 — pages are 1-indexed.
- Use reasonable page sizes — most endpoints default to 20, with a maximum of 100.
- Check
total_pages— stop paginating whenpage >= total_pages.