Skip to main content
TheSportsDB (TSDB) is a community-driven sports data API used as a fallback provider (priority 100) for leagues not covered by ESPN — including Australian sports, rugby, cricket, boxing, CFL, and Scandinavian leagues.

API details

Base URLhttps://www.thesportsdb.com/api/v1/json/{api_key}/{endpoint}
AuthAPI key in URL path (123 for free tier)
Priority100 (last resort)
Rate limit30 req/min free, 100 req/min premium

API tiers

The free tier uses API key 123 (the default). It is suitable for leagues with low event volume.
LimitValue
Rate limit30 req/min
Events per query5 per day per league
Team search10 teams
CostFree
Works well for: CFL, Unrivaled, Norwegian Hockey, Boxing.

Configuring a premium API key

Add your premium key in Settings > System > TheSportsDB API Key. The key takes effect immediately — no restart required.
The league picker shows a crown icon on premium-tier leagues and warns you if you select one without a key configured.

Supported leagues

LeagueCodeTSDB IDSportTier
Canadian Football Leaguecfl4405FootballFree
Unrivaledunrivaled5622BasketballFree
Norwegian Fjordkraft-ligaennorwegian-hockey4926HockeyFree
Boxingboxing4445BoxingFree
Australian Football Leagueafl4456Australian FootballPremium
National Rugby Leaguenrl4416RugbyPremium
Super Rugby Pacificsuper-rugby4551RugbyPremium
Indian Premier Leagueipl4460CricketPremium
Big Bash Leaguebbl4461CricketPremium
SA20sa205532CricketPremium
Svenska Cupensvenska-cupen4756SoccerPremium

League ID format

Each TSDB league requires two identifiers in schema.sql:
ColumnUsed byExample
provider_league_ideventsnextleague.php, lookupleague.php5159
provider_league_nameeventsday.php, search_all_teams.phpCanadian OHL
These must match TSDB’s internal data exactly. Use search_all_leagues.php to discover correct values.

Event resolution

TSDB uses a three-step fallback chain when fetching events:
  1. eventsday.php — date-specific lookup (primary, works for most leagues)
  2. eventsnextleague.php — upcoming events filtered by date (fallback)
  3. eventsround.php — full round/season events filtered by date (last resort, used for leagues like Unrivaled)

Rate limiting

Teamarr enforces rate limits preemptively using a sliding window limiter — it tracks request timestamps and waits before approaching the limit, rather than waiting for 429 responses. If the API returns HTTP 429, Teamarr retries with exponential backoff: 5s → 10s → 20s → 40s → 80s. Rate limit statistics (total requests, preemptive waits, reactive waits) are tracked and available for UI feedback.

Cache TTLs

DataTTL
Teams24 hours
Next events1 hour
Past games7 days
Today’s games30 minutes
Tomorrow’s games4 hours
3–7 days out8 hours
8+ days out24 hours

File locations

FilePurpose
teamarr/providers/tsdb/provider.pyTSDBProvider class
teamarr/providers/tsdb/client.pyHTTP client with preemptive rate limiting

Build docs developers (and LLMs) love