Skip to content

Instantly share code, notes, and snippets.

@akeaswaran
Last active April 2, 2025 03:08
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 Feb 28, 2025

To get March Madness scores and schedules I've found it actually easier to use https://data.ncaa.com/casablanca/scoreboard/basketball-men/d1/{DATE}/scoreboard.json and filter on the games that are returned with a non-null game['bracketRound'].

Unfortunately no data is populated until mid March. Not even dates and TBDs.

Is there any easy way to get this data from ESPN too? I know this topic comes up each year at this time.

@daniyalmaster693
Copy link

Is there an endpoint just for all stats, like just to get all skater stats or goalie stats

@propsdaily
Copy link

Is there an endpoint just for all stats, like just to get all skater stats or goalie stats

I don't believe so (someone correct me if I'm wrong.. but you would most likely need to drill down your query a bit more.

@cmwillett
Copy link

Did anyone figure out how to get the ncaa tournament games? I'm still struggling. I know how to get the scoreboard, but unable to return ncaa tournament results.

@ryanbuckner
Copy link

ryanbuckner commented Mar 13, 2025 via email

@cmwillett
Copy link

I use this endpoint but it's empty until selection sunday https://data.ncaa.com/casablanca/scoreboard/basketball-men/d1/{date}/ scoreboard.json

On Wed, Mar 12, 2025 at 9:08 PM cmwillett @.> wrote: @.* commented on this gist. ------------------------------ Did anyone figure out how to get the ncaa tournament games? I'm still struggling. I know how to get the scoreboard, but unable to return ncaa tournament results. — Reply to this email directly, view it on GitHub https://gist.github.com/akeaswaran/b48b02f1c94f873c6655e7129910fc3b#gistcomment-5488884 or unsubscribe https://github.com/notifications/unsubscribe-auth/AANTBKJKG5QZZMONWVKSXPL2UDLAPBFKMF2HI4TJMJ2XIZLTSKBKK5TBNR2WLJDUOJ2WLJDOMFWWLO3UNBZGKYLEL5YGC4TUNFRWS4DBNZ2F6YLDORUXM2LUPGBKK5TBNR2WLJDHNFZXJJDOMFWWLK3UNBZGKYLEL52HS4DFVRZXKYTKMVRXIX3UPFYGLK2HNFZXIQ3PNVWWK3TUUZ2G64DJMNZZDAVEOR4XAZNEM5UXG5FFOZQWY5LFVA4DGOBXGIZTEMVHORZGSZ3HMVZKMY3SMVQXIZI . You are receiving this email because you commented on the thread. Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub .

Ryan, what format do you put the date in?

@ryanbuckner
Copy link

Ryan, what format do you put the date in?

Today would be:
https://data.ncaa.com/casablanca/scoreboard/basketball-men/d1/2025/03/13/scoreboard.json

From there I check the games for game['bracketRound'] values. If there is a value there it's a part of a tourney.

@cmwillett
Copy link

Ryan, what format do you put the date in?

Today would be: https://data.ncaa.com/casablanca/scoreboard/basketball-men/d1/2025/03/13/scoreboard.json

From there I check the games for game['bracketRound'] values. If there is a value there it's a part of a tourney.

Okay, thanks Ryan - I'll give this a whirl this coming Sunday night/Monday morning.

@ryanbuckner
Copy link

Okay, thanks Ryan - I'll give this a whirl this coming Sunday night/Monday morning.

Here's a working version from last year. All the code should be there to get you started.

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

@cmwillett
Copy link

Okay, thanks Ryan - I'll give this a whirl this coming Sunday night/Monday morning.

Here's a working version from last year. All the code should be there to get you started.

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

That won't let me view the code, but it's all good. I already pulled it back using last year's dates and have the data. I appreciate it!

@bhays
Copy link

bhays commented Mar 13, 2025

If you query with a date range, you can get the scheduled games. This does include all college basketball games, but it does have the tournament games. For example: https://site.api.espn.com/apis/site/v2/sports/basketball/mens-college-basketball/scoreboard?dates=20250320-20250323&groups=50&limit=500

@cmwillett
Copy link

If you query with a date range, you can get the scheduled games. This does include all college basketball games, but it does have the tournament games. For example: https://site.api.espn.com/apis/site/v2/sports/basketball/mens-college-basketball/scoreboard?dates=20250320-20250323&groups=50&limit=500

Got ya. That makes sense as well. I'm sure there's an element stating it's a tourney game in there.

@ryanbuckner
Copy link

ryanbuckner commented Mar 13, 2025 via email

@jb082005
Copy link

I wasn't able to find a tournament indicator in the ESPN endpoint. Let me know if you find one.

On Thu, Mar 13, 2025 at 12:02 PM cmwillett @.> wrote: @.* commented on this gist. ------------------------------ If you query with a date range, you can get the scheduled games. This does include all college basketball games, but it does have the tournament games. For example: https://site.api.espn.com/apis/site/v2/sports/basketball/mens-college-basketball/scoreboard?dates=20250320-20250323&groups=50&limit=500 Got ya. That makes sense as well. I'm sure there's an element stating it's a tourney game in there. —

I believe you can use groups=100 for NCAA tournament games

@ryanbuckner
Copy link

ryanbuckner commented Mar 13, 2025 via email

@bhays
Copy link

