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