Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Overview of the possibilities of the API V1 of TheSportsdb.com
#1
Overview of the possibilities of the API V1 of TheSportsdb.com

There are 2 types of API calls.:

- Free (The free sports API will always remain free at point of access for basic sports data)
- Premium (You must be registered on TheSportsDB and a supporter on Patreon - get a dedicated production API key including 2min Livescores, Video highlights and all other upgraded features.)

Free users can use the test API key "3" during development of your app or for educational use. 
If you have paid for a premium key, just replace "3" with your "API KEY" in the URL.
  • If you have not received an API key after registering and joining, please contact the following email address: thedatadb(@)gmail.com or join the discord channel: TheDataDB
  • Some of the example links below do not show any results, just replace the 3 in the URL with your API key!
  • If you click on "Show content", only shortened records will be displayed!



API Limit: 100 requests per minute. If you exceed the limit, you will receive the following message and error code:

Code:
{
    "message": "Rate Limit exceeded. Please keep below 100 requests per 1 minute.",
    "error": 429
}



Search:

DescriptionUrl Link Hint
Search for team by name "https://www.thesportsdb.com/api/v1/json/3/searchteams.php?t=Arsenal" Link -
Search for team short code "/api/v1/json/3/searchteams.php?sname=ARS" Link -

Show Content

DescriptionUrl Link Hint
Search for all players from team "/api/v1/json/3/searchplayers.php?t=Arsenal" Link Premium
Search for players by name 1 "/api/v1/json/3/searchplayers.php?p=Danny_Welbeck" Link -
Search for players by name 2 "/api/v1/json/{APIKEY}/searchplayers.php?t={TeamName}&p={Playername}" Link {APIKEY} = 3, Team: Arsenal, Player: Gabriel_Jesus

Show Content

DescriptionUrl Link Hint
Search for event by event name 1 "/api/v1/json/3/searchevents.php?e=Arsenal_vs_Chelsea" Link -
Search for event by event name 2 "/api/v1/json/3/searchevents.php?e=Arsenal_vs_Chelsea&s=2016-2017" Link -

Show Content

DescriptionUrl Link Hint
Search for event by event file name "/api/v1/json/3/searchfilename.php?e=English_Premier_League_2015-04-26_Arsenal_vs_Chelsea" Link -

Show Content


DescriptionUrl Link Hint
Search for venue "/api/v1/json/3/searchvenues.php?t=Wembley" Link -

Show Content

=> You can replace spaces between multi word strings with underscores: Arsenal_vs_Chelsea



List:

DescriptionUrl Link Hint
List all sports "/api/v1/json/3/all_sports.php" Link Premium

Show Content

DescriptionUrl Link Hint
List all leagues "/api/v1/json/3/all_leagues.php" Link limited 50 on free tier

Show Content

DescriptionUrl Link Hint
List all countries "/api/v1/json/3/all_countries.php" Link -

Show Content

DescriptionUrl Link Hint
List all Leagues in a country 1 "/api/v1/json/3/search_all_leagues.php?c=England" Link limited 50 on free tier
List all Leagues in a country 2 "/api/v1/json/3/search_all_leagues.php?c=England&s=Soccer" Link limited 50 on free tier

Show Content

DescriptionUrl Link Hint
List all Seasons in a League "/api/v1/json/3/search_all_seasons.php?id=4328" Link -

Show Content

DescriptionUrl Link Hint
List all Teams in a League 1 "/api/v1/json/3/search_all_teams.php?l=English%20Premier%20League" Link -
List all Teams in a League 2 "/api/v1/json/3/search_all_teams.php?s=Soccer&c=Spain" Link -

Show Content

DescriptionUrl Link Hint
List All teams details in a league by Id "/api/v1/json/3/lookup_all_teams.php?id=4328" Link Premium

Show Content

DescriptionUrl Link Hint
List All players in a team by Team Id "/api/v1/json/3/lookup_all_players.php?id=133604" Link Premium

Show Content

DescriptionUrl Link Hint
List all users loved teams and players "/api/v1/json/3/searchloves.php?u=zag" Link -

Show Content

DescriptionUrl Link Hint
List all events from season "/api/v1/json/3/eventsseason.php?id=4424&s=2019" Link Premium (developer key is limited to 250 events)

Show Content



Lookups:

DescriptionUrl Link Hint
League Details by Id "/api/v1/json/3/lookupleague.php?id=4346" Link Premium

Show Content

DescriptionUrl Link Hint
Team Details by Id "/api/v1/json/3/lookupteam.php?id=133604" Link Premium

Show Content

DescriptionUrl Link Hint
Player Details by Id "/api/v1/json/3/lookupplayer.php?id=34145937" Link -

Show Content

DescriptionUrl Link Hint
Venue Details by Id "/api/v1/json/3/lookupvenue.php?id=16163" Link -

Show Content

DescriptionUrl Link Hint
Event Details by Id "/api/v1/json/3/lookupevent.php?id=441613" Link Premium

Show Content

DescriptionUrl Link Hint
Event Statistics by Id "/api/v1/json/3/lookupeventstats.php?id=1032723" Link Premium only

Show Content

DescriptionUrl Link Hint
Event Lineup by Id "/api/v1/json/3/lookuplineup.php?id=1032723" Link Premium

Show Content

DescriptionUrl Link Hint
List timeline for events by event ID "/api/v1/json/3/lookuptimeline.php?id=1032718" Link Premium only

Show Content

