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...

@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?

@hashuser1
Copy link

Does anyone know how to pull box scores for the NBA?

@MichaelMon12
Copy link

MichaelMon12 commented Nov 23, 2024

I'm trying to find the full upcoming schedule for the USA Men's National Soccer Team (USMNT). I was able to find: https://site.api.espn.com/apis/site/v2/sports/soccer/all/teams/660/schedule, but that just lists the already played games. I'm trying to find the API with the upcoming games listed here: https://www.espn.com/soccer/team/fixtures/_/id/660/usa. Thanks.

@sheo77
Copy link

sheo77 commented Nov 26, 2024

Does anyone know how I can get all the football leagues? I only know usa.1 and eng.1 https://site.api.espn.com/apis/site/v2/sports/soccer/eng.1/scoreboard , but I need the Champions League code

Use https://sports.core.api.espn.com/v2/sports/soccer/leagues for a complete list -> uefa.champions

@justingolden21
Copy link

Looking for basketball conferences / groups and can't find anything anywhere, either online or from the API. I compiled this list but can't find CAA:

        'Top 25': 0,
        'America East': 1,
        'Atlantic Coast': 2,
        'Atlantic 10': 3,
        'Big East': 4,
        'Big Sky': 5,
        'Big South': 6,
        'Big Ten': 7,
        'Big 12': 8,
        'Big West': 9,
        'Coastal Athletic': 10,
        'Conference USA': 11,
        'Ivy League': 12,
        'Metro Atlantic Athletic': 13,
        'Mid-American': 14,
        'Mid-Eastern Athletic': 16,
        'Missouri Valley': 18,
        'Northeast': 19,
        'Ohio Valley': 20,
        // 21 is power five, no big east and yes pac12
        'Patriot League': 22,
        'Southeastern': 23,
        'Southern': 24,
        'Southland': 25,
        'Southwestern Athletic': 26,
        'Sun Belt': 27,
        'West Coast': 29,
        'Western Athletic': 30,
        // not sure what 31-43 are
        'Mountain West': 44,
        'Horizon League': 45,
        'Atlantic Sun': 46,
        // not sure what 47-48 are
        'Summit League': 49,
        'American Athletic': 62,

Hopefully this helps someone!

@justingolden21
Copy link

50 seems to be everything? And 52 seems to be the same? No other insights from me...

@ischmidt20
Copy link

The CAA is listed as Coastal Athletic (#10). But setting groups=50 will give you all D1, just make sure you set the limit high enough to return all of the games for a single day. The postseason tournaments (NCAA, NIT, etc.) also have codes in the 90s (can't recall exactly), but they should also still return with groups=50.

@justingolden21
Copy link

The CAA is listed as Coastal Athletic (#10). But setting groups=50 will give you all D1, just make sure you set the limit high enough to return all of the games for a single day. The postseason tournaments (NCAA, NIT, etc.) also have codes in the 90s (can't recall exactly), but they should also still return with groups=50.

Awesome, thank you!

@zslabs
Copy link

zslabs commented Nov 30, 2024

Thanks for this list! Is there a way to grab retired players as well? For example, Michael Jordan's profile is 1035 but he won't show up on a roster since he's not part of a team.

@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