Skip to content

Instantly share code, notes, and snippets.

@akeaswaran
Last active March 22, 2023 03:12
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...

@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

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

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 via email

@bobgodwin
Copy link

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

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

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

@collinstork
Copy link

Just found out you can use "all" for the league, if the team is in multiple leagues.
so if you want to see the nextEvent for USMNT:
https://site.api.espn.com/apis/site/v2/sports/soccer/all/teams/usa

@athleticmistud
Copy link

does anyone know of the link for the live scores for the now depreciated https://feeds.nfl.com/feeds-rs/scores.json is there an alternative for the live scores?

@daverz06
Copy link

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

The last "date" is 3-12 but the season end date in column I says 4-05, so I'm hoping we get data for the tournament. Do you know how to get all games right now instead of just ranked games?

@CN120
Copy link

CN120 commented Feb 3, 2023

@makeniii

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.

Pulled from here

ID ESPN Status
0 TBD
1 SCHEDULED
2 IN PROGRESS
3 FINAL
4 FORFEIT
5 CANCELLED
6 POSTPONED
7 DELAYED
8 SUSPENDED
9 FORFEIT OF HOME TEAM
10 FORFEIT OF AWAY TEAM
17 RAIN DELAY
21 BEGINNING OF PERIOD
22 END OF PERIOD
23 HALFTIME
24 OVERTIME
25 FIRST HALF
26 SECOND HALF
27 ABANDONED
28 FULL TIME
29 RESCHEDULED
30 START LIST
31 INTERMEDIATE
32 UNOFFICIAL
33 MEDAL OFFICIAL
34 GROUPINGS OFFICIAL
35 PLAY COMPLETE
36 OFFICIAL - EVENT SHORTENED
37 CORRECTED RESULT
38 RETIRED
39 BYE
40 WALKOVER
41 VOID
42 PRELIMINARY
43 GOLDEN TIME
44 SHOOTOUT
45 FINAL SCORE - AFTER EXTRA TIME
46 FINAL SCORE - AFTER GOLDEN GOAL
47 FINAL SCORE - AFTER PENALTIES
48 END EXTRA TIME
49 EXTRA TIME HALF TIME
50 FIXTURE - NO LIVE COVERAGE
51 FINAL SCORE - ABANDONED

@ryanbuckner
Copy link

does anyone know of the link for the live scores for the now depreciated https://feeds.nfl.com/feeds-rs/scores.json is there an alternative for the live scores?

Regular Season:
https://site.api.espn.com/apis/site/v2/sports/football/nfl/scoreboard?seasontype=2&week= + weeknumber

Post Season
https://site.api.espn.com/apis/site/v2/sports/football/nfl/scoreboard?seasontype=3&week= + weeknumber

@athleticmistud
Copy link

athleticmistud commented Feb 3, 2023 via email

@ryanbuckner
Copy link

ryanbuckner commented Feb 3, 2023

What week number are we on in post season?...the best is yet to come...

Short answer, 22.

Here's my function for post season to build my live tracker

function getPostWeekName(weeknum) {
  var weekName;
  if (weeknum == 19){
      weekName = "WildCard";
    } else if (weeknum == 20){
      weekName = "Divisional";
    } else if (weeknum == 21){
      weekName = "Conference";
    } else if (weeknum == 22){
      weekName = "Pro Bowl";
    } else if (weeknum == 23){
      weekName = "SuperBowl";
  }
  return weekName;
}

@chrisblakley
Copy link

