Pagination
List endpoints return results in pages of 50. Use the page parameter to move through them and the meta object to know when to stop.
Samples use the small get() helper from Build a live score app.
How pages work
List endpoints return up to 50 results per page. Pass page to choose a page; the default is 1. Every paginated response includes a meta object:
{ "data": [ … 50 fixtures … ], "meta": { "page": 2, "per_page": 50, "total": 380 }}meta.page— the page you received.meta.per_page— results per page (50).meta.total— results across all pages.
The number of pages is ceil(total / per_page), and you have reached the last page when page × per_page ≥ total.
const { data, meta } = await get("/football/fixtures", { league_id: 39, season: 2026, page: 2 });const pageCount = Math.ceil(meta.total / meta.per_page); // 380 / 50 → 8 pagesFetching every page
Wrap the loop in a generator so the rest of your code can treat a paginated list as one stream of results:
async function* pages(path, params = {}) { for (let page = 1; ; page++) { const { data, meta } = await get(path, { ...params, page }); yield* data; if (page * meta.per_page >= meta.total) return; }}// Usage: every fixture of the season, one page at a timefor await (const fixture of pages("/football/fixtures", { league_id: 39, season: 2026 })) { console.log(fixture.id, fixture.home.name, "v", fixture.away.name);}Which endpoints paginate
Every endpoint with a page parameter:
| Sport | Endpoints |
|---|---|
| Football | /football/leagues, /football/fixtures, /football/fixtures/live, /football/teams, /football/players |
| Basketball | /basketball/games, /basketball/livescores, /basketball/teams |
| Tennis | /tennis/matches, /tennis/livescores, /tennis/rankings, /tennis/players |
| Cricket | /cricket/matches, /cricket/livescores, /cricket/teams |
| Baseball | /baseball/games, /baseball/livescores, /baseball/players |
| Hockey | /hockey/games, /hockey/livescores, /hockey/players |
| American Football | /american-football/games, /american-football/livescores, /american-football/play-by-play, /american-football/teams |
| Motorsport | /motorsport/races, /motorsport/drivers |
| Rugby | /rugby/fixtures, /rugby/livescores, /rugby/teams |
| Volleyball | /volleyball/fixtures, /volleyball/livescores, /volleyball/teams |
| Handball | /handball/fixtures, /handball/livescores, /handball/teams |
The rest return a complete result in one response: /football/standings, /basketball/boxscores, /basketball/standings, /cricket/scorecards, /baseball/standings, /hockey/standings, /american-football/standings, /motorsport/races/results, /motorsport/live-timing, /motorsport/standings, /rugby/standings, /volleyball/standings, /handball/standings.
Tips
- Read
per_pagefrommetainstead of hard-coding 50. - Filter first.
date,team_idorstatuscan turn eight pages into one. - Fetch pages one after another. Firing them all at once can hit your per-minute rate limit.
- Each page costs one request — include them when you budget a sync.
- Lists can change while you read them, especially on match days. Upsert by
idso a fixture that moves between pages is never stored twice.