Skip to content

Instantly share code, notes, and snippets.

@akeaswaran
Last active April 15, 2024 01:14
Show Gist options
  • Save akeaswaran/b48b02f1c94f873c6655e7129910fc3b to your computer and use it in GitHub Desktop.
Save akeaswaran/b48b02f1c94f873c6655e7129910fc3b to your computer and use it in GitHub Desktop.
ESPN hidden API Docs

ESPN's hidden API endpoints

Football

College Football

Latest News: http://site.api.espn.com/apis/site/v2/sports/football/college-football/news

Latest Scores: http://site.api.espn.com/apis/site/v2/sports/football/college-football/scoreboard

  • query params:

    • calendar: 'blacklist'
    • dates: any date in YYYYMMDD

Game Information: http://site.api.espn.com/apis/site/v2/sports/football/college-football/summary?event=:gameId

  • params:

    • gameId: identifier of some game (EX: 400934572 for 2017 Army vs Navy)

Team Information: http://site.api.espn.com/apis/site/v2/sports/football/college-football/teams/:team

  • params:

    • team: some team abbreviation (EX: 'all' for Allegheny, 'gt' for Georgia Tech, 'wisconsin' for Wisconsin)

Rankings: http://site.api.espn.com/apis/site/v2/sports/football/college-football/rankings

NFL

Scores: http://site.api.espn.com/apis/site/v2/sports/football/nfl/scoreboard

News: http://site.api.espn.com/apis/site/v2/sports/football/nfl/news

All Teams: http://site.api.espn.com/apis/site/v2/sports/football/nfl/teams

Specific Team: http://site.api.espn.com/apis/site/v2/sports/football/nfl/teams/:team

Baseball

MLB

Scores: http://site.api.espn.com/apis/site/v2/sports/baseball/mlb/scoreboard

News: http://site.api.espn.com/apis/site/v2/sports/baseball/mlb/news

All Teams: http://site.api.espn.com/apis/site/v2/sports/baseball/mlb/teams

Specific Team: http://site.api.espn.com/apis/site/v2/sports/baseball/mlb/teams/:team

College Baseball

Scores: https://site.api.espn.com/apis/site/v2/sports/baseball/college-baseball/scoreboard

Hockey

Scores: http://site.api.espn.com/apis/site/v2/sports/hockey/nhl/scoreboard

News: http://site.api.espn.com/apis/site/v2/sports/hockey/nhl/news

All Teams: http://site.api.espn.com/apis/site/v2/sports/hockey/nhl/teams

Specific Team: http://site.api.espn.com/apis/site/v2/sports/hockey/nhl/teams/:team

Basketball

NBA

Scores: http://site.api.espn.com/apis/site/v2/sports/basketball/nba/scoreboard

News: http://site.api.espn.com/apis/site/v2/sports/basketball/nba/news

All Teams: http://site.api.espn.com/apis/site/v2/sports/basketball/nba/teams

Specific Team: http://site.api.espn.com/apis/site/v2/sports/basketball/nba/teams/:team

WNBA

Scores: http://site.api.espn.com/apis/site/v2/sports/basketball/wnba/scoreboard

News: http://site.api.espn.com/apis/site/v2/sports/basketball/wnba/news

All Teams: http://site.api.espn.com/apis/site/v2/sports/basketball/wnba/teams

Specific Team: http://site.api.espn.com/apis/site/v2/sports/basketball/wnba/teams/:team

Women's College Basketball

Scores: http://site.api.espn.com/apis/site/v2/sports/basketball/womens-college-basketball/scoreboard

News: http://site.api.espn.com/apis/site/v2/sports/basketball/womens-college-basketball/news

All Teams: http://site.api.espn.com/apis/site/v2/sports/basketball/womens-college-basketball/teams

Specific Team: http://site.api.espn.com/apis/site/v2/sports/basketball/womens-college-basketball/teams/:team

Men's College Basketball

Scores: http://site.api.espn.com/apis/site/v2/sports/basketball/mens-college-basketball/scoreboard

News: http://site.api.espn.com/apis/site/v2/sports/basketball/mens-college-basketball/news

All Teams: http://site.api.espn.com/apis/site/v2/sports/basketball/mens-college-basketball/teams

Specific Team: http://site.api.espn.com/apis/site/v2/sports/basketball/mens-college-basketball/teams/:team

Soccer

Scores: http://site.api.espn.com/apis/site/v2/sports/soccer/:league/scoreboard

  • params:

    • league: some league abbreviation (EX: 'eng.1' for EPL, 'usa.1' for MLS)

Latest News: http://site.api.espn.com/apis/site/v2/sports/soccer/:league/news

List of Team Information: http://site.api.espn.com/apis/site/v2/sports/soccer/:league/teams

Will update with more information as I find more...

@ryanbuckner
Copy link

ryanbuckner commented Jan 24, 2023

Is there a way to use the NCAA Men's Basketball feed to get all March Madness games and scores?
http://site.api.espn.com/apis/site/v2/sports/basketball/mens-college-basketball/scoreboard

@ryanbuckner
Copy link

ryanbuckner commented Jan 24, 2023

Let me add a couple of specific responses to replies: the NFL API calls can be slow if event calls & scoreboard calls are done quickly in succession, as in when automated. I abandoned the ticker idea, as Python I/O libraries always have some crucial lack of functionality that make automation unusable. For example, PyAutoGUI has automatic vertical scrolling, which would have been nice, but there's no flag, ......
I'll post basketball as I have time. The code is lengthier than expected because there ended up being significantly more error checking than I could have imagined. REST API databases make me love MySQL databases all over again.

I created a public google sheets that uses the NFL API and updates every 15 minutes
Sheets

@collinstork
Copy link

Just found out you can use "all" for the league, if the team is in multiple leagues.
so if you want to see the nextEvent for USMNT:
https://site.api.espn.com/apis/site/v2/sports/soccer/all/teams/usa

@athleticmistud
Copy link

does anyone know of the link for the live scores for the now depreciated https://feeds.nfl.com/feeds-rs/scores.json is there an alternative for the live scores?

@daverz06
Copy link

Is there a way to use the NCAA Men's Basketball feed to get all March Madness games and scores? http://site.api.espn.com/apis/site/v2/sports/basketball/mens-college-basketball/scoreboard

The last "date" is 3-12 but the season end date in column I says 4-05, so I'm hoping we get data for the tournament. Do you know how to get all games right now instead of just ranked games?

@CN120
Copy link

CN120 commented Feb 3, 2023

@makeniii

Is there a id for a NBA season? Doesn't seem like there is but thought I'd ask anyways.

Also, does anyone know what 4/5 means for this variable for example, schedule_json['events']['competitions'][0]['status']['type']['id']? Currently, I know that:

1 = scheduled
2 = live
3 = completed
6 = postponed

So I'm assuming that 4/5 must mean something too but I haven't come across it yet.

Pulled from here

