Skip to content

Instantly share code, notes, and snippets.

@akeaswaran
Last active January 13, 2025 09:27
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

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?

Would you be willing to share what the MLB JSON looks like during a game? I'm looking to see what live information is available (eg: outs, strikes, balls, players on base)

@kliuc
Copy link

kliuc commented Dec 20, 2024

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

Having the same issue, any ideas?

@akreu
Copy link

akreu commented Dec 20, 2024

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

Having the same issue, any ideas?

You could try this:
https://site.web.api.espn.com/apis/site/v2/sports/football/college-football/teams?groups=80&groupType=conference&enable=groups

@kliuc
Copy link

kliuc commented Dec 20, 2024

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

Having the same issue, any ideas?

You could try this: https://site.web.api.espn.com/apis/site/v2/sports/football/college-football/teams?groups=80&groupType=conference&enable=groups

This works, thanks! Just curious how did you figure this out?

@akreu
Copy link

akreu commented Dec 20, 2024

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

Having the same issue, any ideas?

You could try this: https://site.web.api.espn.com/apis/site/v2/sports/football/college-football/teams?groups=80&groupType=conference&enable=groups

This works, thanks! Just curious how did you figure this out?

Just browsing the site w/ dev tools open and finding the requests, for example this page and viewing requests after changing the conference dropdown: https://www.espn.com/college-football/teams

@ThreatAgario
Copy link

Hey would there be an endpoint that contains lineup information for games? Specifically soccer. I've tried to find one with no luck.

@ryanbuckner
Copy link

ryanbuckner commented Dec 23, 2024

Any idea what information ESPN uses to determine "too many calls in one day" rate limits? I tried using a VPN but that didn't change it. I just need to run it once today to update scores from last night, but I've hit the limit.

@marcusmyers
Copy link

Does anyone know if there is a rate limit at all for these endpoints? I want to write a local service to pull score stuff of the live events but don't want to get rate limited at all.

@ryanbuckner
Copy link

Does anyone know if there is a rate limit at all for these endpoints? I want to write a local service to pull score stuff of the live events but don't want to get rate limited at all.

There are some on this gist with guesses, but it's not published. I think it's around 1500 calls in a day

@althepal78
Copy link

Any idea what information ESPN uses to determine "too many calls in one day" rate limits? I tried using a VPN but that didn't change it. I just need to run it once today to update scores from last night, but I've hit the limit.

Google it. I'm pretty sure you can find it . It's ESPN ask what is ESPN rate limits etc.

@ryanbuckner
Copy link

Any idea what information ESPN uses to determine "too many calls in one day" rate limits? I tried using a VPN but that didn't change it. I just need to run it once today to update scores from last night, but I've hit the limit.

Google it. I'm pretty sure you can find it . It's ESPN ask what is ESPN rate limits etc.

My question isn't the rate limit. My question is what information they use to determine that it's "me" making each call? Let's say I have a Google Sheet making calls every 5 minute based on a trigger. I assume it's using the IP of the google servers hosing the sheet? What if I'm making the call from my house through an IDE? My house IP?

-OR- is it using something specific to the application making the call. A Sheets ID or something?

@hoopsdreams
Copy link

I am trying to load college basketball player data (GP, MIN, PTS, etc) from prior years (the same thing that you can see on the team stats pages for prior years, https://www.espn.com/womens-college-basketball/team/stats/_/id/2294/season/2023). In the API team data I see only this season, and not really all of the player data I'm looking for and if I add a query for prior season it doesn't seem to chagne the data. Any idea how I can get prior year stats for players?

@jreynolds67
Copy link

jreynolds67 commented Jan 6, 2025

Anybody know the endpoint for this page, with the option to change conferences as well? It looks like there is some trickery going on with the way it pulls players, it isn't just the same 50 players resorted, but it actually pulls new player data when the table headers are sorted. Sort by turnovers and it will pull new players, for example. https://www.espn.com/mens-college-basketball/stats/player

@akreu
Copy link

akreu commented Jan 6, 2025

Anybody know the endpoint for this page, with the option to change conferences as well? It looks like there is some trickery going on with the way it pulls players, it isn't just the same 50 players resorted, but it actually pulls new player data when the table headers are sorted. Sort by turnovers and it will pull new players, for example. https://www.espn.com/mens-college-basketball/stats/player

https://site.web.api.espn.com/apis/common/v3/sports/basketball/mens-college-basketball/statistics/byathlete?isqualified=true&page=1&limit=50&sort=offensive.avgPoints%3Adesc&conference=3

You can mess with the sort and conference ID to get exactly what you're looking for.

@akreu
Copy link

akreu commented Jan 6, 2025

I am trying to load college basketball player data (GP, MIN, PTS, etc) from prior years (the same thing that you can see on the team stats pages for prior years, https://www.espn.com/womens-college-basketball/team/stats/_/id/2294/season/2023). In the API team data I see only this season, and not really all of the player data I'm looking for and if I add a query for prior season it doesn't seem to chagne the data. Any idea how I can get prior year stats for players?

https://site.web.api.espn.com/apis/site/v2/sports/basketball/womens-college-basketball/teams/2294/athletes/statistics?season=2025

You can change the team ID and season parameters to get what you're looking for

@spatel2004
Copy link

anyone know if I can pull awards or achievements for a specific nba player using specific endpoints? tried looking but no luck!

@althepal78
Copy link

anyone know if I can pull awards or achievements for a specific nba player using specific endpoints? tried looking but no luck!

What sport i can mess with the end points when I get home

@ryanbuckner
Copy link

Has anyone found a value for seeding during the NFL playoffs?

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