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

@lexcraw4d
Copy link

lexcraw4d commented Oct 17, 2022

when does it update for cfb http://site.api.espn.com/apis/site/v2/sports/football/college-football/scoreboard ......
still showing week 7 and the odds went awy

@lexcraw4d
Copy link

lexcraw4d commented Oct 17, 2022

image

I guess tomorrow the 18th - (Tuesdays?)

@daviswieck
Copy link

daviswieck commented Oct 17, 2022

Odds only show for Pregame.
It will update close to midnight just in case any games are played on Monday night.

@bobgodwin
Copy link

bobgodwin commented Oct 21, 2022

I've update the Football Gridiron to include NCAA Football. You can select the games of the week or by conference.

https://bigearthweb.net/sports/football_field/
https://bigearthweb.net/sports/football_field.7z

And a list of NCAA Conference ids if anyone needs it:

Id = 80, Conf = FBS (I-A)
Id = 1, Conf = ACC
Id = 151, Conf = American
Id = 4, Conf = Big 12
Id = 5, Conf = Big Ten
Id = 12, Conf = C-USA
Id = 18, Conf = FBS Indep
Id = 15, Conf = MAC
Id = 17, Conf = Mountain West
Id = 9, Conf = Pac-12
Id = 8, Conf = SEC
Id = 37, Conf = Sun Belt
Id = 81, Conf = FCS (I-AA)
Id = 176, Conf = ASUN
Id = 20, Conf = Big Sky
Id = 40, Conf = Big South
Id = 48, Conf = CAA
Id = 22, Conf = Ivy
Id = 24, Conf = MEAC
Id = 21, Conf = MVFC
Id = 25, Conf = NEC
Id = 26, Conf = OVC
Id = 27, Conf = Patriot
Id = 28, Conf = Pioneer
Id = 31, Conf = SWAC
Id = 29, Conf = Southern
Id = 30, Conf = Southland
Id = 16, Conf = WAC

@nicksiscoe
Copy link

nicksiscoe commented Oct 21, 2022

Anyone else only seeing like the first half of tomorrow's games when hitting https://site.api.espn.com/apis/site/v2/sports/football/college-football/scoreboard?dates=20221022? is it just me?
cc @reidwatson

@crichmond
Copy link

crichmond commented Oct 25, 2022

@akeaswaran,

How is it possible that we are able to access this when ESPN shut down public API support like 8 years ago?

@bobgodwin
Copy link

bobgodwin commented Oct 28, 2022

This seems pretty comprehensive:

https://www.espn.com/apis/devcenter/overview.html

Even has a branding guide and API logos.

@KevinDuganJr
Copy link

KevinDuganJr commented Oct 28, 2022

@akeaswaran,

How is it possible that we are able to access this when ESPN shut down public API support like 8 years ago?

Maybe they do not support it publicly, but they use it as the back-end for their data?

@munge64
Copy link

munge64 commented Oct 29, 2022

@trueparallels
Copy link

trueparallels commented Oct 29, 2022

This is just a community effort at documenting what is there now that's publicly available in some capacity. I wouldn't build anything that's not a hobby on it. If you're building a business, you're going to have to find somewhere you can pay for that data or risk getting shut down at any time.

The likely answer is that ESPN doesn't care about a few random hobbyists across the globe using their API for some minor things. It's a drop in the bucket for them. If ESPN drops a v3 GraphQL API at some point, I wouldn't be surprised, but I would be it would not be even slightly public.

@KevinDuganJr
Copy link

KevinDuganJr commented Oct 30, 2022

