API-Football API
Comprehensive football data — leagues, fixtures, live scores and stats.
What it does
API-Football (by API-Sports) covers 1,100+ soccer leagues and cups worldwide: fixtures with live scores and events, line-ups, statistics, standings, top scorers, head-to-head, transfers, injuries, predictions and odds.
Base URL
Authentication
Sign up at api-sports.io for a key and send it as the x-apisports-key header (direct). The same API is also sold through RapidAPI, where you use RapidAPI’s headers instead.
Code examples
curl -s "https://v3.football.api-sports.io/fixtures?date=2026-01-15" \ -H "x-apisports-key: $APIFOOTBALL_KEY"
import requests
r = requests.get("https://v3.football.api-sports.io/standings",
params={"league": 39, "season": 2025},
headers={"x-apisports-key": KEY}, timeout=10)
body = r.json()
if body["errors"]:
raise SystemExit(body["errors"])
for row in body["response"][0]["league"]["standings"][0][:5]:
print(row["rank"], row["team"]["name"], row["points"])Rate limits & quotas
Free plan: 100 requests/day and roughly 10 requests/minute. Every response has a results count, a paging object, and an errors field that is populated (with HTTP 200) when something is wrong — check it. Headers report your remaining daily quota.
Key response fields
| response[] | The data array (shape depends on endpoint) |
| errors | Object/array of problems — non-empty means the call failed despite HTTP 200 |
| results / paging.current / paging.total | Result count and pagination |
| (fixtures) response[].fixture.status.short / goals | Match state (NS, 1H, FT…) and score |
| (standings) response[0].league.standings[][] | Nested: group → ranked rows |
Common errors
| 200 + errors populated | Missing/invalid key (errors.token), bad params, or plan limit — read errors. |
| 429 | Per-minute rate exceeded. |
| (daily quota) | After 100 calls, responses carry a rate-limit error until the next day. |
When to use it (and alternatives)
The most complete free-tier soccer API — if 100 calls/day is enough (cache hard). Its sibling APIs (api-basketball, api-nba, api-hockey, api-baseball) share the same design. For multi-sport breadth with imagery, TheSportsDB; for top-league focus with a simpler model, football-data.org.
FAQ
Why is my request ‘successful’ but empty?
Check the errors field — API-Football returns HTTP 200 even for auth failures, bad parameters and quota limits. An empty response with a populated errors is a failure.
Direct or via RapidAPI?
Direct (v3.football.api-sports.io + x-apisports-key) is simplest. RapidAPI wraps the same API with its own auth and billing — use it only if you already manage APIs there.
How do I not blow through 100 calls/day?
Cache standings and fixtures for hours, request a whole day’s fixtures in one call rather than per match, and avoid polling live endpoints on the free tier.
New to APIs?
Short guides for working with this API — and any other.