ID ESPN Status
0 TBD
1 SCHEDULED
2 IN PROGRESS
3 FINAL
4 FORFEIT
5 CANCELLED
6 POSTPONED
7 DELAYED
8 SUSPENDED
9 FORFEIT OF HOME TEAM
10 FORFEIT OF AWAY TEAM
17 RAIN DELAY
21 BEGINNING OF PERIOD
22 END OF PERIOD
23 HALFTIME
24 OVERTIME
25 FIRST HALF
26 SECOND HALF
27 ABANDONED
28 FULL TIME
29 RESCHEDULED
30 START LIST
31 INTERMEDIATE
32 UNOFFICIAL
33 MEDAL OFFICIAL
34 GROUPINGS OFFICIAL
35 PLAY COMPLETE
36 OFFICIAL - EVENT SHORTENED
37 CORRECTED RESULT
38 RETIRED
39 BYE
40 WALKOVER
41 VOID
42 PRELIMINARY
43 GOLDEN TIME
44 SHOOTOUT
45 FINAL SCORE - AFTER EXTRA TIME
46 FINAL SCORE - AFTER GOLDEN GOAL
47 FINAL SCORE - AFTER PENALTIES
48 END EXTRA TIME
49 EXTRA TIME HALF TIME
50 FIXTURE - NO LIVE COVERAGE
51 FINAL SCORE - ABANDONED

@ryanbuckner
Copy link

does anyone know of the link for the live scores for the now depreciated https://feeds.nfl.com/feeds-rs/scores.json is there an alternative for the live scores?

Regular Season:
https://site.api.espn.com/apis/site/v2/sports/football/nfl/scoreboard?seasontype=2&week= + weeknumber

Post Season
https://site.api.espn.com/apis/site/v2/sports/football/nfl/scoreboard?seasontype=3&week= + weeknumber

@athleticmistud
Copy link

athleticmistud commented Feb 3, 2023 via email

@ryanbuckner
Copy link

ryanbuckner commented Feb 3, 2023

What week number are we on in post season?...the best is yet to come...

Short answer, 22.

Here's my function for post season to build my live tracker

function getPostWeekName(weeknum) {
  var weekName;
  if (weeknum == 19){
      weekName = "WildCard";
    } else if (weeknum == 20){
      weekName = "Divisional";
    } else if (weeknum == 21){
      weekName = "Conference";
    } else if (weeknum == 22){
      weekName = "Pro Bowl";
    } else if (weeknum == 23){
      weekName = "SuperBowl";
  }
  return weekName;
}

@chrisblakley
Copy link

For anyone who may be interested (doesn't look like this has been mentioned here yet), the XFL works with this API:
Example: https://site.api.espn.com/apis/site/v2/sports/football/xfl/scoreboard

Nothing for the USFL that I can find, however.

@PIC954
Copy link

PIC954 commented Feb 8, 2023

hey!

Does anyone know the nascar/F1 API call?

@chrisblakley
Copy link

Nascar is no longer available, but here is an example endpoint for Formula 1:
https://site.api.espn.com/apis/site/v2/sports/racing/f1/scoreboard

There is a different endpoint for drivers, but you need the competition ID and the driver ID:
https://sports.core.api.espn.com/v2/sports/racing/leagues/f1/events/GAMEIDHERE/competitions/COMPETITIONIDHERE/competitors/DRIVERIDHERE/statistics

@tonycarnevale
Copy link

tonycarnevale commented Feb 9, 2023

Is there a way to use the NCAA Men's Basketball feed to get all March Madness games and scores? http://site.api.espn.com/apis/site/v2/sports/basketball/mens-college-basketball/scoreboard

@daverz06 @ryanbuckner this might be late but a way to do this would be adding groups=

for example https://site.api.espn.com/apis/site/v2/sports/basketball/mens-college-basketball/scoreboard?groups=7
or http://site.api.espn.com/apis/site/v2/sports/basketball/mens-college-basketball/scoreboard?dates=20230123&groups=0

for some reason the college basketball api only has limited data by default. My answer now is turning into a question. Does anyone know how to do a range of groups for ncaab?

@ischmidt20
Copy link

ischmidt20 commented Feb 9, 2023

for some reason the college basketball api only has limited data by default

@tonycarnevale You need to add the limit argument to ensure all games for a day are returned. I usually set limit to 363 as there will never be more than 363 D1 games in a day

Set groups equal to 50 to get all NCAA D1 games (regular season and conference tournaments). The postseason tournaments have different identifiers which unfortunately I can't recall at the moment.

@athleticmistud
Copy link

What week number are we on in post season?...the best is yet to come...

Short answer, 22.

Here's my function for post season to build my live tracker

function getPostWeekName(weeknum) {
  var weekName;
  if (weeknum == 19){
      weekName = "WildCard";
    } else if (weeknum == 20){
      weekName = "Divisional";
    } else if (weeknum == 21){
      weekName = "Conference";
    } else if (weeknum == 22){
      weekName = "Pro Bowl";
    } else if (weeknum == 23){
      weekName = "SuperBowl";
  }
  return weekName;
}

Thank you! So how real time is it? is there much delay ?
so if I use your function and wanted it for regular season do I just do the same function but starting with 1?)

@ryanbuckner
Copy link

Thank you! So how real time is it? is there much delay ? so if I use your function and wanted it for regular season do I just do the same function but starting with 1?)

You can call this to see the regular season week 1 - if you click the link below you'll see the events JSON payload for all the games in week 1. The data is real time and sometimes faster than my YouTube TV feed. But I would caution that there is a limit on how many times per day you can call it. That goes for all these APIs.

I usually call it every 60 minutes when there is no game, to get schedule updates and odds / lines changes. When games are on I switch to every 5 minutes. This way I avoid the limits, which I think is 2500 calls per day.

https://site.api.espn.com/apis/site/v2/sports/football/nfl/scoreboard?seasontype=2&week=1

@ITIRadio
Copy link

ITIRadio commented Feb 12, 2023

does anyone know of the link for the live scores for the now depreciated https://feeds.nfl.com/feeds-rs/scores.json is there an alternative for the live scores?

Regular Season:
https://site.api.espn.com/apis/site/v2/sports/football/nfl/scoreboard?seasontype=2&week= + weeknumber

Post Season
https://site.api.espn.com/apis/site/v2/sports/football/nfl/scoreboard?seasontype=3&week= + weeknumber

I use the following syntax for a date range, although it seems to work better if the second date is one day after the required date for a weekend's set of games (usually like a Thursday to Tuesday):

http://site.api.espn.com/apis/site/v2/sports/football/nfl/scoreboard?dates=YYYYMMDD-YYYYMMDD , where the first date in chronological order is first, and then the second date.

@ITIRadio
Copy link

for some reason the college basketball api only has limited data by default

@tonycarnevale You need to add the limit argument to ensure all games for a day are returned. I usually set limit to 363 as there will never be more than 363 D1 games in a day

Set groups equal to 50 to get all NCAA D1 games (regular season and conference tournaments). The postseason tournaments have different identifiers which unfortunately I can't recall at the moment.

I'm not sure about tournaments yet, but groups = 50 is all Division I, on given dates, so this should work throughout the remainder of the season & post-season:

http://site.api.espn.com/apis/site/v2/sports/basketball/mens-college-basketball/scoreboard?groups=50&limit=200&dates=YYYYMMDD-YYYYMMDD

with the dates in the desired range (though the second date, the latter, sometimes needs to be one day after the desired date). This syntax has worked all season so far, for every game involving a Division I team.

@ryanbuckner
Copy link

I use the following syntax for a date range, although it seems to work better if the second date is one day after the required date for a weekend's set of games (usually like a Thursday to Tuesday):

http://site.api.espn.com/apis/site/v2/sports/football/nfl/scoreboard?dates=YYYYMMDD-YYYYMMDD , where the first date in chronological order is first, and then the second date.

Where most sports are played on a daily basis, the NFL is played by week. I wasn't able to get the above syntax to work with the nfl feed. I also tried to plug in a year, and I still get back data from this season.

@RONJ0N
Copy link

RONJ0N commented Feb 14, 2023

is using this api illegal in any way? or is it just free range anybody can use it?

