success / data / meta / traceId — only the business structure inside data varies by endpoint. This means you can build a single unified response-parsing layer on the client, rather than writing separate handling logic for each endpoint.
Success response
The shape of data depends on the endpoint type
- List endpoints (e.g.
/countries,/matches,/players):datais an array, wrapped in an array even when there’s only one result. - Detail endpoints (e.g.
/matches/{match_id}/situation,/lineups):datais a single object.
data, refer to that endpoint’s own documentation page; this page only defines the common structure of the outer envelope.
How pagination fields work
For endpoints that support pagination,meta includes page (the current page number, starting from 1), limit (the maximum number of items per page), and total_pages (the total number of pages, calculated from total and limit). Paging logic is straightforward:
page exceeds total_pages, data returns an empty array rather than an error, allowing the client to determine whether it has reached the last page.
Error response
When a request fails,success is false, and the business data field is replaced with an error object:
For the HTTP status and trigger scenario corresponding to each error code, see Error Codes.