Skip to content

Instantly share code, notes, and snippets.

@akeaswaran
Last active November 15, 2024 09:54
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...

@Gabyp05
Copy link

Gabyp05 commented Oct 3, 2024

Thanks!

@brandonadams21
Copy link

Anyone have an idea of how to get college football teams for FBS only? I have tried several REST urls to no avail.

Tacking on "groups=80" in the query-string does not seem to do anything.

To get ALL (I think) college football teams you can do this:

http://site.api.espn.com/apis/site/v2/sports/football/college-football/teams?limit=700

I can get the college-football groups with this:

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

For all college football FBS games I was able to use the following API below. I would double check but for this weekend I was able to return 49 games. If you were to run it without the limit and groups it would only return 17 games.

https://site.api.espn.com/apis/site/v2/sports/football/college-football/scoreboard?limit=100&groups=80

@tacrec
Copy link

tacrec commented Oct 3, 2024

Any endpoints for college hockey?

@HJA24
Copy link

HJA24 commented Oct 3, 2024

Anyone able to get play-by-play data of MMA? Basically I am looking for the "timeline" of a fight.

@Bobsilvio
Copy link

@HJA24
Copy link

HJA24 commented Oct 5, 2024

for this?

https://www.espn.com/soccer/scoreboard

no, for MMA/UFC. Nevertheless, please show how it looks for soccer

@famictech2000
Copy link

Does anyone know how to get "only" the College Bowl games!?

@ablits82492
Copy link

ablits82492 commented Oct 15, 2024

I've pulled a ton of data using this API for NFL, MLB, and NHL into PowerBI. Organizes the data and I have some visuals ready to go. I'd be willing to share the .pbix file if anyone can suggest a good way of doing so and/or if that would help someone?

@JulianHill463
Copy link

Wow, thanks for sharing.

@musaalp
Copy link

musaalp commented Oct 29, 2024

does anyone know how to use log in api and generate the required Cookie to use other apis? For example changing the leage setting requires sending the Cookie from header and I guess it uses it for authentication purpose.

@mattabets
Copy link

is anyone else getting errors with the NFL gamelog endpoint for previous years? this just started happening to me today: https://site.web.api.espn.com/apis/common/v3/sports/football/nfl/athletes/8439/gamelog?season=2022

{"code":3001,"detail":"timeout error: timeout occurred waiting for core endpoint"}

@mattabets
Copy link

is anyone else getting errors with the NFL gamelog endpoint for previous years? this just started happening to me today: https://site.web.api.espn.com/apis/common/v3/sports/football/nfl/athletes/8439/gamelog?season=2022

{"code":3001,"detail":"timeout error: timeout occurred waiting for core endpoint"}

Getting this error on some current gamelogs as well: https://site.web.api.espn.com/apis/common/v3/sports/football/nfl/athletes/4362249/gamelog?season=2024

@BarryLaminack
Copy link

BarryLaminack commented Nov 1, 2024

**EDIT: All looks to be working now, so appears to be an across the board outage yesterday

I know yesterday when I was doing a show if you went to a player profile at ESPN.com and looked at their game log there was no data but that seems to be fixed now. I wonder if perhaps they moved the source of the data?

@BarryLaminack
Copy link

Anyone able to get play-by-play data of MMA? Basically I am looking for the "timeline" of a fight.

if it doesn't exist on the website you probably won't find it in the api. The best I could find is something like this for UFC308:
https://site.web.api.espn.com/apis/common/v3/sports/mma/ufc/fightcenter/600044733

Looks like a good starting endpoint (that's a weird phrase) for UFC fights would be:
https://site.api.espn.com/apis/personalized/v2/scoreboard/header?sport=mma&league=ufc

and for MMA would be:
https://site.api.espn.com/apis/personalized/v2/scoreboard/header?sport=mma

@althepal78
Copy link

the thing that sucks about this is that I want news just for the knicks, however I can't get that. I only get links to the news vs api links to the news. I want to add that to my site I am making somethign for fun but I can't get this to work in my favor, is there an endpoint that allows me actual news besides the 6 articles that change hourly

@althepal78
Copy link

Anyone able to get play-by-play data of MMA? Basically I am looking for the "timeline" of a fight.

if it doesn't exist on the website you probably won't find it in the api. The best I could find is something like this for UFC308: https://site.web.api.espn.com/apis/common/v3/sports/mma/ufc/fightcenter/600044733

Looks like a good starting endpoint (that's a weird phrase) for UFC fights would be: https://site.api.espn.com/apis/personalized/v2/scoreboard/header?sport=mma&league=ufc

and for MMA would be: https://site.api.espn.com/apis/personalized/v2/scoreboard/header?sport=mma

I have not tried never cared about doing this but maybe I will try to help tomorrow or monday evening :)

@althepal78
Copy link

never mind I figured out the team news thing with this link thanks a lot ;)
https://site.api.espn.com/apis/site/v2/sports/basketball/nba/news?team=ny

@dleather25
Copy link

can I use this to get specific teams stats such as turnovers, offensive efficiency, defensive efficiency, rushing defense, etc etc

@althepal78
Copy link

I think you can you have to learn how to like for news with NBA I had to add ?team=ny

@jdgilhuly
Copy link

Anyone know how to get statistics for a certain season for a NBA player i.e. Luka Doncic 2024-2025 stats?

@althepal78
Copy link

https://site.api.espn.com/apis/site/v2/sports/basketball/nba/teams/ny/roster you might be able to do something like this with that team it is getting me team roster you have to fiddle with it @jdgilhuly

@martinwilliamsiet
Copy link

Is it possible to get injury data for soccer from this somehow?

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