For anyone who may be interested (doesn't look like this has been mentioned here yet), the XFL works with this API:
Example: https://site.api.espn.com/apis/site/v2/sports/football/xfl/scoreboard

Nothing for the USFL that I can find, however.

@PIC954
Copy link

PIC954 commented Feb 8, 2023

hey!

Does anyone know the nascar/F1 API call?

@chrisblakley
Copy link

Nascar is no longer available, but here is an example endpoint for Formula 1:
https://site.api.espn.com/apis/site/v2/sports/racing/f1/scoreboard

There is a different endpoint for drivers, but you need the competition ID and the driver ID:
https://sports.core.api.espn.com/v2/sports/racing/leagues/f1/events/GAMEIDHERE/competitions/COMPETITIONIDHERE/competitors/DRIVERIDHERE/statistics

@tonycarnevale
Copy link

tonycarnevale commented Feb 9, 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

@daverz06 @ryanbuckner this might be late but a way to do this would be adding groups=

for example https://site.api.espn.com/apis/site/v2/sports/basketball/mens-college-basketball/scoreboard?groups=7
or http://site.api.espn.com/apis/site/v2/sports/basketball/mens-college-basketball/scoreboard?dates=20230123&groups=0

for some reason the college basketball api only has limited data by default. My answer now is turning into a question. Does anyone know how to do a range of groups for ncaab?

@ischmidt20
Copy link

ischmidt20 commented Feb 9, 2023

for some reason the college basketball api only has limited data by default

@tonycarnevale You need to add the limit argument to ensure all games for a day are returned. I usually set limit to 363 as there will never be more than 363 D1 games in a day

Set groups equal to 50 to get all NCAA D1 games (regular season and conference tournaments). The postseason tournaments have different identifiers which unfortunately I can't recall at the moment.

@athleticmistud
Copy link

What week number are we on in post season?...the best is yet to come...

Short answer, 22.

Here's my function for post season to build my live tracker

function getPostWeekName(weeknum) {
  var weekName;
  if (weeknum == 19){
      weekName = "WildCard";
    } else if (weeknum == 20){
      weekName = "Divisional";
    } else if (weeknum == 21){
      weekName = "Conference";
    } else if (weeknum == 22){
      weekName = "Pro Bowl";
    } else if (weeknum == 23){
      weekName = "SuperBowl";
  }
  return weekName;
}

Thank you! So how real time is it? is there much delay ?
so if I use your function and wanted it for regular season do I just do the same function but starting with 1?)

@ryanbuckner
Copy link

Thank you! So how real time is it? is there much delay ? so if I use your function and wanted it for regular season do I just do the same function but starting with 1?)

You can call this to see the regular season week 1 - if you click the link below you'll see the events JSON payload for all the games in week 1. The data is real time and sometimes faster than my YouTube TV feed. But I would caution that there is a limit on how many times per day you can call it. That goes for all these APIs.

I usually call it every 60 minutes when there is no game, to get schedule updates and odds / lines changes. When games are on I switch to every 5 minutes. This way I avoid the limits, which I think is 2500 calls per day.

https://site.api.espn.com/apis/site/v2/sports/football/nfl/scoreboard?seasontype=2&week=1

@ITIRadio
Copy link

ITIRadio commented Feb 12, 2023

does anyone know of the link for the live scores for the now depreciated https://feeds.nfl.com/feeds-rs/scores.json is there an alternative for the live scores?

Regular Season:
https://site.api.espn.com/apis/site/v2/sports/football/nfl/scoreboard?seasontype=2&week= + weeknumber

Post Season
https://site.api.espn.com/apis/site/v2/sports/football/nfl/scoreboard?seasontype=3&week= + weeknumber

I use the following syntax for a date range, although it seems to work better if the second date is one day after the required date for a weekend's set of games (usually like a Thursday to Tuesday):

http://site.api.espn.com/apis/site/v2/sports/football/nfl/scoreboard?dates=YYYYMMDD-YYYYMMDD , where the first date in chronological order is first, and then the second date.

@ITIRadio
Copy link

for some reason the college basketball api only has limited data by default

@tonycarnevale You need to add the limit argument to ensure all games for a day are returned. I usually set limit to 363 as there will never be more than 363 D1 games in a day

Set groups equal to 50 to get all NCAA D1 games (regular season and conference tournaments). The postseason tournaments have different identifiers which unfortunately I can't recall at the moment.

I'm not sure about tournaments yet, but groups = 50 is all Division I, on given dates, so this should work throughout the remainder of the season & post-season:

http://site.api.espn.com/apis/site/v2/sports/basketball/mens-college-basketball/scoreboard?groups=50&limit=200&dates=YYYYMMDD-YYYYMMDD

with the dates in the desired range (though the second date, the latter, sometimes needs to be one day after the desired date). This syntax has worked all season so far, for every game involving a Division I team.

@ryanbuckner
Copy link

I use the following syntax for a date range, although it seems to work better if the second date is one day after the required date for a weekend's set of games (usually like a Thursday to Tuesday):

http://site.api.espn.com/apis/site/v2/sports/football/nfl/scoreboard?dates=YYYYMMDD-YYYYMMDD , where the first date in chronological order is first, and then the second date.