@opendoug
Copy link

opendoug commented Feb 14, 2023

For anyone needing JSON of NFL games, this URL seems to work:

http://site.api.espn.com/apis/site/v2/sports/football/nfl/summary?event= + {game ID}

@athleticmistud
Copy link

athleticmistud commented Feb 14, 2023 via email

@ryanbuckner
Copy link

for some reason the college basketball api only has limited data by default

@tonycarnevale You need to add the limit argument to ensure all games for a day are returned. I usually set limit to 363 as there will never be more than 363 D1 games in a day

I was able to get data for 63 games today with the following based on a few tips above

https://site.api.espn.com/apis/site/v2/sports/basketball/mens-college-basketball/scoreboard?groups=50&limit=500

@ryanbuckner
Copy link

I'm attempting to create a google sheet that can be used to update NCAA Mens Basketball scores in "real time" (upon refresh) using the APIs here and some tips in the comments. The goal is to have something that can be used for real time March Madness tracking.

I'm sharing it here for anyone interested in checking out my progress so far, and to give me ideas on improvement. Also happy to grant access to anyone that wants to edit.

Here's the sheet :
https://docs.google.com/spreadsheets/d/1WMczLzQzibHglB_kksK4b5JksXDDitUAyw5Y1HXMjog/edit?usp=sharing

@todarko
Copy link

todarko commented Feb 28, 2023

Found a way not shown above that will pull back a single teams full schedule of games:

http://site.api.espn.com/apis/site/v2/sports/basketball/nba/teams/:teamid/schedule

@daverz06
Copy link

daverz06 commented Mar 4, 2023

I'm attempting to create a google sheet that can be used to update NCAA Mens Basketball scores in "real time" (upon refresh) using the APIs here and some tips in the comments. The goal is to have something that can be used for real time March Madness tracking.

I'm sharing it here for anyone interested in checking out my progress so far, and to give me ideas on improvement. Also happy to grant access to anyone that wants to edit.

Here's the sheet : https://docs.google.com/spreadsheets/d/1WMczLzQzibHglB_kksK4b5JksXDDitUAyw5Y1HXMjog/edit?usp=sharing

You sir are a godsend. Love your work. It has helped me greatly with my NFL and now soon to be March Madness pickems. QUESTION... what would the script code look like to "freeze" the odds at say 8 am? Really appreciate your help!

@mark-perry-tfs
Copy link

mark-perry-tfs commented Mar 7, 2023

How do you see player stats from games? When I do a summary API call statistics is blank? NFL is fine.. Its the XFL API that is blank

@jeremyshultz
Copy link

I'm attempting to create a google sheet that can be used to update NCAA Mens Basketball scores in "real time" (upon refresh) using the APIs here and some tips in the comments. The goal is to have something that can be used for real time March Madness tracking.

I'm sharing it here for anyone interested in checking out my progress so far, and to give me ideas on improvement. Also happy to grant access to anyone that wants to edit.

Here's the sheet : https://docs.google.com/spreadsheets/d/1WMczLzQzibHglB_kksK4b5JksXDDitUAyw5Y1HXMjog/edit?usp=sharing

VERY nicely done! Is there any possible way that you’d be able to add URLs to the team logos in the live score tab? Like an Away Logo URL and Home Logo URL?

@bobgodwin
Copy link

I don't really do basketball, but this might be a starting point for somebody that does:
Day:
http://site.api.espn.com/apis/site/v2/sports/basketball/mens-college-basketball/scoreboard?dates=20230316
Round:
http://site.api.espn.com/apis/site/v2/sports/basketball/mens-college-basketball/scoreboard?dates=20230316-20230318&limit=32
For some reason, the second date has to be one day later.
But I have no idea what determines which side of the brackets the teams go or how seeding works.

@chisox721
Copy link

Shot in the dark here, does anyone know if you can retrieve NCAAB rosters for previous years? I'm working on a large project and the only attribute I haven't been able to get for inactive players is weight. Worst case scenario I'll have to write another parser for the sports reference site but that leads to another set of issues w/ associating ID's which I'd love to avoid.

@cermuel
Copy link

cermuel commented Apr 3, 2023

What's the endpoint to get soccer players not jus their teams

@peteywhit
Copy link

@cermuel you can add ?enable=roster at the end of the url and the players will be under athletes.

For instance, if you're looking at Atlanta United FC in MLS, then your url would be:
http://site.api.espn.com/apis/site/v2/sports/soccer/{usa.1}/teams/{18418}?enable=roster

The two items in brackets are based on which league and team you're looking at.

image
image

@cermuel
Copy link

cermuel commented Apr 12, 2023

@cermuel you can add ?enable=roster at the end of the url and the players will be under athletes.

For instance, if you're looking at Atlanta United FC in MLS, then your url would be: http://site.api.espn.com/apis/site/v2/sports/soccer/{usa.1}/teams/{18418}?enable=roster

The two items in brackets are based on which league and team you're looking at.

image image

Thank you so much. This just made my project a lot better

@kgdiem
Copy link

kgdiem commented Apr 15, 2023

@tango2590
Copy link

Nascar is no longer available, but here is an example endpoint for Formula 1: https://site.api.espn.com/apis/site/v2/sports/racing/f1/scoreboard

Does anyone know the nascar/F1 API call?

Here are the API endpoints for NASCAR and F1:
https://site.api.espn.com/apis/site/v2/sports/racing/nascar-premier/news
https://site.api.espn.com/apis/site/v2/sports/racing/nascar-premier/scoreboard
https://site.api.espn.com/apis/site/v2/sports/racing/f1/news
https://site.api.espn.com/apis/site/v2/sports/racing/f1/news

Can't seem to find one for IndyCar though, which is unfortunate.

@chrisblakley
Copy link

@PIC954
Copy link

PIC954 commented Apr 18, 2023

For MMA:

http://site.api.espn.com/apis/site/v2/sports/mma/ufc/news https://site.api.espn.com/apis/site/v2/sports/mma/ufc/scoreboard

Still trying to work out how to load an individual fight

anyshot you were able to figure this out?

@kgdiem
Copy link

kgdiem commented Apr 18, 2023 via email

@jacobprice-808
Copy link

Does anyone know if you can access their play-by-play data? And how many requests you can make before they limit you?

@opendoug
Copy link

opendoug commented Apr 20, 2023

For MMA:
http://site.api.espn.com/apis/site/v2/sports/mma/ufc/news https://site.api.espn.com/apis/site/v2/sports/mma/ufc/scoreboard
Still trying to work out how to load an individual fight

anyshot you were able to figure this out?

If you look at the response object provided by your scoreboard URL, you'll see that you get a list of event objects with URLs. If you modify an event URL to use espn.com rather than espn.pvt (not sure why you got the .pvt in the first place), you get a URL to the event JSON:

http://sports.core.api.espn.com/v2/sports/mma/leagues/ufc/events/600030732

The URL above returns the event details for "UFC Fight Night: Pavlovich vs. Blaydes".

From events, you can then get a list of competitions, which are the unique fights. Each competition has a unique ID that can be requested for more information about the specific fight. Competitions have competitors. And then competitors have statistics. The final endpoint would look like this:

http://sports.core.api.espn.com/v2/sports/mma/leagues/ufc/events/600029512/competitions/401525107/competitors/4285679/statistics

@mattbwin
Copy link

mattbwin commented Apr 22, 2023

