Skip to content

Instantly share code, notes, and snippets.

@akeaswaran
Last active July 27, 2025 23:49
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...

@propsdaily
Copy link

Does anyone know the league parameter name for NBA summer league?

@apelt001 @BataBoom It looks like they separate leagues out by region, for reference you can check all leagues here:
https://sports.core.api.espn.com/v2/sports/basketball/leagues

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

I know this is a little late but better late then ever. So i did something similar for mens colleage and created a loop to get whatever matups to a certain point

' current_year = date.today().year
year = current_year -1
matchup_data = []

while year >= 2024:  #You can do it to whatever year you would like here
    # Define season start and end dates for the given year
    start_date = date(year, 11, 4)  # Typically around early November
    end_date = date(year + 1, 3, 9)  # Typically around early March

    # Generate each day in the season date range
    current_date = start_date
    while current_date <= end_date:
        date_str = current_date.strftime("%Y%m%d")  # Format date as YYYYMMD

        url = f"https://site.api.espn.com/apis/site/v2/sports/basketball/mens-college-basketball/scoreboard?dates={date_str}"
       #change to your url for women 
        try:
            response = requests.get(url)
            response.raise_for_status()
            data = response.json()
        except requests.exceptions.RequestException as e:
            print(f"Error fetching scoreboard data for {date_str}: {e}")
            current_date += timedelta(days=1)
            continue`

This worked for me as I was building my algo out for men so hopefully this helps you with your analytics.

@daniyalmaster693
Copy link

daniyalmaster693 commented Jul 15, 2025

Can someone tell me all the available leagues, this api doesn't seem to cover all of them: https://site.api.espn.com/apis/site/v2/scoreboard/activeSports?v=1&editionKey=espn-en&lang=en&region=us

@propsdaily
Copy link

Can someone tell me all the available leagues, this api doesn't seem to cover all of them: https://site.api.espn.com/apis/site/v2/scoreboard/activeSports?v=1&editionKey=espn-en&lang=en&region=us

@daniyalmaster693 You can view all sports on this endpoint:
https://sports.core.api.espn.com/v2/sports

And then if you go a bit deeper, for each sport you can view leagues
https://sports.core.api.espn.com/v2/sports/basketball/leagues

@bluemad
Copy link

bluemad commented Jul 27, 2025

Develop your website in a manner that it just consumes an object using the API data as middleware. Then when/if the ESPN API changes or fails, you just have to find a new source and your website continues. This is what I had to do with mine. NFL changed their API, or rather closed it down.

Hi @KevinDuganJr can you go into some detail on what you did. Sorry if this is a stupid question, I'm still very much a programming beginner.
Thanks

@KevinDuganJr
Copy link

Develop your website in a manner that it just consumes an object using the API data as middleware. Then when/if the ESPN API changes or fails, you just have to find a new source and your website continues. This is what I had to do with mine. NFL changed their API, or rather closed it down.

Hi @KevinDuganJr can you go into some detail on what you did. Sorry if this is a stupid question, I'm still very much a programming beginner. Thanks

You create classes that your application will use. Let's say you're doing Schedule so you would have at least a Schedule class and Team class. Then you use the API to populate the properties of those classes. If you have an ongoing project, I could try to help guide you. I'm afraid I'm not good at wiring everything up in a chat window though haha.

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