I'd like to find out also, because I don't want to build a bunch of code for my website (some of which I've already done) that is going to suddenly disappear...

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.

@lexcraw4d
Copy link

lexcraw4d commented Oct 30, 2022

What is yalls best approach on querying a player by name if you don't know the id?

@slovanos
Copy link

slovanos commented Nov 4, 2022

Hi, and thanks for the list!

Any ideas on how to get boxing Information?

I discover some urls for mma:
https://site.api.espn.com/apis/site/v2/sports/mma/ufc/news
https://site.api.espn.com/apis/site/v2/sports/mma/ufc/scorboard

And for boxing it should be something analogous like:
https://site.api.espn.com/apis/site/v2/sports/boxing/:something/scoreboard

but I'm not getting anything. Any help would be appreciated

@codecatalysts
Copy link

codecatalysts commented Nov 4, 2022

@slovanos If you use this link you can find paths further down the tree by navigating to the url in the $ref. I don't see a top level boxing but there are several in mma, maybe has what you are looking for.

http://sports.core.api.espn.com/v2/sports

@ZachManno
Copy link

ZachManno commented Nov 7, 2022

Made a parser that will turn the JSON response into a scoreboard object:
https://github.com/ZachManno/sports-scoreboard-ticker-led/blob/master/espn-scores/Scoreboard.py

@slovanos
Copy link

slovanos commented Nov 7, 2022

@slovanos If you use this link you can find paths further down the tree by navigating to the url in the $ref. I don't see a top level boxing but there are several in mma, maybe has what you are looking for.

http://sports.core.api.espn.com/v2/sports

Thanks @codecatalysts for your replay. Unfortunately I still can not find boxing info. I'm just looking for the upcomming fights on boxing to begin with, and, if available, the results (like on the scoreboard for the other sports)

@justingolden21
Copy link

justingolden21 commented Nov 7, 2022

Is there a way to get all college football scores, not just top 25?

@reidwatson
Copy link

reidwatson commented Nov 7, 2022

Is there a way to get all college football scores, not just top 25?

Add ?groups=80 to your call. https://site.api.espn.com/apis/site/v2/sports/football/college-football/scoreboard?groups=80

Scroll back in this to around August 30th for more discussion on this, I had the same question previously

@justingolden21
Copy link

justingolden21 commented Nov 7, 2022

Thanks for the reply! I see the list of conference IDs above, but that URL you just showed doesn't have every game. It's missing SDSU UNLV for example, which is a div 1 game that just happened. It's actually missing all mountain west games, plus plenty of others. I think it's still only top 25.

In fact, it's only got about 25 games:
image

@reidwatson
Copy link

reidwatson commented Nov 7, 2022

Again, scroll up and check out this post, you need to specify a limit greater than 25 and even try a date range and you’ll get what you’re looking for.
https://gist.github.com/akeaswaran/b48b02f1c94f873c6655e7129910fc3b?permalink_comment_id=4284805#gistcomment-4284805

@justingolden21
Copy link

justingolden21 commented Nov 7, 2022

Got it by adding a limit, thanks!

https://site.api.espn.com/apis/site/v2/sports/football/college-football/scoreboard?groups=80&limit=200

@justingolden21
Copy link

justingolden21 commented Nov 10, 2022

Has anyone been able to figure out NFL or MLB rankings? I looked at their docs and used those endpoints, but I get a 404 error. The other end points work fine:

const API_ENDPOINTS = {
	'mens-college-basketball': '/basketball/mens-college-basketball/rankings',
	'womens-college-basketball': '/basketball/womens-college-basketball/rankings',
	'college-football': '/football/college-football/rankings'
	// 'mlb-baseball': '/baseball/mlb/rankings',
	// 'nba-basketball': '/basketball/nba/rankings',
	// 'wnba-basketball': '/basketball/wnba/rankings',
	// 'nfl-football': '/football/nfl/rankings'
};
	
const response = await fetch(`https://site.api.espn.com/apis/site/v2/sports${API_ENDPOINTS[sport]}`);

{"code":404,"message":"Unable to get sport data for sport: baseball and league: mlb"} from https://site.api.espn.com/apis/site/v2/sports/baseball/mlb/rankings

@ITIRadio
Copy link

ITIRadio commented Nov 20, 2022

I've put about 100 hours into a personal project that I thought was possible with this API, a Raspberry Pi Score Ticker to attach to a TV, such as a second TV or a monitor in a TV room. However, I ran into too many issues with the scoreboard & events calls:

  1. With baseball & hockey, there were too many disappearing data points that would come up in the middle of a game, such as the line score for the top of the 3rd inning would vanish in the bottom of the 6th. While it would reappear, sometimes, the errors & inconsistencies made the use of this API, albeit free for now, too frustrating to actually use on an actual project.

  2. The basic scoreboard call for basketball has some stats, plus 3 leaders, so one API call per run through the scores is sufficient, however, football is another story. Both scoreboard (NFL & college) calls for football has literally zero stats, except the 3 leaders (passing, rushing, & receiving) FOR BOTH TEAMS COMBINED (ugh). Team stats, even basic yardages, are non-existant. So, I tested with calling the events API for each game, and I quickly ran into throttling issues. Two quick consecutive calls, one to the scoreboard and one to an event (game) caused the second to be ignored, time out, and cause a cancellation of any other calls. Python sleeps didn't help. This was strange because manually loading the JSON for 2 calls in a browser can be manually done with just a few second gap, but this couldn't be automated.

In short, I have determined that this API might be OK for the simplest of projects, or maybe downloading a few stats occasionally, but it's not worth any investment of time. It's not worth it for anything involving more than a couple of hundreds of lines of code, such as a super-basic score ticker, and certainly not something involving a nice user interface. I have completed Python Linux command line output for basic scoreboards for the NFL, NBA, and college football & basketball. If there is any interest in me posting a cleaned-up version of this code in another project, please let me know.

@ddivins
Copy link

ddivins commented Nov 20, 2022

@bobgodwin
Copy link

bobgodwin commented Nov 20, 2022

In short, I have determined that this API might be OK for the simplest of projects, or maybe downloading a few stats occasionally, but it's not worth any investment of time. It's not worth it for anything involving more than a couple of hundreds of lines of code, such as a super-basic score ticker, and certainly not something involving a nice user interface. I have completed Python Linux command line output for basic scoreboards for the NFL, NBA, and college football & basketball. If there is any interest in me posting a cleaned-up version of this code in another project, please let me know.

I'm not sure what you're trying to accomplish, but I've used it to run a football pool for three years. So far the API has worked fine for me. I've built multi sport live game tickers and other stuff with it. Data's data, so you just have to turn it into what you need (PHP works fine for my uses). And you're not ever going to get what you need with just the scoreboard data. The Pool and football squares are member only but here's a link to some NFL stats. Live it shows info for the game in progress:

https://bigearthweb.net/sports/nfl-stats/

I've other post not to far back with the live sport tickers and whatnot.

@ochawkeye
Copy link

ochawkeye commented Nov 20, 2022

Like @bobgodwin, I've used this API for NFL stats for the better part of three years to run the live scoring for my fantasy football league.

My experience is that it has been a very reliable replacement for the JSON data that used to feed NFL.com game center.

Sample Top Performers
Sample All Scores

@chrisblakley
Copy link

chrisblakley commented Nov 21, 2022

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

@stern1978
Copy link

stern1978 commented Nov 27, 2022

Any one know how to get World Cup table data?

@YodaLightsabr
Copy link

YodaLightsabr commented Nov 28, 2022

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

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