I also discovered on the /teams urls it limits the output to 50 rows. However, you can use &page=1 &page=2 etc to get all the data. For example http://site.api.espn.com/apis/site/v2/sports/football/college-football/teams. Mostly it'll return an empty resultset if you are past the last page, but this isn't always the case. I had to check for empty, plus check to see if the 1st entry was the same as the previous request to know if I had all the pages.

@peteywhit
Copy link

I also discovered on the /teams urls it limits the output to 50 rows. However, you can use &page=1 &page=2 etc to get all the data. For example http://site.api.espn.com/apis/site/v2/sports/football/college-football/teams. Mostly it'll return an empty resultset if you are past the last page, but this isn't always the case. I had to check for empty, plus check to see if the 1st entry was the same as the previous request to know if I had all the pages.

You can use http://site.api.espn.com/apis/site/v2/sports/football/college-football/teams?limit=1000 and see all 771 D1, D2 and D3 teams. You can also use ?enable=groups to see the teams in their respective conference and division (although it doesn't show all conferences for some reason), or you can use ?enable=groups&groups=80 to list each D1 conference/divisions with their teams. This can actually be used with all the sports.

@jhubert41
Copy link

Hello, I was wondering if anyone is able to provide player and player stats info for baseball similar to the team info below:
http://site.api.espn.com/apis/site/v2/sports/baseball/mlb/teams
I tried a few things, but it did not work
http://site.api.espn.com/apis/site/v2/sports/baseball/mlb/players
http://site.api.espn.com/apis/site/v2/sports/baseball/mlb/player

any help is appreciated thank you!

@veller
Copy link

veller commented May 1, 2023

first of, this is amazing. I can finally play around soccer data just for fun. thanks for putting this together 🥇

question: how to retrieve data for a specific soccer athlete? I would like to know their last goal scored and other statistics.

@arxkdev
Copy link

arxkdev commented May 5, 2023

Anyone have a API link for a specific matchId with the home form & away form included?

@pseudo-r
Copy link

Hey folks! I didn't want to mess with the original creator's work, but I went ahead and created a new branch with some juicy info on how you can use the public ESPN API. Check it out and let me know what you think

https://github.com/pseudo-r/Public-ESPN-API/blob/main/README.md

@danmarcoux
Copy link

I notice that most sports list the schedule sorted with the earliest game first, for example MLB (so chronological order):
http://site.api.espn.com/apis/site/v2/sports/baseball/MLB/teams/ATL/schedule

But MLS (and maybe all soccer leagues) list the schedule with the latest game first (reverse-chronological order):
http://site.api.espn.com/apis/site/v2/sports/soccer/usa.1/teams/18418/schedule

Anyone have any ideas how to specify a sort order? I could code for MLS, but I would hate to think what would happen if NFL, for example, suddenly "flipped".

@famictech2000
Copy link

famictech2000 commented May 14, 2023

@danmarcoux
Copy link

There is probably some easier way to get the current schedule, but I use a two step process.
First I get a list of teams - (I use the team "id")
http://site.api.espn.com/apis/site/v2/sports/football/nfl/teams

Then I get the schedule for each team:
http://site.api.espn.com/apis/site/v2/sports/football/NFL/teams/{teamID}/schedule

Arizona Cardinals, for example, team ID is 22:
http://site.api.espn.com/apis/site/v2/sports/football/NFL/teams/22/schedule

(Preseason games have not been annouced yet, so the call only returns the regular season games.)

@bhays
Copy link

bhays commented May 16, 2023

How do you get the new NFL schedule?

You can get the 2023 schedule by adding the parameter dates with value 2023 to the query string and then going week-by-week.

For example, week 2 for 2023 is:
https://site.api.espn.com/apis/site/v2/sports/football/nfl/scoreboard?seasontype=2&week=2&dates=2023

@c0nt4x
Copy link

c0nt4x commented May 17, 2023

Does anyone know how to get English football (soccer) leagues other than the Premier League, i.e. Championship, League 1 etc?

Also, maybe a way to redirect to the ESPN.co.uk API instead of ESPN.com?

@stern1978
Copy link

stern1978 commented May 17, 2023 via email

@c0nt4x
Copy link

c0nt4x commented May 17, 2023

Thanks for that @stern1978

I have tried to add that via the GUI by creating a custom instance, adding 'soccer' as the sport and 'eng.5' as the path. Hopefully I've done it right and it will work. I'm not 100% though as the season has ended so I wouldn't expect to see any data, so may have to wait until the new season.

@danmarcoux
Copy link

danmarcoux commented May 19, 2023

FYI: You can access the last version of the ESPN Developer Center (which contains pretty much all of the documentation for the API) usng the Wayback Machine.

https://web.archive.org/web/20230103184142/https://www.espn.com/apis/devcenter/docs/

@acedriven
Copy link

Howdy y'all - just wanted to (hopefully not spam everyone!) say thanks for this thread + all the work you've done. Spent a lot of time searching for golf API info, and this thread has been fantastic for that, but also gave me other ideas for other sports I follow!

@athleticmistud
Copy link

athleticmistud commented May 23, 2023 via email

@athleticmistud
Copy link

athleticmistud commented May 23, 2023 via email

@athleticmistud
Copy link

athleticmistud commented May 23, 2023 via email

@MattWIP
Copy link

MattWIP commented May 31, 2023

Has anyone tested this for the Tennis endpoints? I can't seem to get the french open

EDIT: Partially found this using the link above from the wayback machine - but still cant retrieve individual players from the endpoints.

@bmarkovic17
Copy link

bmarkovic17 commented Jun 2, 2023

Does anyone has any idea why ESPN doesn't return any events for the new CFL season? It worked for the previous one. Here are the URLs that I've used which are basically the same, just the dates parameter has a different value:

  1. 2022
  2. 2023

EDIT: In case someone else is wondering about this, it seems that ESPN has moved their CFL scores/schedule to a partially owned subsidiary, The Sports Network. The schedule is provided by Bell Media and here is an example of a request to fetch the first week schedule.

@PIC954
Copy link

PIC954 commented Jun 17, 2023

does anybody have the url for NFL/NHL/MLB scoreboard/standings?

@emalineg
Copy link

does anyone have the api endpoints for esports news?

@jb082005
Copy link

jb082005 commented Jul 5, 2023

Finally looking into tennis endpoints and it was a little complicated. Here's what I found.

Matches by tournament - event ID and year (Wimbledon is 188) in the url. I added a limit since it was defaulting to 25
https://sports.core.api.espn.com/v2/sports/tennis/leagues/atp/events/188-2023/competitions?limit=500

Player page - year and athlete ID in url (296 is Djokovic)
http://sports.core.api.espn.com/v2/sports/tennis/leagues/all/seasons/2023/athletes/296

From this link, you should be able to get to his competitions (matches), events, stats, and ranking

@trevordowdle
Copy link

I also discovered on the /teams urls it limits the output to 50 rows. However, you can use &page=1 &page=2 etc to get all the data. For example http://site.api.espn.com/apis/site/v2/sports/football/college-football/teams. Mostly it'll return an empty resultset if you are past the last page, but this isn't always the case. I had to check for empty, plus check to see if the 1st entry was the same as the previous request to know if I had all the pages.

You can use http://site.api.espn.com/apis/site/v2/sports/football/college-football/teams?limit=1000 and see all 771 D1, D2 and D3 teams. You can also use ?enable=groups to see the teams in their respective conference and division (although it doesn't show all conferences for some reason), or you can use ?enable=groups&groups=80 to list each D1 conference/divisions with their teams. This can actually be used with all the sports.

@peteywhit