bhays commented Mar 13, 2025

Seeding will show up under rank for home and away.

@daverz06
Copy link

Seeding will show up under rank for home and away.

IMG_0526
IMG_0525

Obviously all depends on what you ultimately want to do with it. Here’s a couple of screen shots on how I make it work. I load tomorrow’s games on one sheet (attached). The far right column has check boxes. I manually select the ncaa tourney games and or games I want. I then run a script to lock those games and odds to a second sheet (attached). The teams and odds are stagnant. Then I pull the live data ie score clock etc with a vlookup.

@limFakson
Copy link

How can i get api for live streaming sports video matches ??

@dnywh
Copy link

dnywh commented Mar 14, 2025

Thanks for this!

Does anyone know if ESPN's API supports a query parameter like fields= to reduce response size?

I'm only interested in basic game info over a date range, like team names, kick-off time, scores. The /scoreboard request otherwise returns a lot of heft and is quite a big payload as a result.

@cmwillett
Copy link

@ryanbuckner , do you know if there's a way to put a date range into the ncaa api url? I'd like to be able to pull all of this weekend's games.
https://data.ncaa.com/casablanca/scoreboard/basketball-men/d1/2025/03/20/scoreboard.json

@chisox721
Copy link

I see a tournamentId. Maybe that can be helpful. Id = 22 in some of these TBD games. If the seed shows up and the round we can use it. I see a ["notes"] key where they have "Men's Basketball Championship - 1st Round"

On Thu, Mar 13, 2025 at 12:39 PM jb082005 @.> wrote: @.* commented on this gist. ------------------------------ I wasn't able to find a tournament indicator in the ESPN endpoint. Let me know if you find one. … <#m_-3902739222069110977_> On Thu, Mar 13, 2025 at 12:02 PM cmwillett @.*> wrote: @.** commented on this gist. ------------------------------ If you query with a date range, you can get the scheduled games. This does include all college basketball games, but it does have the tournament games. For example: https://site.api.espn.com/apis/site/v2/sports/basketball/mens-college-basketball/scoreboard?dates=20250320-20250323&groups=50&limit=500 Got ya. That makes sense as well. I'm sure there's an element stating it's a tourney game in there. — I believe you can use groups=100 for NCAA tournament games — Reply to this email directly, view it on GitHub https://gist.github.com/akeaswaran/b48b02f1c94f873c6655e7129910fc3b#gistcomment-5490654 or unsubscribe https://github.com/notifications/unsubscribe-auth/AANTBKNNZIKLTTG4XLI6BJD2UGYDHBFKMF2HI4TJMJ2XIZLTSKBKK5TBNR2WLJDUOJ2WLJDOMFWWLO3UNBZGKYLEL5YGC4TUNFRWS4DBNZ2F6YLDORUXM2LUPGBKK5TBNR2WLJDHNFZXJJDOMFWWLK3UNBZGKYLEL52HS4DFVRZXKYTKMVRXIX3UPFYGLK2HNFZXIQ3PNVWWK3TUUZ2G64DJMNZZDAVEOR4XAZNEM5UXG5FFOZQWY5LFVA4DGOBXGIZTEMVHORZGSZ3HMVZKMY3SMVQXIZI . You are receiving this email because you commented on the thread. Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub .

This may help

http://sports.core.api.espn.com/v2/sports/basketball/leagues/mens-college-basketball/events/401746030/competitions/401746030?lang=en&region=us

b
a

@chisox721
Copy link

Thanks for this!

Does anyone know if ESPN's API supports a query parameter like fields= to reduce response size?

I'm only interested in basic game info over a date range, like team names, kick-off time, scores. The /scoreboard request otherwise returns a lot of heft and is quite a big payload as a result.

I've only come across that type of functionality when working with the MLB api. Is your main concern the time to complete or just the hassle of dealing with a heavily nested json?

@psam034
Copy link

psam034 commented Mar 25, 2025

Just wondering if anyone knew of anyway to get specific player stats for college basketball?

@DhairyaTKN
Copy link

Screenshot 2025-03-27 111326

Kindly refer to the screenshot which reflects a play/Action in Basketball Game. Here you can see under co-ordinates (x, y) are given helpful in determining the position of the action made.

Similarly in football how can we figure out the position of the action made on the field. Are there some params that may assist in doing so ?

Also there is no information about the participants id who were involved in that play/action

@DiegoRodriguezT
Copy link

does anyone know if there's an endpoint for seeing the standings of a soccer league?

@doctrdre
Copy link

doctrdre commented Mar 29, 2025

does anyone know if there's an endpoint for seeing the standings of a soccer league?

I don't recall being able to coax just a league standings from my experiments but I wasn't focusing on that. Take a look at what I posted a couple months back. Between that and some of the other comments here about accessing the soccer data, you might be able to find a way to get just standings.

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

@michaelhm
Copy link

are fantasy sports APIs documented anywhere?

@zwheatley502
Copy link

I saw that this question was asked in 2021, but it never got a response. Hoping someone can help me out this time around. Any idea on how to get the tournament result summary information for a specific golfer in a similar way it is displayed here:

https://www.espn.com/golf/player/results/_/id/3702/rickie-fowler

Obviously you could query each tournament and get it that way, but that would be extremely inefficient for what I am trying to build. Any help would be greatly appreciated!

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