TheSportsDB

Sports API · 50+ sports · Teams, players, leagues · Free dev key

TL;DR

TheSportsDB is a massive crowd-sourced database of sports data covering soccer, basketball, baseball, hockey, NFL, Formula 1, tennis, and 50+ more sports. It includes team logos/colors/badges, player biographies with photos, league standings, and event schedules. The free development API key is literally "3" — just use it as the API key parameter and you're in. The data includes rich media: team banners, player thumbnails, and sport icons.

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

Free API key "3" — no signup required!

How to Use This API

1. Search for a Team — Arsenal FC

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

Returns Arsenal's full data: full name, formed year, stadium (Emirates Stadium), stadium capacity, description, jersey colors, badge URL, banner image, and league membership.

2. List All Teams in a League

https://www.thesportsdb.com/api/v1/json/3/search_all_teams.php?l=English%20Premier%20League

3. Get Player Information

https://www.thesportsdb.com/api/v1/json/3/searchplayers.php?t=Arsenal&p=Bukayo

Search by team and player name. Returns biography, birth date, nationality, position, height, weight, and photo.

4. JavaScript — Team Info Display

async function searchTeam(teamName) {
  const resp = await fetch(
    `https://www.thesportsdb.com/api/v1/json/3/searchteams.php?t=${encodeURIComponent(teamName)}`
  );
  const data = await resp.json();
  if (!data.teams) return null;
  const team = data.teams[0];
  return {
    name: team.strTeam,
    alternate: team.strAlternate,
    league: team.strLeague,
    stadium: team.strStadium,
    capacity: team.intStadiumCapacity,
    badge: team.strBadge,
    banner: team.strBanner,
    formed: team.intFormedYear,
    country: team.strCountry
  };
}

searchTeam('liverpool').then(team => {
  console.log(`${team.name} — ${team.stadium} (${team.capacity})`);
});

5. Python — League Teams

import requests

def get_league_teams(league_name):
    resp = requests.get(
        'https://www.thesportsdb.com/api/v1/json/3/search_all_teams.php',
        params={'l': league_name}
    )
    data = resp.json()
    if not data.get('teams'): return []
    return [{
        'name': t['strTeam'],
        'badge': t['strBadge'],
        'stadium': t['strStadium'],
        'formed': t['intFormedYear']
    } for t in data['teams']]

teams = get_league_teams('Spanish La Liga')
for t in teams[:5]:
    print(f"{t['name']} — {t['stadium']} (est. {t['formed']})")
Try searching Arsenal: https://www.thesportsdb.com/api/v1/json/3/searchteams.php?t=Arsenal

Frequently Asked Questions

Does the free API key "3" have any limits?
The free key "3" is a development/demo key with limited rate capability (about 20 requests per 10 seconds). For production apps, register for a free API key at thesportsdb.com for higher limits.
What sports are covered?
50+ sports including Soccer (major leagues), American Football (NFL, NCAA), Basketball (NBA, NCAA), Baseball (MLB), Ice Hockey (NHL), Formula 1, MotoGP, Tennis, Golf, Rugby, Cricket, Olympics, and more.
Does it include live scores or events?
Yes, TheSportsDB has endpoints for upcoming events, recent scores, and season schedules via eventsnext.php and eventslast.php.
Are team logos and badges available?
Yes, each team has strBadge, strBanner, strEquipment (jersey), and strLogo — high-resolution image URLs.
Can I search by country?
Yes, filter leagues by country. Each team includes strCountry field for geographic filtering.
What player data is available?
Players have: name, photo, nationality, birth date, position, height, weight, salary, contract, description, and social media handles.

API Details

API URL
https://www.thesportsdb.com/api/v1/json/3
Documentation
www.thesportsdb.com/api.php
Category
Sports
Authentication
Free dev key "3" — register for production key
Geographic Coverage
Global — 50+ sports, major leagues worldwide

What You Can Build