Thanks for this, how did you figure out you could do enable=groups, I haven't seen that documented anywhere else on the internet.. It's too bad it doesn't show all the conferences.. In fact when using groups=80 it only returns 8 groups comprising 4 d1 conferences east and west divisions. Maybe it's only returning conferences that are split into east and west divisions? Would love to experiment with other parameters. Wondering if you know a way to identify all the parameters an api endpoint supports.

Thanks

@peteywhit
Copy link

@trevordowdle

Lol, I spent a ton of time trying different endpoints to find everything I needed for my scoreboard.

I do believe that was before I found this endpoint and headers to find all of the conferences and their divisions with their standings. I then started pulling the teams from this data since it was already broken up by conferences & divisions.

And this works for all major sports on ESPN's site and you can add the group=# tag if you want to isolate it to a specific conference or division using the respective code.

NCAAF: https://site.web.api.espn.com/apis/v2/sports/football/college-football/standings?level=3
NFL: https://site.web.api.espn.com/apis/v2/sports/football/nfl/standings?level=3
NHL: https://site.web.api.espn.com/apis/v2/sports/hockey/nhl/standings?level=3
MLB: https://site.web.api.espn.com/apis/v2/sports/baseball/mlb/standings?level=3
MLS: https://site.web.api.espn.com/apis/v2/sports/soccer/usa.1/standings?level=3
NBA: https://site.web.api.espn.com/apis/v2/sports/basketball/nba/standings?level=3
Premiere League: https://site.web.api.espn.com/apis/v2/sports/soccer/eng.1/standings?level=3
NCAABasketball: https://site.web.api.espn.com/apis/v2/sports/basketball/mens-college-basketball/standings?level=3

I started off with riffnshred's NHL LED Scoreboard, which uses NHL's api, and went down the rabbit hole after that lol.

ESPN used to have a dev center that was still online when I started, but now you have to use the wayback machine to view it.
Almost everything has changed, but you can get ideas of different keywords to try in different ways to find what works.

Here are some links:
https://web.archive.org/web/20221219013531/http://www.espn.com/apis/devcenter/overview.html
https://web.archive.org/web/20210419221640/https://www.espn.com/apis/devcenter/docs/scores.html
https://gist.github.com/nntrn/ee26cb2a0716de0947a0a4e9a157bc1c

@trevordowdle
Copy link

@peteywhit

Wow this is great, thanks for sharing those additional urls, that's a relief and time saver. And for the insights regarding the dev center that used to exist and the resources you provided to that.

Very much appreciate your prompt response.

@BataBoom
Copy link

anybody figured out the nba-summer-league endpoint? Awesome thread btw, come here regularly x) thanks!

@wazhar01
Copy link

How do I get newly scheduled 2023 data?

@AadityaBorse26
Copy link

Is the API endpoint for specific NFL teams updated? Right now it shows the Chargers as playing in Carson, CA in Dignity Health Sports Park instead of SoFi Stadium in Inglewood, CA

@ascheer90
Copy link

ascheer90 commented Jul 30, 2023

so full transparency, complete novice here, so bear with me.

First, friend suggests that I might need an access key to utilize the API, and I trust that information as he is a developer, but it would appear as of others in this thread have worked around this, so I am seeking advice!

I am putting together a private app for myself and my podcast co-host that is focused around a singular conference and all its sports. I am creating various sections (Live scores, News, Standings) and these are my issues so far:

