TheSportsDB Multi-Sport API Wrapper avatar

TheSportsDB Multi-Sport API Wrapper

Pricing

Pay per event

Go to Apify Store
TheSportsDB Multi-Sport API Wrapper

TheSportsDB Multi-Sport API Wrapper

Fetch leagues, teams, players, and match events from TheSportsDB — the free multi-sport metadata API covering soccer, basketball, baseball, American football, and dozens more sports worldwide. Bring your own free or Patreon API key. Results are schema-normalised and dataset-ready.

Pricing

Pay per event

Rating

0.0

(0)

Developer

BowTiedRaccoon

BowTiedRaccoon

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

3 days ago

Last modified

Share

Fetch leagues, teams, players, and match events from TheSportsDB — the free multi-sport metadata API covering soccer, basketball, baseball, American football, ice hockey, and dozens more sports worldwide.

What You Get

Each run returns one of five data types:

Data TypeDescriptionSample Fields
leaguesAll leagues worldwideleague_id, league_name, sport
teamsAll teams in a named leagueteam_id, team_name, team_stadium, team_country
playersPlayer search by nameplayer_id, player_name, player_position, player_nationality
eventsPast match results for a leagueevent_id, event_name, home_team, away_team, home_score, away_score, season
seasonsSeasons available for a leagueseason, league_id, league_name

All records include a record_type field, plus sport and league context where available.

Input

FieldRequiredDefaultDescription
apiKeyNo3TheSportsDB API key. The free key 3 works for testing (~30 req/min). Get a Patreon key at https://www.patreon.com/thesportsdb for higher limits.
dataTypeYesleaguesWhich data to fetch: leagues, teams, players, events, or seasons.
leagueNameConditionalRequired when dataType is teams, events, or seasons. Example: English Premier League.
playerSearchConditionalRequired when dataType is players. Example: Ronaldo.
maxItemsNo100Maximum records to return. Set to 0 for no limit.

Examples

Fetch all leagues

{
"apiKey": "3",
"dataType": "leagues",
"maxItems": 100
}

Sample output:

{
"record_type": "league",
"league_id": "4328",
"league_name": "English Premier League",
"sport": "Soccer"
}

Fetch teams in the NBA

{
"apiKey": "3",
"dataType": "teams",
"leagueName": "NBA",
"maxItems": 30
}

Search players

{
"apiKey": "3",
"dataType": "players",
"playerSearch": "Ronaldo",
"maxItems": 10
}

Sample output:

{
"record_type": "player",
"player_id": "34145937",
"player_name": "Cristiano Ronaldo",
"player_team": "Al-Nassr",
"sport": "Soccer",
"player_nationality": "Portugal",
"player_position": "Forward"
}

Fetch past match results

{
"apiKey": "3",
"dataType": "events",
"leagueName": "English Premier League",
"maxItems": 50
}

Sample output:

{
"record_type": "event",
"event_id": "1116564",
"event_name": "Arsenal vs Chelsea",
"event_date": "2024-04-23",
"sport": "Soccer",
"league_name": "English Premier League",
"home_team": "Arsenal",
"away_team": "Chelsea",
"home_score": "5",
"away_score": "0",
"season": "2023-2024"
}

API Key

The free demo key 3 is rate-limited to approximately 30 requests per minute and is suitable for small-volume lookups. For higher throughput or access to premium V2 endpoints, obtain a Patreon key from https://www.patreon.com/thesportsdb.

Notes

  • This actor uses the TheSportsDB v1 API, which is publicly available with the free key.
  • All data is fetched in a single API call per run — no pagination required.
  • The free key returns up to 10 results per endpoint. A Patreon key returns full datasets.
  • Results are schema-normalised with consistent field names across all data types.

Output

Results are saved to the Apify dataset. Each item has a record_type field (league, team, player, event, or season) plus the relevant metadata fields. Null/missing fields are omitted from the output.