Two budgets
Every API key works within two separate budgets.
The numbers depend on your plan. Some plans have no monthly cap. See pricing.
- Trials are metered at 10% of the plan’s limits.
- Every request counts once your key is accepted, including requests that return an error such as
400or404. GET /healthneeds no key and doesn’t count.
Read the headers
Every authenticated response, success or error, includes these headers:
To see them, add
-i to any request:
When you hit a limit
Both limits return429 with a Retry-After header. Check the error code to know which one you hit.
Retry with backoff
This wrapper retriesRATE_LIMITED after Retry-After seconds and gives up straight away on USAGE_LIMIT_EXCEEDED.
Use fewer requests
- Call the API from your server and cache the responses. One cached response can serve all your users. Calling from the browser also exposes your key.
- Cache slow-changing data for longer, such as competitions, seasons and finished matches.
- Poll live endpoints only while a match is live, and stop at full time. The API has no webhooks or push updates, so polling is the only way to get new data.
- Fetch 100 results per page (
per_page=100) and filter on the server with parameters liketeam_id,date_fromanddate_to. See Pagination. - Check availability flags such as
xg_availableandodds_availablebefore calling optional endpoints. See Data model.