Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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...

@stern1978
Copy link

Any one know how to get World Cup table data?

@YodaLightsabr
Copy link

This isn't ESPN, but someone else made World Cup JSON (GitHub), which is a REST API for World Cup teams and matches. There's also a JS client to go along with it (worldcup.js).

@stern1978
Copy link

For anyone curious, here is the scoreboard endpoint URL for the FIFA World Cup: https://site.api.espn.com/apis/site/v2/sports/soccer/fifa.world/scoreboard

The league abbreviation is fifa.world.

For example– specifying a date range plus a limit to try to max out the available data (probably overkill): https://site.api.espn.com/apis/site/v2/sports/soccer/fifa.world/scoreboard?limit=950&dates=20221121-20221127

One can also be found here.

https://site.api.espn.com/apis/v2/scoreboard/header?sport=soccer&league=fifa.world

@bryanperez43
Copy link

@ITIRadio
Copy link

ITIRadio commented Dec 3, 2022

Let me add a couple of specific responses to replies: the NFL API calls can be slow if event calls & scoreboard calls are done quickly in succession, as in when automated. I abandoned the ticker idea, as Python I/O libraries always have some crucial lack of functionality that make automation unusable. For example, PyAutoGUI has automatic vertical scrolling, which would have been nice, but there's no flag, event, or anything else that reports when PyAutoGUI has scrolled through all of the available text. So, I proceeded with something that dumps text in the Linux Command Line, and that I can simply read, redirect to a file, or cron at specific times throughout the week. I also wanted to be careful about overuse of this for-now free service, such as it is, and at the same time get some nice output, whether it's before games, during games, or after games.

As I previously stated, the NFL API is working well, so I can concur with other reports. College games (full scoreboard, not just Top 25) are performing better, though there are fewer event stats and calls, thanks to the fewer games now being played while I'm testing. If there are more games returned by the scoreboard call, as potentially may be the case during bowl season, throttling may begin again. My Box Scores programs provide pre-game info, such as weather & lines, team season stat averages, team stat leaders, injuries (NFL only), and last 5 game results. During games, there's full team stats, full individual stats (though I didn't parse out special teams), current drive stats, and last play. Post-game, there's all of the in-game stats, plus headlines, quarter scores, and scoring plays, suitable for saving as readable text, or saving some code as snippets for applications, such as fantasy football calculators. I wouldn't wear these out, although, for me, a middleware database is out-of-the-question and pointless for this application. It seems like, given the glacial speed of ESPN.com, that they're loading an in-browser app that builds pages client-side, accessing this data API as it goes. So, their traffic manager may think that I like to hit the refresh button a lot?

The NBA & college basketball scoreboards have nearly identical JSON structures. There's also some basic stats & individual leaders, no matter the game status (pre, during, or post). Since you're making just 1 call to the scoreboard API, you can ask for all Division I games for college, and get the kind of output that I've been looking for, though you get a LOT of games. The events API is throwing inconsistencies like with baseball & hockey, so I stopped working on more detailed output for basketball. The brief football ticker program based on the scoreboard API only is too data-free to bother posting.

I've posted the NFL & college football box score programs to my new repository at:

https://github.com/ITIRadio/ESPN-API

I'll post basketball as I have time. The code is lengthier than expected because there ended up being significantly more error checking than I could have imagined. REST API databases make me love MySQL databases all over again.

@hawkseye76
Copy link

Anybody know how to pull data, events, scores, etc for NCAA Womens Volleyball? API docs say it exists, but it returns a 404.

@stern1978
Copy link

@hawkseye76
Copy link

hawkseye76 commented Dec 6, 2022

@stern1978 That is exactly what i'm looking for! Thank you!

Wonder why https://site.api.espn.com/apis/site/v2/sports/volleyball/womens-college-volleyball/scoreboard doesn't work like the other sports?

Edit: Well, now that link works. Maybe i just had a typo or something. Regardless, Thanks @stern1978!!

@makeniii
Copy link

makeniii commented Dec 14, 2022

Is there a id for a NBA season? Doesn't seem like there is but thought I'd ask anyways.

Also, does anyone know what 4/5 means for this variable for example, schedule_json['events']['competitions'][0]['status']['type']['id']? Currently, I know that:

1 = scheduled
2 = live
3 = completed
6 = postponed

So I'm assuming that 4/5 must mean something too but I haven't come across it yet.

@CyrilNb
Copy link

CyrilNb commented Jan 10, 2023

Does any one succeed to get leader of a soccer league (like Premiere league for example?). Scoreboard endpoint does not give current standings of the season

@CyrilNb
Copy link

CyrilNb commented Jan 10, 2023

Same for NBA, I am trying to get the current standing for both conferences. Is there a way someone managed to get it?

@zhayes84
Copy link

I wrote a Python "handler" (I don't know the proper label) that handles most of the College Football Ranking data:

https://github.com/zhayes84/espn-college-football-rankings-api-python/blob/main/ncaa_rankings_json.py

@nworbdier
Copy link

Does anyone know the endpoints for:

PGA Schedule (List of all tournaments and info for a given year/month/date)

PGA Player Scorecards for a Specific Tournament (Ideally only the details for a single golfer for a specific tournament

@ryanbuckner
Copy link

ryanbuckner commented Jan 24, 2023

Is there a way to use the NCAA Men's Basketball feed to get all March Madness games and scores?
http://site.api.espn.com/apis/site/v2/sports/basketball/mens-college-basketball/scoreboard

@ryanbuckner
Copy link

ryanbuckner commented Jan 24, 2023

Let me add a couple of specific responses to replies: the NFL API calls can be slow if event calls & scoreboard calls are done quickly in succession, as in when automated. I abandoned the ticker idea, as Python I/O libraries always have some crucial lack of functionality that make automation unusable. For example, PyAutoGUI has automatic vertical scrolling, which would have been nice, but there's no flag, ......
I'll post basketball as I have time. The code is lengthier than expected because there ended up being significantly more error checking than I could have imagined. REST API databases make me love MySQL databases all over again.

I created a public google sheets that uses the NFL API and updates every 15 minutes
Sheets

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