TheSportsDB API

⭐ Beginner's Pick Sports & Fitness / API Key Intermediate HTTPS CORS
Varies by plan (check documentation)

Overview

TheSportsDB is a crowd-sourced sports database providing data on teams, players, leagues, and events across dozens of sports. You can retrieve detailed information like team logos, player photos, and match results with a simple API key. It is a great starting point for building sports-related apps or dashboards.

💡

Beginner Tip

Use the free tier (API key "1") to explore the API without signing up—just replace the key with your own once you need higher limits. Always check the strThumb and strBanner fields for pre-hosted artwork images.

Available Data

match scores and results
team standings
player statistics
schedule and fixtures

Example Response

JSON Response
{
  "match_id": 4521,
  "home_team": "Team A",
  "away_team": "Team B",
  "score": {
    "home": 2,
    "away": 1
  },
  "status": "Full Time",
  "date": "2025-01-15",
  "league": "Premier League"
}

Field Reference

idTeam Unique numeric ID for the team within TheSportsDB
strTeam The full official name of the sports team
strLeague The primary league the team competes in
strStadium Name of the team's home stadium or arena
strBadge URL to the team badge/logo image hosted on TheSportsDB CDN
strDescriptionEN English-language description of the team history and background

Implementation Example

const url = "https://www.thesportsdb.com/";
// Replace headers or query params with the values required by this API.
const response = await fetch(url, {
  headers: {
  "X-API-Key": "YOUR_API_KEY"
  }
});
if (!response.ok) throw new Error(`Request failed: ${response.status}`);
const data = await response.json();
console.log(data);

What Can You Build?

Note: These code examples are AI-generated and unverified. Always refer to the official API documentation for accurate usage.

Common Errors & Troubleshooting

401 Unauthorized Missing or invalid API key in the URL path
Make sure your API key is placed correctly in the URL, e.g., /api/v1/json/YOUR_API_KEY/...
Empty results array Search term does not match any team or league name exactly
Try a shorter or alternate spelling of the team name, as the database uses English-language names
null fields in response TheSportsDB is crowd-sourced, so some fields may not yet have data
Always null-check fields like strDescriptionEN or strLogo before rendering them in your UI

Matrix Score Breakdown

🌐 Reachability 30/30
⚡ Speed 10/20
🔒 Security 15/15
🛠 Developer XP 17/20
✓ Reliability 10/15

Partially tested on Apr 5, 2026

Technical Specifications

Auth API Key
HTTPS REQUIRED
CORS YES
Category Sports & Fitness
Difficulty Intermediate
Verified: 2026-04-04

Similar APIs

View All →