DescriptionUrl Link Hint
Player Honours by Player Id "/api/v1/json/3/lookuphonours.php?id=34147178" Link -

Show Content

DescriptionUrl Link Hint
Player Milestones by Player Id "/api/v1/json/3/lookupmilestones.php?id=34161397" Link -

Show Content

DescriptionUrl Link Hint
Player Former Teams by Player Id "/api/v1/json/3/lookupformerteams.php?id=34147178" Link -

Show Content

DescriptionUrl Link Hint
Player Contracts by Player Id "/api/v1/json/3/lookupcontracts.php?id=34147178" Link -

Show Content

DescriptionUrl Link Hint
Event Results by Event Id "/api/v1/json/3/eventresults.php?id=652890" Link -

Show Content

DescriptionUrl Link Hint
Event TV by Event Id "/api/v1/json/3/lookuptv.php?id=584911" Link Premium

Show Content

DescriptionUrl Link Hint
Lookup Table by League ID and Season "/api/v1/json/3/lookuptable.php?l=4328&s=2020-2021" Link -

Show Content

DescriptionUrl Link Hint
Lookup Equipment by Team ID "/api/v1/json/3/lookupequipment.php?id=133597" Link -

Show Content


Schedules:

DescriptionUrl Link Hint
Next 5 Events by Team Id "/api/v1/json/3/eventsnext.php?id=133602" Link Premium
Next 15 Events by League Id "/api/v1/json/3/eventsnextleague.php?id=4328" Link Premium
Last 5 Events by Team Id "/api/v1/json/3/eventslast.php?id=133602" Link Limited to home team for free tier
Last 15 Events by League Id "/api/v1/json/3/eventspastleague.php?id=4328" Link Premium
Events in a specific round by league id/round/season "/api/v1/json/3/eventsround.php?id=4328&r=38&s=2014-2015" Link -
Events on a specific day "/api/v1/json/3/eventsday.php?d=2014-10-10" Link Premium
Events on a specific day "/api/v1/json/3/eventsday.php?d=2014-10-10&s=Soccer" Link Premium
Events on a specific day "/api/v1/json/3/eventsday.php?d=2014-10-10&l=4356" Link Premium
Events on a specific day "/api/v1/json/3/eventsday.php?d=2014-10-10&l=Australian_A-League" Link Premium
All events in specific league by season "/api/v1/json/3/eventsseason.php?id=4328&s=2014-2015" Link Free tier limited to 100 events

Show Content

DescriptionUrl Link Hint
TV Events on a day (By Sport/Date/TV Station Country) "/api/v1/json/3/eventstv.php?d=2018-07-07" Link Premium
TV Events on a day (By Sport/Date/TV Station Country) "/api/v1/json/3/eventstv.php?d=2018-07-07&s=Fighting" Link Premium
TV Events on a day (By Sport/Date/TV Station Country) "/api/v1/json/3/eventstv.php?d=2019-09-28&a=United%20Kingdom&s=Cycling" Link Premium
TV Events on a day (By Sport/Date/TV Station Country) "/api/v1/json/3/eventstv.php?c=Peacock_Premium" Link Premium

Show Content

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



Video Highlights:

DescriptionUrl Link Hint
Latest Event Youtube Highlights 1 "/api/v1/json/3/eventshighlights.php" Link Premium
Latest Event Youtube Highlights 2 "/api/v1/json/3/eventshighlights.php?d=2019-10-13" Link Premium
Latest Event Youtube Highlights 3 "/api/v1/json/3/eventshighlights.php?d=2019-10-12&l=WTA%20Tour" Link Premium
Latest Event Youtube Highlights 4 "/api/v1/json/3/eventshighlights.php?l=MLB" Link Premium
Latest Event Youtube Highlights 5 "/api/v1/json/3/eventshighlights.php?i=4329" Link Premium
Latest Event Youtube Highlights 6 "/api/v1/json/3/eventshighlights.php?s=Soccer" Link Premium
Latest Event Youtube Highlights 7 "/api/v1/json/3/eventshighlights.php?s=Soccer&d=2020-02-15" Link Premium

Show Content



Livescores:

DescriptionUrl Link Hint
Soccer "/api/v1/json/3/latestsoccer.php" Link Premium
NCAA Basketball "/api/v1/json/3/latestncaabasketball.php" Link Premium - not working
NCAA Football "/api/v1/json/3/latestncaafootball.php" Link Premium - not working
Basketball "/api/v1/json/3/latestbasketball.php" Link Premium
Am Football "/api/v1/json/3/latestamericanfootball.php" Link Premium
Ice Hockey "/api/v1/json/3/latesticehockey.php" Link Premium
Baseball "/api/v1/json/3/latestbaseball.php" Link Premium - not working

Show Content

NOTE: Updated LIVE every 2mins for Patreon/Premium
=> V2 is now recommended for livescore



Images:

Most of the time you won't want to download the original large image. 
This is possible simple by adding ''/preview'' or "/medium",.. onto the end URL.
 
DescriptionSize Url Link
Original fullsize "/images/media/league/fanart/xpwsrw1421853005.jpg Link
Medium 500px height "/images/media/league/fanart/xpwsrw1421853005.jpg/medium Link
Small 250px height "/images/media/league/fanart/xpwsrw1421853005.jpg/small Link
Preview 200px height "/images/media/league/fanart/xpwsrw1421853005.jpg/preview Link
Tiny 50px height "/images/media/league/badge/pdd43f1610891709.png/tiny Link

Show Content
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)