Free Sports API


Support
The free JSON sports API will always remain free at point of access for basic sports data.
All example links should be testable in the browser. Use JSONview extension to format the data.

Test API Keys
Free users can use the test API key "3" during development of your app or for educational use.

API Limits
The Rate limiter will kick in if you make over 100 requests per minute on our API with a 429 response

Free Sports API Upgrade
$6 Patreon supporters get a dedicated production API key with special features.
Premium keys include 2min livescores, Video Highlights and all other upgraded features.

Contact
Email: [email protected] - Please state if you are a Patreon Supporter

Search

Search for team by name
www.thesportsdb.com/api/v1/json/3/searchteams.php?t=Arsenal patreon icon

Search for team short code
www.thesportsdb.com/api/v1/json/3/searchteams.php?sname=ARS patreon icon


Search for all players from team patreon icon
www.thesportsdb.com/api/v1/json/3/searchplayers.php?t=Arsenal

Search for players by name
www.thesportsdb.com/api/v1/json/3/searchplayers.php?p=Danny_Welbeck
www.thesportsdb.com/api/v1/json/{APIKEY}/searchplayers.php?t={TeamName}&p={Playername}

Search for event by event name
www.thesportsdb.com/api/v1/json/3/searchevents.php?e=Arsenal_vs_Chelsea
www.thesportsdb.com/api/v1/json/3/searchevents.php?e=Arsenal_vs_Chelsea&s=2016-2017

Search for event by event file name
www.thesportsdb.com/api/v1/json/3/searchfilename.php?e=English_Premier_League_2015-04-26_Arsenal_vs_Chelsea

NOTE: You can replace spaces '%20' with underscores if you want, when requesting multi word strings.

List

List all sports
www.thesportsdb.com/api/v1/json/3/all_sports.php patreon icon

List all leagues (limited 50 on free tier)
www.thesportsdb.com/api/v1/json/3/all_leagues.php

List all countries
www.thesportsdb.com/api/v1/json/3/all_countries.php

List all Leagues in a country (limited 50 on free tier)
www.thesportsdb.com/api/v1/json/3/search_all_leagues.php?c=England
www.thesportsdb.com/api/v1/json/3/search_all_leagues.php?c=England&s=Soccer

List all Seasons in a League
www.thesportsdb.com/api/v1/json/3/search_all_seasons.php?id=4328

List all Teams in a League
www.thesportsdb.com/api/v1/json/3/search_all_teams.php?l=English%20Premier%20League
www.thesportsdb.com/api/v1/json/3/search_all_teams.php?s=Soccer&c=Spain

List All teams details in a league by Id patreon icon
www.thesportsdb.com/api/v1/json/3/lookup_all_teams.php?id=4328

List All players in a team by Team Id patreon icon
www.thesportsdb.com/api/v1/json/3/lookup_all_players.php?id=133604

List all users loved teams and players
www.thesportsdb.com/api/v1/json/3/searchloves.php?u=zag

Lookups

League Details by Id
www.thesportsdb.com/api/v1/json/3/lookupleague.php?id=4346 patreon icon

Team Details by Id
www.thesportsdb.com/api/v1/json/3/lookupteam.php?id=133604 patreon icon

Player Details by Id
www.thesportsdb.com/api/v1/json/3/lookupplayer.php?id=34145937

Event Details by Id
www.thesportsdb.com/api/v1/json/3/lookupevent.php?id=441613 patreon icon

Event Statistics by Id patreon icon
www.thesportsdb.com/api/v1/json/3/lookupeventstats.php?id=1032723

Event Lineup by Id patreon icon
www.thesportsdb.com/api/v1/json/3/lookuplineup.php?id=1032723

List timeline for events by event ID patreon icon
www.thesportsdb.com/api/v1/json/3/lookuptimeline.php?id=1032718

Player Honours by Player Id
www.thesportsdb.com/api/v1/json/3/lookuphonours.php?id=34147178

Player Milestones by Player Id
www.thesportsdb.com/api/v1/json/3/lookupmilestones.php?id=34161397

Player Former Teams by Player Id
www.thesportsdb.com/api/v1/json/3/lookupformerteams.php?id=34147178

Player Contracts by Player Id
www.thesportsdb.com/api/v1/json/3/lookupcontracts.php?id=34147178

Event Results by Event Id
www.thesportsdb.com/api/v1/json/3/eventresults.php?id=652890

Event TV by Event Id patreon icon
www.thesportsdb.com/api/v1/json/3/lookuptv.php?id=584911

Lookup Table by League ID and Season
www.thesportsdb.com/api/v1/json/3/lookuptable.php?l=4328&s=2020-2021

Lookup Equipment by Team ID
www.thesportsdb.com/api/v1/json/3/lookupequipment.php?id=133597

Schedules

Next 5 Events by Team Id
www.thesportsdb.com/api/v1/json/3/eventsnext.php?id=133602 patreon icon

