BYTETOOLS

TheSportsDB API

Free sports database API with a public test key: teams, players, leagues, fixtures and results across football, basketball, cricket and more, with images. Tested.

No API key requiredCORS enabledHTTPSFree tier

Endpoint tested and returned HTTP 200 on 2026-08-19

What is the TheSportsDB API?

TheSportsDB is a free sports database API covering teams, players, leagues, fixtures and results across dozens of sports worldwide, with team badges and player images. The public test key works without registration.

TheSportsDB is the broadest free sports API available, covering football, basketball, American football, cricket, rugby, motorsport and more. Its distinguishing feature is media: team badges, jerseys, stadium photos and player images are all included.

The free tier uses the shared test key `3` embedded in the URL path, which is what the verified example here uses. It is heavily rate limited and shared across every anonymous user, so a Patreon key is worth it for anything beyond experimentation.

Quick facts

Base URL
https://www.thesportsdb.com/api/v1/json/3
Authentication
The shared test key `3` is embedded in the URL and needs no registration. A Patreon key raises limits and unlocks livescores.
Rate limit
About 30 requests per minute on the shared test key.
Pricing
Free with the test key; Patreon supporters get higher limits and more endpoints.
CORS
Enabled — callable directly from browser JavaScript
Official docs
Read the docs

How to use the TheSportsDB API

Every request below was executed against the live API on 2026-08-19, and the response shown is the real body it returned — not an illustration.

1. Search for a sports team

GET https://www.thesportsdb.com/api/v1/json/3/searchteams.php?t=Arsenal

curl
curl 'https://www.thesportsdb.com/api/v1/json/3/searchteams.php?t=Arsenal'
JavaScript (fetch)
const res = await fetch("https://www.thesportsdb.com/api/v1/json/3/searchteams.php?t=Arsenal");
if (!res.ok) throw new Error(`Request failed: ${res.status}`);
const data = await res.json();
console.log(data);
Python (requests)
import requests

res = requests.get("https://www.thesportsdb.com/api/v1/json/3/searchteams.php?t=Arsenal", timeout=20)
res.raise_for_status()
print(res.json())
Response — HTTP 200 (truncated)
{
  "teams": [
    {
      "idTeam": "133604",
      "idESPN": "359",
      "idAPIfootball": "42",
      "intLoved": "10",
      "strTeam": "Arsenal",
      "strTeamAlternate": "Arsenal Football Club, AFC, Arsenal FC",
      "strTeamShort": "ARS",
      "intFormedYear": "1892",
      "strSport": "Soccer",
      "strLeague": "English Premier League",
      "idLeague": "4328",
      "strLeague2": "FA Cup",
      "idLeague2": "4482",
      "strLeague3": "EFL Cup",
      "idLeague3": "4570",
      "strLeague4": "UEFA Champions League",
      "idLeague4": "4480",
      "strLeague5": "Emirates Cup",
      "idLeague5": "5648",
      "strLeague6": "Club Friendlies",
      "idLeague6": "4569",
      "strLeague7": "FA Community Shield",
      "idLeague7": "4571",
      "strDivision": null,
      "idVenue": "15528",
      "strStadium": "Emirates Stadium",
      "strKeywords": "Gunners, Gooners",
      "strRSS": "",
      "strLocation": "Holloway, London, England",
      "intStadiumCapacity": "60338",
      "strWebsite": "www.arsenal.com",
      "strFacebook": "www.facebook.com/Arsenal",
      "strTwitter": "twitter.com/arsenal",
      "strInstagram": "instagram.com/arsenal",
      "strDescriptionEN": "Arsenal Football Club is a professional football club based in Islington, London, England, that plays in the Premier League, the top flight of English football. The club has won 13 League titles, a record 13 FA Cups, 2 League Cups, 15 FA Community Shields, 1 League Centenary Trophy, 1 UEFA Cup Winners' Cup and 1 Inter-Cities Fairs Cup.\r\n\r\nArsenal was the first club from the South of

Parameters

ParameterTypeRequiredDescription
searchteams.php?t=stringOptionalSearch teams by name. Arsenal
searchplayers.php?p=stringOptionalSearch players by name. Messi
eventsnextleague.php?id=integerOptionalUpcoming fixtures for a league. 4328
lookup_all_players.php?id=integerOptionalSquad list for a team. 133604

Response fields

teams[].idTeamstring
Team identifier used across other endpoints.
teams[].strTeamstring
Team name.
teams[].strLeaguestring
Primary league.
teams[].strBadgestring
Team badge image URL.
teams[].strStadium / intStadiumCapacitystring
Home ground and capacity.
teams[].strDescriptionENstring
Long-form team description.

What you can build with the TheSportsDB API

  • Build a sports app with team badges and squad lists
  • Show upcoming fixtures for a league or team
  • Create a sports quiz using player and team data
  • Add club information to a fan site

Common errors and how to fix them

null instead of an empty array

No results are signalled with null.

Fix: Check for null before iterating — this is the most common bug with this API.

429

Shared test key rate limit exceeded.

Fix: The key `3` is shared by everyone; get a Patreon key for reliable access.

Livescores unavailable

Real-time scores are a supporter-tier feature.

Fix: The free tier covers fixtures and completed results, not live in-play data.

TheSportsDB API — frequently asked questions

Is TheSportsDB free?

Yes, with the shared public test key `3` embedded in the URL, requiring no registration. A Patreon subscription raises the rate limit and unlocks livescores.

Which sports are covered?

Dozens, including football, basketball, American football, baseball, cricket, rugby, ice hockey and motorsport, with worldwide league coverage.

Why does it return null instead of an empty list?

When nothing matches, fields like `teams` come back as null rather than an empty array. Always null-check before iterating.

Does it include team badges and images?

Yes, and that is its main advantage. Team badges, jerseys, stadium photos and player images are all included at no cost.

Tools that pair with this API

TheSportsDB is an independent third-party service and is not affiliated with ByteTools or ByteVancer. Details on this page were verified on 2026-08-19; always check the official documentation before relying on this API in production, as terms and limits can change.