Which endpoints are paginated
Other endpoints that return lists, such as seasons, squads, standings and timelines, return everything in one response. They don’t accept
page or per_page: sending them returns 400 UNKNOWN_PARAMETER.
Parameters
page and per_page must be positive whole numbers. 0 or a negative number returns 400 BAD_REQUEST.
The meta object
Paginated responses put results in data and page details in meta:
Past the last page
Either way, stop when
page reaches meta.total_pages.
Loop through every page
Ask forper_page=100 so you make fewer requests. Every page counts toward your rate limits.
Default order and sorting
On
/football/matches, matches with the same kickoff time are ordered by match ID, so pages don’t shuffle between requests.
Two common recipes:
Because the default order puts the furthest-away fixtures first, a plain
?team_id=tm_9145&per_page=1 returns a match weeks away, not the next one. Add status and sort as shown above.Next steps
- Fixtures and results: more recipes for filtering and sorting matches.
- Rate limits: every page is one request, so plan your budget.
- Errors: what
PAGE_OUT_OF_RANGEand other codes mean.