Skip to contentAPILayer: production APIs with free plansExplore APILayer
๐•inr/
Cover illustration: Free Sports Data APIs in 2026: Football, F1, NBA, MLB and More
Favour Onuoha

Posted on ยท Updated on ยท 4 min read

Free Sports Data APIs in 2026: Football, F1, NBA, MLB and More

On this page ยท 7 sections

The short answer: for football (soccer), use football-data.org (12 competitions, 10 calls a minute free) or API-Football (100 requests a day). For Formula 1, use OpenF1 for session data and Jolpica, the community replacement for the retired Ergast API, for results and standings. For a bit of everything, TheSportsDB has a free test key, but note it's now 123, because the old 3 key was permanently disabled.

Sports APIs change a lot, and tutorials lag behind. In our October 2026 checks, three APIs that older guides recommend had changed. Ergast's API is offline. TheSportsDB's widely copied test key returns 403. And balldontlie, listed as keyless in the public-apis README, now returns 401 Unauthorized without a key. Our directory tracks 66 sports and fitness APIs: 58 were online on October 24, 2026, 28 need no key and 35 support CORS.

#Free sports API comparison (October 2026)

API

Sports

Free allowance

Key

Notes

Football-Data (football-data.org)

Football

12 competitions, 10 calls/min

Yes (free)

Scores delayed on free; live scores from โ‚ฌ12/month

API-FOOTBALL

Football (1,000+ leagues)

100 requests/day

Yes (free)

All endpoints; some seasons limited on free

TheSportsDB

Many

Free test key 123

Test key

Teams, players, events, artwork

OpenF1

Formula 1

Free historical data

No

Laps, telemetry, positions, pit stops

Jolpica (Ergast-compatible)

Formula 1

Free

No

Results, standings back to 1950

MLB Records and Stats

Baseball

Free

No

Official MLB Stats API; read its terms

balldontlie

NBA (and more)

5 requests/min (reported)

Yes (free)

Free tier: teams, players, games

Sources: football-data.org's pricing page, plus documentation and third-party summaries for the others, October 2026.

#Football (soccer)

#football-data.org

football-data.org is the developer favourite for the major European leagues. The free tier covers 12 competitions (including the Premier League, La Liga, Bundesliga, Serie A, Ligue 1 and the Champions League) at 10 calls a minute, with scores delayed. Send your key in the X-Auth-Token header:

JavaScript
const res = await fetch("https://api.football-data.org/v4/competitions/PL/standings", {
  headers: { "X-Auth-Token": process.env.FOOTBALL_DATA_KEY },
  signal: AbortSignal.timeout(10_000),
});
if (!res.ok) throw new Error(`football-data.org returned HTTP ${res.status}`);
const { table } = (await res.json()).standings[0];
for (const row of table.slice(0, 5)) console.log(row.position, row.team.name, row.points);

#API-Football

API-FOOTBALL (part of API-Sports) covers far more leagues, with fixtures, lineups, events, odds and statistics. The free plan gives 100 requests a day (resetting at 00:00 UTC) and about 10 a minute, with every endpoint available but some seasons restricted.

Bash
curl "https://v3.football.api-sports.io/fixtures?league=39&season=2025&next=5" \
  -H "x-apisports-key: $API_FOOTBALL_KEY"

With 100 requests a day, fetch fixtures once and cache them, and only poll live matches you're actually displaying.

#Formula 1

#OpenF1

OpenF1 needs no key and exposes detailed session data: laps, sector times, car positions, pit stops, team radio and weather. Historical data is free; check its docs for live-timing access.

JavaScript
const sessions = await fetch("https://api.openf1.org/v1/sessions?year=2026&session_type=Race").then((r) => r.json());
// The list includes races that haven't happened yet, so take the latest finished one
const last = sessions.filter((s) => new Date(s.date_end) < new Date()).at(-1);
const [driver] = await fetch(`https://api.openf1.org/v1/drivers?session_key=${last.session_key}`).then((r) => r.json());
const laps = await fetch(
  `https://api.openf1.org/v1/laps?session_key=${last.session_key}&driver_number=${driver.driver_number}`
).then((r) => r.json());
console.log(last.circuit_short_name, driver.full_name, laps.length, "laps");

#Jolpica: the Ergast replacement

The Ergast F1 API powered a decade of F1 apps, but it no longer serves data (our test of ergast.com/api/f1 returned a 404). Jolpica is a community-run, Ergast-compatible replacement: change the base URL and most existing code keeps working.

Bash
# Old: https://ergast.com/api/f1/current/last/results.json
curl "https://api.jolpi.ca/ergast/f1/current/last/results.json"
curl "https://api.jolpi.ca/ergast/f1/current/driverStandings.json"

It's a free community service, so cache aggressively and don't poll it in tight loops.

#Multi-sport: TheSportsDB

TheSportsDB covers dozens of sports with team badges, player photos and event results, which makes it great for visual projects. Update your tutorials: the old free key 3 is permanently disabled and now returns 403. The free test key is 123:

Bash
curl "https://www.thesportsdb.com/api/v1/json/123/searchteams.php?t=Arsenal"

Live scores and higher limits are on its paid plans.

#Baseball and basketball

#MLB Stats API

The MLB Stats API at statsapi.mlb.com is MLB's own data service, with teams, rosters, schedules, live game feeds and stats, and needs no key:

JavaScript
const res = await fetch("https://statsapi.mlb.com/api/v1/teams/147", { signal: AbortSignal.timeout(10_000) });
const [team] = (await res.json()).teams;
console.log(team.name, "/", team.venue.name);

Responses include an MLB copyright notice, and use is subject to MLB's terms. It's fine for personal projects, but check the terms before building anything commercial.

#balldontlie (NBA)

balldontlie used to be the go-to keyless NBA API. It now requires a free API key in the Authorization header, and the free tier is limited to about 5 requests a minute and the basic endpoints (teams, players, games):

Bash
curl "https://api.balldontlie.io/v1/teams" -H "Authorization: $BALLDONTLIE_KEY"

#Tips for sports apps on free tiers

  1. Schedules change rarely; cache them for hours. Only poll live matches, and only while they're live.
  2. Respect delays. Most free tiers delay scores; don't market your app as "live" on them.
  3. Watch out for licensing. League data and logos are often licensed. Personal projects are fine; commercial ones may need a licence.
  4. Have a fallback. Community APIs (Jolpica, TheSportsDB's free tier) are run by volunteers and can rate-limit you.

Find more, including cricket, fitness and esports APIs, on our sports API rankings, updated daily by uptime.

#FAQ

#What is the best free football API?

football-data.org for the top European competitions (12 on the free tier, 10 calls a minute), and API-Football for broad league coverage (100 requests a day).

#Is the Ergast F1 API still available?

No. It stopped serving data; Jolpica provides an Ergast-compatible API at api.jolpi.ca/ergast/f1/, and OpenF1 offers detailed session data.

#Why does TheSportsDB return 403 with key 3?

The old 3 test key was permanently disabled. Use the new free test key 123, or sign up for a paid key.

#Is there a free NBA API without a key?

balldontlie now requires a free key. For keyless basketball data there are fewer options. See the sports category in our directory for current alternatives.