When I try to use the scoreboard, it doesn't return anything for any of the teams. I want to narrow this down to a specific conference, is there a way to do that? This is the API i was using, but even with the full CFB scoreboard, it doesn't load anything (https://site.api.espn.com/apis/site/v2/sports/football/college-football/scoreboard). I am certain its just a code error, but in the off chance its not, some suggestions would be ideal.

Second, I am trying to import standings by sport in the standings page. When imported into my code, it just shows "loading..." on my test model of it. Here is the API I am using (https://site.api.espn.com/apis/site/v2/sports/football/college-football/standings?group=15)

Part of me wonders if I am just calling the data incorrectly, or if I am using the wrong API information.

I have attached the screenshots of the build, and can provide code if needed

IMG_9378

IMG_9377

@jb082005
Copy link

jb082005 commented Aug 2, 2023

Any tips on how to get the latest data from : https://site.api.espn.com/apis/site/v2/sports/football/nfl/scoreboard

@ryanbuckner You can add ?week=1 and so on to pull games for specific weeks. The scoreboard link above has the week 1 games loaded as events. You can find the team under events > competitions > competitors

@ryanbuckner
Copy link

ryanbuckner commented Aug 2, 2023

Any tips on how to get the latest data from : https://site.api.espn.com/apis/site/v2/sports/football/nfl/scoreboard

@ryanbuckner You can add ?week=1 and so on to pull games for specific weeks. The scoreboard link above has the week 1 games loaded as events. You can find the team under events > competitions > competitors

I was able to get this year's data by adding &dates=2023

https://docs.google.com/spreadsheets/d/1UXkooRGu1f-bzKtlHpupG4Z9rCQEl6jTWy3Nlx9OFBU/edit?usp=sharing

@chrisblakley
Copy link

This is sort of a tangential question, so apologies for that, but anyone who is using this API in JavaScript are you running into browser memory issues? I'm updating my feed every few minutes, but after a while of running I notice that my browser memory usage grows and grows. In DevTools it is indicating that it is related to the way I'm storing the data in objects that probably isn't allowing the garbage collection to run (even though I've tried several different methods to do so).

I'm not looking for anyone to debug my code, but I'm curious what general approaches others are taking with this feed specifically. Any thoughts are appreciated and sorry again for the slight tangent.

@leea99
Copy link

leea99 commented Aug 19, 2023

Does anyone know how to get CFB standings for FCS and Divison II/III?

@lpiedade69
Copy link

endpoints para ver as seleºões femininas, por exemplo a liga portuguesa feminina.

@jshef16
Copy link

jshef16 commented Aug 29, 2023

I'm looking to pull all NFL scores for the current week, but I don't know when the API updates to the next week's matchups. I know it happens pretty quick, but I need my script to fire before it updates. Does anyone know when the week changes?

@ryanbuckner
Copy link

ryanbuckner commented Aug 29, 2023 via email

@tomcat8994
Copy link

@reidwatson
Copy link

Why doesn't it show all the college football games? Both https://sports.core.api.espn.com/v2/sports/football/leagues/college-football/events and https://site.api.espn.com/apis/site/v2/sports/football/college-football/scoreboard only show 23 games but you can clearly see for week 2 there is much more: https://www.espn.com/college-football/schedule/_/week/2

See this link from last year. You gotta pass in a “group” param to get all FBS. By default it just returns top 25 games.

https://gist.github.com/akeaswaran/b48b02f1c94f873c6655e7129910fc3b?permalink_comment_id=4284742#gistcomment-4284742

@tomcat8994
Copy link

Why doesn't it show all the college football games? Both https://sports.core.api.espn.com/v2/sports/football/leagues/college-football/events and https://site.api.espn.com/apis/site/v2/sports/football/college-football/scoreboard only show 23 games but you can clearly see for week 2 there is much more: https://www.espn.com/college-football/schedule/_/week/2

See this link from last year. You gotta pass in a “group” param to get all FBS. By default it just returns top 25 games.

https://gist.github.com/akeaswaran/b48b02f1c94f873c6655e7129910fc3b?permalink_comment_id=4284742#gistcomment-4284742

Interesting - you would think the page count would be more than one without specifying the group {"$meta":{"parameters":{"week":["2"],"groups":[""],"season":["2023"],"seasontypes":["2"]}},"count":23,"pageIndex":1,"pageSize":25,"pageCount":1,"items":[

@reidwatson
Copy link

Why doesn't it show all the college football games? Both https://sports.core.api.espn.com/v2/sports/football/leagues/college-football/events and https://site.api.espn.com/apis/site/v2/sports/football/college-football/scoreboard only show 23 games but you can clearly see for week 2 there is much more: https://www.espn.com/college-football/schedule/_/week/2

See this link from last year. You gotta pass in a “group” param to get all FBS. By default it just returns top 25 games.
https://gist.github.com/akeaswaran/b48b02f1c94f873c6655e7129910fc3b?permalink_comment_id=4284742#gistcomment-4284742

Interesting - you would think the page count would be more than one without specifying the group {"$meta":{"parameters":{"week":["2"],"groups":[""],"season":["2023"],"seasontypes":["2"]}},"count":23,"pageIndex":1,"pageSize":25,"pageCount":1,"items":[

You can also pass in a “limit” param to get more in your results. Like ‘&limit=200’

@seanrco
Copy link

seanrco commented Sep 11, 2023

Anyone know if there is a way to view the endpoint json schemas? For example, would like to view the json schema for College Football Team (http://site.api.espn.com/apis/site/v2/sports/football/college-football/teams/:team). Reasoning for this I am using Paste Special > JSON to create models for a C# application. Depending on team I noticed not all JSON objects and keys maybe be present at time of loading the JSON result. Ideally they would have a schema that models full JSON result.

@BataBoom
Copy link

Anyone know if there is a way to view the endpoint json schemas? For example, would like to view the json schema for College Football Team (http://site.api.espn.com/apis/site/v2/sports/football/college-football/teams/:team). Reasoning for this I am using Paste Special > JSON to create models for a C# application. Depending on team I noticed not all JSON objects and keys maybe be present at time of loading the JSON result. Ideally they would have a schema that models full JSON result.

https://site.api.espn.com/apis/site/v2/sports/football/nfl/seasons/2023/teams/29?lang=en&region=us

@seanrco
Copy link

seanrco commented Sep 16, 2023

@BataBoom Thanks, for informing about the seasons endpoint, but was not what I was looking for. For those wondering @BataBoom added that can hit:

https://site.api.espn.com/apis/site/v2/sports/football/college-football/seasons/2023/teams/2305?lang=en&region=us

Instead of:

https://site.api.espn.com/apis/site/v2/sports/football/college-football/teams/2305

The first endpoint provides extended next event information (full season).

What I am trying to find out is if it is possible to load the JSON schemas directly which normally gives the model results. This is normally outlined in the following header:

Q5qGitZEtY

But if you try loading https://site.api.espn.com/teamSummary.json get a 403 Forbidden. Either I am trying to load incorrect URL or they just have it blocked...

@MakenoiseMedia
Copy link

MakenoiseMedia commented Sep 17, 2023

Hey there folks,

I've been working with these endpoints quite a bit recently and built a couple of APIs that build upon/work well with these ESPN endpoints. I know plenty of people are asking around for additional endpoints so I just thought I'd drop this here and hopefully help a few of y'all out. If you need featured news, additional league news, live scores, box scores, upcoming events, expanded leagues, teams, etc., come check them out at: https://rapidapi.com/makenoise-media-makenoise-media-default/api/score-room

Capture d’écran 2023-09-17 à 1 44 12 AM

I'm always adding new features and endpoints and I'm around to help with any questions if you have them!

Cheers!
:)

@bobgodwin
Copy link

bobgodwin commented Sep 18, 2023

It's football time again so I'm putting up some links to some of the ESPN/NFL stuff I've built. It's part of my online football pool updated to not use any of my stored data.
https://bigearthweb.com/football-espn/
Not a lot to it really. A few PHP files & classes that get data from ESPN, some jquery to fire navigation & loaders and CSS. It uses these end points:

http://site.api.espn.com/apis/site/v2/sports/football/nfl/scoreboard
https://site.web.api.espn.com/apis/v2/sports/football/nfl/standings?season=[year]&level=[level]
http://site.api.espn.com/apis/site/v2/sports/football/nfl/summary?event=[event_id]

This version just reads and formats data. The online version writes some of the current data to SQL and JSON. I've also included some tiny little logos because if a team no longer exists, ESPN doesn't have a logo for it (Or I can't find it). What it does is get whatever data it can for game stats (Team stats, Leader stats and Drives), standings and post season results from as far back as 1999 to the present. Here are the files if you're interested:
https://bigearthweb.com/football-espn/espn-football.7z

@RexStev
Copy link

RexStev commented Sep 22, 2023

Anyone got an API that I could get football highlights from?

@MakenoiseMedia
Copy link

MakenoiseMedia commented Sep 22, 2023

Anyone got an API that I could get football highlights from?

@RexStev Not sure exactly what you're looking for, but this may help. All types of stats, news, game/player info, etc. https://rapidapi.com/makenoise-media-makenoise-media-default/api/score-room.

@ryanbuckner
Copy link

Is there a way to get the NHL scores endpoint to return a range of dates rather than 1 day per call?

currently using: "http://site.api.espn.com/apis/site/v2/sports/hockey/nhl/scoreboard?limit=500&dates=" + day

@davidbti
Copy link

davidbti commented Sep 26, 2023 via email

@adrianv425
Copy link

This is awesome! Has anyone found anything regarding rugby scores? For example - the National Rugby League? I have yet to find anything.

NRL: https://site.api.espn.com/apis/site/v2/sports/rugby-league/3/scoreboard
RWC: https://site.api.espn.com/apis/site/v2/sports/rugby/164205/scoreboard

@krax13
Copy link

krax13 commented Sep 29, 2023

Hi all,
I want to make a dashboard about the our own Pigskin'em group.
Is there any API to use the Pick'em picks or group data?

Many thanks in advance for any thoughts.

@isaiahscheel
Copy link

isaiahscheel commented Sep 30, 2023

Current drive for college football?
I am trying to have a site get live data for a few different sports and one is college football. However when I use the following endpoint:
http://site.api.espn.com/apis/site/v2/sports/football/college-football/summary?event=401524023
And I am getting a really old current drive:

image

This is a drive from COLO from the start of the 3rd quarter but it is currently the strart of the 4th now:
image

Other data like possession, score, and stats are being updated but not the drives, both current and previous. Anyone else run into this?

@MakenoiseMedia
Copy link

MakenoiseMedia commented Sep 30, 2023

Current drive for college football? I am trying to have a site get live data for a few different sports and one is college football. However when I use the following endpoint: http://site.api.espn.com/apis/site/v2/sports/football/college-football/summary?event=401524023 And I am getting a really old current drive:

image

This is a drive from COLO from the start of the 3rd quarter but it is currently the strart of the 4th now: image

Other data like possession, score, and stats are being updated but not the drives, both current and previous. Anyone else run into this?

@isaiahscheel
I had to build my own API and endpoints because ESPN's old ones simply weren't cutting it. I actually saw your comment and decided to add the play-by-play endpoint to my API for folks to use. Hopefully, this helps :)

https://rapidapi.com/makenoise-media-makenoise-media-default/api/score-room (fetchPlayByPlay endpoint)

Let me know if it doesn't have what you're looking for and I'll see if I can include what you are!

@kyleskin
Copy link

Is there a way to get the NHL scores endpoint to return a range of dates rather than 1 day per call?

currently using: "http://site.api.espn.com/apis/site/v2/sports/hockey/nhl/scoreboard?limit=500&dates=" + day

Don't know if you still need help with this, but you can pass several options to dates:
yyyy to return the events for the year
yyyyMM to return the events for a year and month
yyyyMMdd to return the events for a specific year, month, and day
yyyyMMdd-yyyyMMdd to return the events in a range

@KvyatkovskyAleksey
Copy link

@ryanbuckner
Copy link

ryanbuckner commented Oct 24, 2023 via email

@ZacharySal
Copy link

Is there anyway to get addition article information with the data source identifier?

@ITIRadio
Copy link

ITIRadio commented Nov 2, 2023

Many of the previously listed URL's for endpoints are now dead. Having worked with the API for a couple of years (and this year's football API's for a couple of months), here is a summary of links that are still working, using the NFL as an example (fill in other sports & league names as mentioned above as necessary).

List of Teams
https://site.api.espn.com/apis/site/v2/sports/football/nfl/teams

Full Roster, the team_id is a 1 or 2-digit number found at the previous endpoint. (In the returned roster JSON, under athletes, the roster is divided up into offense, defense, and special teams, but no season statistics are supplied.) Don't include the brackets.
https://site.api.espn.com/apis/site/v2/sports/football/nfl/teams/[team_id]/roster

Team Schedule, scores only
https://site.api.espn.com/apis/site/v2/sports/football/nfl/teams/[team_id]/schedule

Team Total Statistics (other URL's either don't work, only provide circular links, give links back to espn.com, or return data with all 0's). Also note that the previously mentioned standings endpoints don't provide much either; the event calls still work (mentioned below).
https://site.api.espn.com/apis/site/v2/sports/football/nfl/teams/[team_id]/statistics

From a team's roster, get a player's 7-digit id (player_id), then receive this season's (2023) statistics for that player (change the year for different season totals). (League-wide rosters don't seem to be working, at least at the endpoints I tried.)
http://sports.core.api.espn.com/v2/sports/football/leagues/nfl/seasons/2023/types/2/athletes/[player_id]/statistics/

Player's career totals
http://sports.core.api.espn.com/v2/sports/football/leagues/nfl/athletes/[player_id]/statistics


I have concentrated on box scores, previews, and in-game scores for my projects (https://github.com/ITIRadio/ESPN-API/), rather than player & team total season statistics. However, to address some of the questions above, the API in general is not very fast to update, and is subject to slowing down significantly when receiving a lot of requests from an IP. As such, I try to get just one day's worth of box scores via the event calls at one time. I also generally only use the scoreboard call for games in-progress, or I don't make a lot of requests. I have never been able to even get close to the previously mentioned 2,500 calls in a day before receiving errors.

Other issues such as updating the timeouts remaining were only fixed this past week for NFL games in-progress (college games still don't work). I wouldn't expect drives in event calls to be fully updated for a couple of hours after the game.

The scoreboard call itself switches from yesterday's scores to today's schedule usually between 9 and 11 AM Eastern US time, for daily sports. For football, expect the week's scoreboard to switch at around the same time on Tuesdays for the NFL and Sundays for college. As such, I usually depend on supplying dates to my projects.

Current Scoreboard (for the given week for football)
http://site.api.espn.com/apis/site/v2/sports/football/nfl/scoreboard

Current Scoreboard for all College Division I games (group=80 is all conferences, maximum 200 games)
https://site.api.espn.com/apis/site/v2/sports/football/college-football/scoreboard?groups=80&limit=200

Scoreboard for all NFL games on a given date, in YYYYMMDD format (suggested to use 1 day at a time due to throttling issues, but use a range of dates, earlier date first, at your discretion)
http://site.api.espn.com/apis/site/v2/sports/football/nfl/scoreboard?dates=20231029-20231029

From a scoreboard call, use ['events'][game_number]['id'] to retrieve an event_id for a particular game. Then to receive full box score data either post-game or in-progress, or preview data before the game begins (also note that updated standings as usually provided in this call post-game):
http://site.api.espn.com/apis/site/v2/sports/football/nfl/summary?event=[event_id]

@aoddspotato
Copy link

aoddspotato commented Nov 7, 2023

Does anyone know how to return more than 100 college basketball games? http://site.api.espn.com/apis/site/v2/sports/basketball/mens-college-basketball/scoreboard?groups=50&limit=200 only returns the first 100 even including the group=50 (all div 1) and setting the limit higher than 100.

For example Idaho v Washington State (https://www.espn.com/mens-college-basketball/boxscore/_/gameId/401580926) is missing from the return.

@ischmidt20
Copy link

ischmidt20 commented Nov 7, 2023

@aoddspotato I always get all of the games for the day if I set the date parameter explicitly (YYYYMMDD format), along with the limit parameter and groups=50

@aoddspotato
Copy link

aoddspotato commented Nov 22, 2023

@aoddspotato I always get all of the games for the day if I set the date parameter explicitly (YYYYMMDD format), along with the limit parameter and groups=50

@ischmidt20 Can you provide an example for an explicit date? Im trying with dates and getting very short results or only games currently on scoreboard.

@dburk2
Copy link

dburk2 commented Nov 26, 2023

Anyone know how to get spreads/totals from the API? Seems like they might have been removed with ESPN Bet? Used to be in pickcenter object under the summary endpoint.

@akreu
Copy link

akreu commented Dec 6, 2023

Anyone find an endpoint to get stats by period, for example, NBA player points in 1-4 quarters or by half?

@Kulbir-Singh
Copy link

does anyone know if espn uses webhook to send updates ?

@Highlightly
Copy link

@RexStev if you are still looking for highlights API its worth checking https://highlightly.net/

@juniortotep
Copy link

anyone got recently working api for soccer?

@morris-choga
Copy link

@juniortotep i am. I recently implemented it in my project & its giving me some delayed status . How is it going for you so far

@tacrec
Copy link

tacrec commented Jan 30, 2024

Is there an endpoint for college softball?

@morris-choga
Copy link

Im not sure,

@zirelco
Copy link

zirelco commented Feb 3, 2024

Anyone implemented any of these in wordpress website? Any suggestions how to do it?

@Sergi0
Copy link

Sergi0 commented Feb 20, 2024

anyone know if it's possible to get team's results for all tournaments?
or at least get list of tournaments that team participates in

for example, this returns Serie A results for AC Milan
https://site.api.espn.com/apis/site/v2/sports/soccer/ita.1/teams/103/schedule

but I would like to get results like these:
https://www.espn.com/soccer/team/results/_/id/103/ita.ac_milan

with Coppa and Europa league

@acerbzzz
Copy link

Can someone tell me how I can get Australian football from the ESPN api. Just need to find the sport id name and league id etc. If someone could help would be amazing.

@carterjpilling
Copy link

carterjpilling commented Feb 25, 2024

Can someone tell me how I can get Australian football from the ESPN api. Just need to find the sport id name and league id etc. If someone could help would be amazing.

@acerbzzz
Here is a start https://sports.core.api.espn.com/v2/sports/australian-football/leagues/afl. At least you have the league and sport name. Using the rest of the params I'm sure you'll get it. GL

@jpalm42
Copy link

jpalm42 commented Mar 5, 2024

has anyone had success with api endpoints for ncaa basketball tournament brackets? I have found the format:

http://sports.core.api.espn.com/v2/sports/basketball/leagues/mens-college-basketball/tournaments/22/seasons/${season}/bracketology?

to work for years up until 2021, but 2022 and 2023 return empty

@badrbenhalima
Copy link

Is it possible to get realtime football scores ?

@marcbrigham
Copy link

Is it possible to get realtime football scores ?

I've only seen the scores in the schedule update when refreshing the endpoint. But I'd also love a realtime live scores endpoint as well.

@jrandallsexton
Copy link

jrandallsexton commented Mar 7, 2024

I've always felt that forces should be combined and have a service deployed that would perform the polling required to get the data, then publish that information via events (AWS SNS/SQS, Azure Service Bus, etc), so we don't overload their system - and they decide to simply take it offline due to costs.

@ITIRadio
Copy link

ITIRadio commented Mar 7, 2024

To respond to some questions above, first, I have found nothing for statistics by period, and I've looked.

As far as combining forces to avoid overuse, I'm not sure how much the general public uses this. They are so aggressive with their throttling, that I anyone who tries to access the API more than a couple of hundred times a day would not have much luck. For example, while you can get individual player stats, for the NFL for example, you wouldn't be able to update the stats of every skill player weekly before getting errors. You'd be better off running an event API call for each game & updating player stats on your own database.

Also, as I posted a couple of years back, ESPN.com is essentially a web app running in your browser (why it's soooo slow) that accesses the API to load the data onto a requested page, the list of current or past scores, a box score, a player's stats, etc. So, literally everyone who uses the site is using this API. The site just thinks I'm a fast clicker, in fact, the speed of the site is the most effective throttler for the general public. Otherwise, I don't have the money lying around to pay for some AWS BS.

As far as real time scores are concerned, the scoreboard calls are pretty current, such as for the NFL, http://site.api.espn.com/apis/site/v2/sports/football/nfl/scoreboard , which works nicely. If you have Python installed and are OK with using the command line, I have 6 sports now included in my project at https://github.com/ITIRadio/ESPN-API . In-progress scores are included. If you scroll back a little bit in these comments, another poster uses these scoreboard endpoints to copy over updated scores to a site at https://bigearthweb.net/sports/ .

@cardoprimo
Copy link

anyone know if it's possible to get team's results for all tournaments? or at least get list of tournaments that team participates in

for example, this returns Serie A results for AC Milan https://site.api.espn.com/apis/site/v2/sports/soccer/ita.1/teams/103/schedule

but I would like to get results like these: https://www.espn.com/soccer/team/results/_/id/103/ita.ac_milan

with Coppa and Europa league

You can use this format:
https://site.api.espn.com/apis/site/v2/sports/soccer/UEFA.EUROPA/teams/103/schedule
https://site.api.espn.com/apis/site/v2/sports/soccer/{competition}/teams/{teamId}/schedule

The competition codes come from selecting in dropdown on https://www.espn.com/soccer/team/results/_/id/103/ita.ac_milan

@winstonrc
Copy link

has anyone had success with api endpoints for ncaa basketball tournament brackets? I have found the format:

http://sports.core.api.espn.com/v2/sports/basketball/leagues/mens-college-basketball/tournaments/22/seasons/${season}/bracketology?

to work for years up until 2021, but 2022 and 2023 return empty

I found the following endpoint when looking at the requests made for this page: https://www.espn.com/mens-college-basketball/bracket

Endpoint: https://fcast.espncdn.com/FastcastService/pubsub/profiles/12000/topic/bracket-basketball-mens-college-basketball-22-en/message/24624/checkpoint

@ryanbuckner
Copy link

ryanbuckner commented Mar 21, 2024 via email

@winstonrc
Copy link

That format does allow for viewing today's games (e.g. https://data.ncaa.com/casablanca/scoreboard/basketball-men/d1/2024/03/21/scoreboard.json), but I don't see how it could be used to retrieve the bracket ahead of time before the NCAA tournament begins. Any insight?

@chisox721
Copy link

chisox721 commented Mar 24, 2024

That format does allow for viewing today's games (e.g. https://data.ncaa.com/casablanca/scoreboard/basketball-men/d1/2024/03/21/scoreboard.json), but I don't see how it could be used to retrieve the bracket ahead of time before the NCAA tournament begins. Any insight?

I haven't actually done this yet because I've been wrapped up in playbyplay data but my plan is to just recreate it based on what's in the json. All you need is ["bracketRegion"], ["bracketRound"], ["away"]["seed"], ["home"]["seed"]

@iko2000
Copy link

iko2000 commented Mar 25, 2024

I am fetching data from - http://site.api.espn.com/apis/site/v2/sports/soccer/eng.1/standings
the outcome is empty object, what can be a cause ?!

@marcbrigham
Copy link

I am fetching data from - http://site.api.espn.com/apis/site/v2/sports/soccer/eng.1/standings the outcome is empty object, what can be a cause ?!

You want to use https://site.api.espn.com/apis/site/v2/sports/soccer/eng.1/scoreboard instead. I'm not sure what your looking for in terms of data but this endpoint does work.

@jafaircl
Copy link

jafaircl commented Mar 27, 2024

While the college basketball tournament is going on, any team in the tournament will only return postseason results when you call https://site.api.espn.com/apis/site/v2/sports/basketball/mens-college-basketball/teams/{team}/schedule to get their schedule. To get their regular season schedule, append season and seasontype params (i.e. https://site.api.espn.com/apis/site/v2/sports/basketball/mens-college-basketball/teams/{team}/schedule?season=2024&seasontype=2) to get a different set of games. Seasontype 2 is regular season, 3 is postseason.

Rankings: https://site.api.espn.com/apis/site/v2/sports/basketball/mens-college-basketball/rankings

Standings: https://site.api.espn.com/apis/v2/sports/basketball/mens-college-basketball/standings

@iko2000
Copy link

iko2000 commented Mar 27, 2024

I am fetching data from - http://site.api.espn.com/apis/site/v2/sports/soccer/eng.1/standings the outcome is empty object, what can be a cause ?!

You want to use https://site.api.espn.com/apis/site/v2/sports/soccer/eng.1/scoreboard instead. I'm not sure what your looking for in terms of data but this endpoint does work.

I want to get possition of each time on table, like Liverpool - which position it is in premier league, how many points got and etc.

@stern1978
Copy link

I am fetching data from - http://site.api.espn.com/apis/site/v2/sports/soccer/eng.1/standings the outcome is empty object, what can be a cause ?!

You want to use https://site.api.espn.com/apis/site/v2/sports/soccer/eng.1/scoreboard instead. I'm not sure what your looking for in terms of data but this endpoint does work.

I want to get possition of each time on table, like Liverpool - which position it is in premier league, how many points got and etc.

You have to add ?season=xxxx. https://site.web.api.espn.com/apis/v2/sports/soccer/eng.1/standings?season=2023

@D00pN00dle
Copy link

Could anyone help me out with the possible values of game states? Is there a list somewhere I'm missing?

@bhays
Copy link

bhays commented Apr 10, 2024

I've never seen an exhaustive list, but I have found the following:

  • STATUS_SCHEDULED
  • STATUS_IN_PROGRESS
  • STATUS_END_PERIOD
  • STATUS_HALFTIME
  • STATUS_POSTPONED
  • STATUS_FINAL

@D00pN00dle
Copy link

I've never seen an exhaustive list, but I have found the following:

  • STATUS_SCHEDULED
  • STATUS_IN_PROGRESS
  • STATUS_END_PERIOD
  • STATUS_HALFTIME
  • STATUS_POSTPONED
  • STATUS_FINAL

Thank you! I believe STATUS_CANCELLED is also one of them. Do you know the id for each status? End period and halftime in particular.

@bhays
Copy link

bhays commented Apr 11, 2024

I don't know the ids but you should be able to find them. There's an id key alongside name in competitions->status->type.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment