TheSportsDB API

Beginner's Pick Sports & Fitness / API Key Intermediate HTTPS CORS
72 B
Measured Score 0 50 100 Speed 25/30 Consistency 4/20 Security 20/20 Browser access 15/15 Transparency 8/15 TESTED 2026-08-10

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.

Measurement Record

What actually happened when we called this API from our own infrastructure. Every value below was recorded by the request, not copied from the provider's documentation.

Request
GET https://www.thesportsdb.com/api/v1/json/3/searchteams.php?t=Arsenal
Result
HTTP 200 · application/json · 17,189 bytes · compressed
Response time
44 ms (median of 3) · fastest 27 ms
Transport
TLSv1.3 · TLS_AES_256_GCM_SHA384 · certificate issued by Google Trust Services
Browser CORS
Allowed — Access-Control-Allow-Origin: *
Served by
cloudflare
Recorded
2026-08-10

Fields Returned

Top-level fields present in the response we captured, with the type and value we actually received.

Field Type Value received
teams array [1 item]

Captured Response

Captured from a real request to https://www.thesportsdb.com/api/v1/json/3/searchteams.php?t=Arsenal on 2026-08-10. Long arrays and nested objects are truncated to keep the shape readable.

JSON Response · Captured
{
  "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",
      "…": "(50 more fields)"
    }
  ]
}

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

Implementation Example

Calls a real endpoint of this API. Replace any placeholder credentials with your own key.

Request
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

Generated guidance based on this API's documentation, not observed by us. Treat it as a starting point and check against the provider's own error reference.

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

Measured Score Breakdown

Live HTTP request to the API endpoint

Speed 25/30
Consistency 4/20
Security 20/20
Browser access 15/15
Transparency 8/15
Endpoint Response Time 44ms

Fully tested on Aug 10, 2026

Technical Specifications

Auth API Key
HTTPS REQUIRED
CORS YES
Category Sports & Fitness
Difficulty Intermediate
Endpoint last called: 2026-08-10

Similar APIs

View All →