Next 15 Events by League Id
www.thesportsdb.com/api/v1/json/3/eventsnextleague.php?id=4328 patreon icon

Last 5 Events by Team Id (Limited to home team for free tier)
www.thesportsdb.com/api/v1/json/3/eventslast.php?id=133602

Last 15 Events by League Id
www.thesportsdb.com/api/v1/json/3/eventspastleague.php?id=4328 patreon icon


Events in a specific round by league id/round/season
www.thesportsdb.com/api/v1/json/3/eventsround.php?id=4328&r=38&s=2014-2015

Events on a specific day patreon icon
www.thesportsdb.com/api/v1/json/3/eventsday.php?d=2014-10-10
www.thesportsdb.com/api/v1/json/3/eventsday.php?d=2014-10-10&s=Soccer
www.thesportsdb.com/api/v1/json/3/eventsday.php?d=2014-10-10&l=4356
www.thesportsdb.com/api/v1/json/3/eventsday.php?d=2014-10-10&l=Australian_A-League


TV Events on a day (By Sport/Date/TV Station Country) patreon icon
www.thesportsdb.com/api/v1/json/3/eventstv.php?d=2018-07-07
www.thesportsdb.com/api/v1/json/3/eventstv.php?d=2018-07-07&s=Fighting
www.thesportsdb.com/api/v1/json/3/eventstv.php?d=2019-09-28&a=United%20Kingdom&s=Cycling
www.thesportsdb.com/api/v1/json/APIKEY/eventstv.php?f=Peacock%20Premium

All events in specific league by season (Free tier limited to 100 events)
www.thesportsdb.com/api/v1/json/3/eventsseason.php?id=4328&s=2014-2015

NOTE: These round numbers relate to special strings:
Round 125 = Quarter-Final
Round 150 = Semi-Final
Round 160 = Playoff
Round 170 = Playoff Semi-Final
Round 180 = Playoff Final
Round 200 = Final
Round 500 = Pre-Season

Images

Preview Images
Most of the time you won't want to download the original large image, just get a small preview.
This is possible simple by adding ''/preview'' onto the end URL. This will give you a small 200px version.
Original Image - /images/media/league/fanart/xpwsrw1421853005.jpg
Small 250px Image - /images/media/league/fanart/xpwsrw1421853005.jpg/preview
Tiny 50px Image - /images/media/league/badge/pdd43f1610891709.png/tiny

Video Highlights patreon icon
Latest Event Youtube Highlights
www.thesportsdb.com/api/v1/json/{APIKEY}/eventshighlights.php
www.thesportsdb.com/api/v1/json/{APIKEY}/eventshighlights.php?d=2019-10-13
www.thesportsdb.com/api/v1/json/{APIKEY}/eventshighlights.php?d=2019-10-12&l=WTA%20Tour
www.thesportsdb.com/api/v1/json/{APIKEY}/eventshighlights.php?l=MLB
www.thesportsdb.com/api/v1/json/3/eventshighlights.php?i=4329
www.thesportsdb.com/api/v1/json/{APIKEY}/eventshighlights.php?s=Soccer
www.thesportsdb.com/api/v1/json/{APIKEY}/eventshighlights.php?s=Soccer&d=2020-02-15

Larger API Limits patreon icon
Show ALL events from season (developer key is limited to 250 events).
www.thesportsdb.com/api/v1/json/3/eventsseason.php?id=4424&s=2019

Livescores V1 patreon icon
NOTE: V2 is now recommended for livescore
These are just a static examples for non-patreon
Soccer - www.thesportsdb.com/api/v1/json/3/latestsoccer.php
NCAA Basketball - www.thesportsdb.com/api/v1/json/3/latestncaabasketball.php
NCAA Football - www.thesportsdb.com/api/v1/json/3/latestncaafootball.php
Basketball - www.thesportsdb.com/api/v1/json/3/latestbasketball.php
American Football - www.thesportsdb.com/api/v1/json/3/latestamericanfootball.php
Ice Hockey - www.thesportsdb.com/api/v1/json/3/latesticehockey.php
Baseball - www.thesportsdb.com/api/v1/json/3/latestbaseball.php
NOTE: Updated LIVE every 2mins for Patreon

Livescore V2 patreon icon
thesportsdb.com/api/v2/json/APIKEY/livescore.php?s=Soccer
thesportsdb.com/api/v2/json/APIKEY/livescore.php?s=Basketball
thesportsdb.com/api/v2/json/APIKEY/livescore.php?s=Ice_Hockey
thesportsdb.com/api/v2/json/APIKEY/livescore.php?l=4399
thesportsdb.com/api/v2/json/APIKEY/livescore.php?l=4387
thesportsdb.com/api/v2/json/APIKEY/livescore.php?l=4380

NOTE: All v2 events link to events on our site directly.