Where most sports are played on a daily basis, the NFL is played by week. I wasn't able to get the above syntax to work with the nfl feed. I also tried to plug in a year, and I still get back data from this season.

@RONJ0N
Copy link

RONJ0N commented Feb 14, 2023

is using this api illegal in any way? or is it just free range anybody can use it?

@opendoug
Copy link

opendoug commented Feb 14, 2023

For anyone needing JSON of NFL games, this URL seems to work:

http://site.api.espn.com/apis/site/v2/sports/football/nfl/summary?event= + {game ID}

@athleticmistud
Copy link

athleticmistud commented Feb 14, 2023 via email

@ryanbuckner
Copy link

for some reason the college basketball api only has limited data by default

@tonycarnevale You need to add the limit argument to ensure all games for a day are returned. I usually set limit to 363 as there will never be more than 363 D1 games in a day

I was able to get data for 63 games today with the following based on a few tips above

https://site.api.espn.com/apis/site/v2/sports/basketball/mens-college-basketball/scoreboard?groups=50&limit=500

@ryanbuckner
Copy link

I'm attempting to create a google sheet that can be used to update NCAA Mens Basketball scores in "real time" (upon refresh) using the APIs here and some tips in the comments. The goal is to have something that can be used for real time March Madness tracking.

I'm sharing it here for anyone interested in checking out my progress so far, and to give me ideas on improvement. Also happy to grant access to anyone that wants to edit.

Here's the sheet :
https://docs.google.com/spreadsheets/d/1WMczLzQzibHglB_kksK4b5JksXDDitUAyw5Y1HXMjog/edit?usp=sharing

@todarko
Copy link

todarko commented Feb 28, 2023

Found a way not shown above that will pull back a single teams full schedule of games:

http://site.api.espn.com/apis/site/v2/sports/basketball/nba/teams/:teamid/schedule

@daverz06
Copy link

daverz06 commented Mar 4, 2023

I'm attempting to create a google sheet that can be used to update NCAA Mens Basketball scores in "real time" (upon refresh) using the APIs here and some tips in the comments. The goal is to have something that can be used for real time March Madness tracking.

I'm sharing it here for anyone interested in checking out my progress so far, and to give me ideas on improvement. Also happy to grant access to anyone that wants to edit.

Here's the sheet : https://docs.google.com/spreadsheets/d/1WMczLzQzibHglB_kksK4b5JksXDDitUAyw5Y1HXMjog/edit?usp=sharing

You sir are a godsend. Love your work. It has helped me greatly with my NFL and now soon to be March Madness pickems. QUESTION... what would the script code look like to "freeze" the odds at say 8 am? Really appreciate your help!

@mark-perry-tfs
Copy link

mark-perry-tfs commented Mar 7, 2023

How do you see player stats from games? When I do a summary API call statistics is blank? NFL is fine.. Its the XFL API that is blank

@jeremyshultz
Copy link

I'm attempting to create a google sheet that can be used to update NCAA Mens Basketball scores in "real time" (upon refresh) using the APIs here and some tips in the comments. The goal is to have something that can be used for real time March Madness tracking.

I'm sharing it here for anyone interested in checking out my progress so far, and to give me ideas on improvement. Also happy to grant access to anyone that wants to edit.

Here's the sheet : https://docs.google.com/spreadsheets/d/1WMczLzQzibHglB_kksK4b5JksXDDitUAyw5Y1HXMjog/edit?usp=sharing

VERY nicely done! Is there any possible way that you’d be able to add URLs to the team logos in the live score tab? Like an Away Logo URL and Home Logo URL?

@bobgodwin
Copy link

I don't really do basketball, but this might be a starting point for somebody that does:
Day:
http://site.api.espn.com/apis/site/v2/sports/basketball/mens-college-basketball/scoreboard?dates=20230316
Round:
http://site.api.espn.com/apis/site/v2/sports/basketball/mens-college-basketball/scoreboard?dates=20230316-20230318&limit=32
For some reason, the second date has to be one day later.
But I have no idea what determines which side of the brackets the teams go or how seeding works.

@chisox721
Copy link

Shot in the dark here, does anyone know if you can retrieve NCAAB rosters for previous years? I'm working on a large project and the only attribute I haven't been able to get for inactive players is weight. Worst case scenario I'll have to write another parser for the sports reference site but that leads to another set of issues w/ associating ID's which I'd love to avoid.

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