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

@amanmibra

This comment has been minimized.

Copy link

@amanmibra amanmibra commented Dec 29, 2018

Lol, I needed this @akeaswaran. Thanks! I literally google this and I run into you! 😂 How did you find this, and what is the structure of the json about for College Basketball specific team requests?

Edit: After looking at a bit, I am starting to understand it. Do you know if the Specific Team endpoint is constantly updated per game?

Thanks!

@raulrotundo

This comment has been minimized.

Copy link

@raulrotundo raulrotundo commented Jan 16, 2019

Good contribution to the community! thanks.
Here an example to get a specific event id detail
http://site.api.espn.com/apis/site/v2/sports/basketball/nba/scoreboard/:eventId

@PHI34Halladay

This comment has been minimized.

Copy link

@PHI34Halladay PHI34Halladay commented Mar 29, 2019

I love what we get here, especially that everything is live.
But how in the world can I export the data (e.g. live scores) to excel or whatever?
I'm planning on constructing my own sports live ticker and this would be the best start for this project.
Thanks in advance.
Regards,
Patrick

@jacksonb2913

This comment has been minimized.

Copy link

@jacksonb2913 jacksonb2913 commented Apr 21, 2019

Most of you all may not care, but letting you know that all of these link can be loaded over "https" instead of "http." That will greatly improve your SEO.

@davidbti

This comment has been minimized.

Copy link

@davidbti davidbti commented May 17, 2019

What do you mean by 'blacklist' with calendar parameter. I am trying these links now and can't seem to get any games from 2018-2019 using date parameter. Do you have an example url with the parameter in it that works? Thanks.

@akeaswaran

This comment has been minimized.

Copy link
Owner Author

@akeaswaran akeaswaran commented Jun 10, 2019

@davidbti trying some of these URLs again now, and I don't think you need to use 'blacklist' for the calendar parameter. This URL for data from the 2018-2019 season worked for me: http://site.api.espn.com/apis/site/v2/sports/football/college-football/scoreboard?dates=20180901

@akeaswaran

This comment has been minimized.

Copy link
Owner Author

@akeaswaran akeaswaran commented Jun 10, 2019

@PHI34Halladay you'll have to convert the JSON to another format (CSV, etc) to import the data and use it in Excel. Alternatively, if you know VBA, you may be able to use that to make a web request to access the data and manipulate it directly from Excel.

@bharris9

This comment has been minimized.

Copy link

@bharris9 bharris9 commented Jun 12, 2019

College baseball can be found like the other sports -- https://site.api.espn.com/apis/site/v2/sports/baseball/college-baseball/scoreboard

The original posted link doesn't work anymore.

@akeaswaran

This comment has been minimized.

Copy link
Owner Author

@akeaswaran akeaswaran commented Jun 12, 2019

Interesting - thanks for the info! I'll update the gist.

@hoiheart

This comment has been minimized.

Copy link

@hoiheart hoiheart commented Jun 13, 2019

This document has been a great help to me.
I have found additional information on the ESPN site and share it about Soccer.

@bharris9

This comment has been minimized.

Copy link

@bharris9 bharris9 commented Jun 13, 2019

Standings works for other sports too (note the slight deviation in the URL pattern that @hoiheart found)

I have not been able to figure out how to filter by divisions with those standings. Maybe there is an alternate URL?

@cheese-industries

This comment has been minimized.

Copy link

@cheese-industries cheese-industries commented Jun 17, 2019

NBA G-League info is here: http://site.api.espn.com/apis/site/v2/sports/basketball/nba-development/scoreboard

Presumably, it works like the NBA does, but I haven't spent a ton of time checking.

@bharris9

This comment has been minimized.

Copy link

@bharris9 bharris9 commented Jun 21, 2019

Just found out how to get more info on a given event. For an MLB game for example -- this would get you the box score and current game statistics

http://site.api.espn.com/apis/site/v2/sports/baseball/mlb/summary?event=401075852

EDIT -- noticed this was mentioned under the college football link in the OP

@bharris9

This comment has been minimized.

Copy link

@bharris9 bharris9 commented Jun 21, 2019

College football with "groups" -- ID 80 is FBS
http://site.api.espn.com/apis/site/v2/sports/football/college-football/scoreboard?groups=80

Get the groups from navigating ESPN's scoreboard page and using the dropdown to filter - https://www.espn.com/college-football/scoreboard/_/group/80/year/2019/seasontype/2/week/1

@ashley-figueira

This comment has been minimized.

@rink-no2

This comment has been minimized.

Copy link

@rink-no2 rink-no2 commented Jul 17, 2019

College football with "groups" -- ID 80 is FBS
http://site.api.espn.com/apis/site/v2/sports/football/college-football/scoreboard?groups=80

Question: Is there a way to return more than 25 "events" at once?

@cheese-industries

This comment has been minimized.

Copy link

@cheese-industries cheese-industries commented Jul 17, 2019

@rink-no2

This comment has been minimized.

Copy link

@rink-no2 rink-no2 commented Jul 17, 2019

Sweet! Thanks for that.

Here's the groups/conferences in a dictionary.

{"80" : "FBS", "1" : "ACC", "151" : "American", "4" : "Big 12", "5" : "Big Ten", "12" : "Conf USA", "18" : "FBS Ind", "15" : "MAC", "17" : "Mt. West", "9" : "Pac 12", "8" : "SEC", "37" : "Sun Belt"}

@ashley-figueira

This comment has been minimized.

Copy link

@ashley-figueira ashley-figueira commented Jul 18, 2019

Can someone provide me with UFC events and figther information?

@bharris9

This comment has been minimized.

@ashley-figueira

This comment has been minimized.

Copy link

@ashley-figueira ashley-figueira commented Jul 18, 2019

It helps a lot thank you :)

@afarntrog

This comment has been minimized.

Copy link

@afarntrog afarntrog commented Jul 18, 2019

How can I get the schedules of all the available sports? Thanks.

@afarntrog

This comment has been minimized.

Copy link

@afarntrog afarntrog commented Jul 19, 2019

Hi does anyone know how to get the current live schedule for a particular sport?
For example how would I get this https://www.espn.com/mma/schedule

@rink-no2

This comment has been minimized.

Copy link

@rink-no2 rink-no2 commented Jul 19, 2019

Hi does anyone know how to get the current live schedule for a particular sport?
For example how would I get this https://www.espn.com/mma/schedule

For that, I think you would use: http://site.api.espn.com/apis/site/v2/sports/mma/ufc/scoreboard

Follow the tree down (FireFox set this up nicely) ... "events" -> 0 -> competitions (Right now, at about 7:00pm there's a list of 13.)

@afarntrog

This comment has been minimized.

Copy link

@afarntrog afarntrog commented Jul 19, 2019

This looks great. Thank you @rink-no2

@ashley-figueira

This comment has been minimized.

Copy link

@ashley-figueira ashley-figueira commented Jul 29, 2019

The rankings URL only gives the first position for each wieght class - http://site.api.espn.com/apis/site/v2/sports/mma/ufc/rankings

Any one know how to get the full rankings for each weight class?

@wwillard7800

This comment has been minimized.

Copy link

@wwillard7800 wwillard7800 commented Aug 8, 2019

I'm looking for the MLB parameter to access by date. I tried "date=" and that did not seem to work for me.

@rink-no2

This comment has been minimized.

Copy link

@rink-no2 rink-no2 commented Aug 8, 2019

Try using "dates" (instead of date) with the format YYYYMMDD. So to get a list of all games today: "dates=20190808"

@wwillard7800

This comment has been minimized.

Copy link

@wwillard7800 wwillard7800 commented Aug 8, 2019

That was it. Thank you.

@MaximeHg

This comment has been minimized.

Copy link

@MaximeHg MaximeHg commented Aug 12, 2019

Thanks!

@blakeneely

This comment has been minimized.

Copy link

@blakeneely blakeneely commented Sep 9, 2019

This is such a great find! Anyone figure our players yet?

@wwillard7800

This comment has been minimized.

Copy link

@wwillard7800 wwillard7800 commented Sep 23, 2019

Does the "dates" parameter support multiple dates, or a range of dates?

It appears to work with dates=date1-date2 to obtain a range.

@bballcode

This comment has been minimized.

Copy link

@bballcode bballcode commented Sep 28, 2019

Any sort of player endpoint? You can grab rosters but only the most recent it seems. Anywhere to grab info for a player ID? Or historical rosters?

@bssbharti

This comment has been minimized.

Copy link

@bssbharti bssbharti commented Oct 21, 2019

Is there a way to get current odds of the team for Win/Lose?

@hoopsmcg2019

This comment has been minimized.

Copy link

@hoopsmcg2019 hoopsmcg2019 commented Oct 26, 2019

Anyone have any luck getting the statistics to work for NBA? I tried the link below but there aren't any actual stats in it.

https://site.api.espn.com/apis/site/v2/sports/basketball/nba/statistics

@MaximeHg

This comment has been minimized.

Copy link

@MaximeHg MaximeHg commented Nov 5, 2019

Note that you can get a summary of all NCAAMBB teams and their conferences (except 2 or 3 of them) with this route : http://site.api.espn.com/apis/site/v2/sports/basketball/mens-college-basketball/groups

You can also find info about a NCAAMBB player here:
https://site.web.api.espn.com/apis/common/v3/sports/basketball/mens-college-basketball/athletes/:athleteId
and it seems like player stats are also available through this route: https://site.web.api.espn.com/apis/common/v3/sports/basketball/mens-college-basketball/athletes/:athleteId/splits (here's an example id for testing: 4397988)

@bcutler94

This comment has been minimized.

Copy link

@bcutler94 bcutler94 commented Nov 15, 2019

For players...

https://site.web.api.espn.com/apis/common/v3/sports/:sport/:league_abbrev/athletes/:athlete_id

Example for nfl player:

https://site.web.api.espn.com/apis/common/v3/sports/football/nfl/athletes/101

The endpoints are janky af they keep timing out, I have to hit them multiple times sometimes

@akeaswaran

This comment has been minimized.

Copy link
Owner Author

@akeaswaran akeaswaran commented Nov 15, 2019

Huh, these are v3 endpoints. Have you been able to get them working for any other sports/endpoints, @bcutler94? Would be interested in seeing what data they're rolling out for college football in v3. Where'd you find these?

@bcutler94

This comment has been minimized.

Copy link

@bcutler94 bcutler94 commented Nov 15, 2019

Trial and error

@leiaaloha

This comment has been minimized.

Copy link

@leiaaloha leiaaloha commented Nov 20, 2019

@wwillard7800

This comment has been minimized.

Copy link

@wwillard7800 wwillard7800 commented Nov 20, 2019

@leiaaloha

This comment has been minimized.

Copy link

@leiaaloha leiaaloha commented Nov 20, 2019

@

You need to provide a ‘limit=‘ query parameter with a large value, say 500

On Wed, Nov 20, 2019 at 3:50 PM leiaaloha @.> wrote: Any of you use the scoreboard for mens basketball ? http://site.api.espn.com/apis/site/v2/sports/basketball/mens-college-basketball/scoreboard ? trying to figure out why I don't get the full list of games. On Fri, Nov 15, 2019 at 2:04 PM Ben Cutler @.> wrote: > Trial and error > > — > You are receiving this because you are subscribed to this thread. > Reply to this email directly, view it on GitHub > < https://gist.github.com/b48b02f1c94f873c6655e7129910fc3b?email_source=notifications&email_token=AMEADAWK5YZTIG5QPCAOA73QT4MHTA5CNFSM4HHMUGHKYY3PNVWWK3TUL52HS4DFVNDWS43UINXW23LFNZ2KUY3PNVWWK3TUL5UWJTQAF4IPC#gistcomment-3084529 >, > or unsubscribe > < https://github.com/notifications/unsubscribe-auth/AMEADAXUIX2KHQK44KVJFT3QT4MHTANCNFSM4HHMUGHA > > . > — You are receiving this because you commented. Reply to this email directly, view it on GitHub https://gist.github.com/b48b02f1c94f873c6655e7129910fc3b?email_source=notifications&email_token=AAHAEDGGOW7SZFJRLR7NVI3QUWWLRA5CNFSM4HHMUGHKYY3PNVWWK3TUL52HS4DFVNDWS43UINXW23LFNZ2KUY3PNVWWK3TUL5UWJTQAF4QZI#gistcomment-3088788, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAHAEDHIQYWQAI5SDCYDYDTQUWWLRANCNFSM4HHMUGHA .

Doesn't seem to work, i can put 1000 in there an still only get 4 games for today

@akeaswaran

This comment has been minimized.

Copy link
Owner Author

@akeaswaran akeaswaran commented Nov 21, 2019

The scoreboard endpoint will only give you the games for the date specified, and if you don't provide one, it'll use the current date in UTC (which was already 11/21 when you commented previously). So if you provide a date using something like /scoreboard?dates=20191120 (like you did with that other URL) and then tacked on the limit, you should get a longer list of games.

@ashley-figueira

This comment has been minimized.

Copy link

@ashley-figueira ashley-figueira commented Nov 21, 2019

When fetching all athletes I am using this endpoint -> http://sports.core.api.espn.com/v2/sports/mma/athletes

It sucks because then i need to fetch each athletes profile using http://sports.core.api.espn.com/v2/sports/mma/athletes/{athleteId}

Is it not possible to search athlete by name? So when user types in a name I make a request to fetch/search an athlete with that name?

@leiaaloha

This comment has been minimized.

Copy link

@leiaaloha leiaaloha commented Nov 21, 2019

Thank you for the reply, I do understand you need a date, that was just a reference URL.
Example: http://site.api.espn.com/apis/site/v2/sports/basketball/mens-college-basketball/scoreboard?lang=en&region=us&limit=500&date=20191121
I only see 6 events, but if you go to the site https://www.espn.com/mens-college-basketball/schedule you will see there are a "LOT" more then 6.

@akeaswaran

This comment has been minimized.

Copy link
Owner Author

@akeaswaran akeaswaran commented Nov 21, 2019

@leiaaloha I see it now -- looks like the URL is only returning results for teams in the top 25. Looks like 50 is the ID for the Division 1 group, so if you use that in the URL params, it should work. I tried http://site.api.espn.com/apis/site/v2/sports/basketball/mens-college-basketball/scoreboard?lang=en&region=us&limit=500&dates=20191121&groups=50 and that returned 47 results, which seems accurate when compared to the list on the schedule page.

@iampotential

This comment has been minimized.

Copy link

@iampotential iampotential commented Nov 22, 2019

I love you! Thank you so much

@N0DuckingWay

This comment has been minimized.

Copy link

@N0DuckingWay N0DuckingWay commented Dec 5, 2019

Anyone have any luck getting odds for NCAA Men’s Basketball games?

@SamuilDichev

This comment has been minimized.

Copy link

@SamuilDichev SamuilDichev commented Dec 11, 2019

Anyone got any luck with cricket? API v2 seems to always say invalid sport

@wwillard7800

This comment has been minimized.

Copy link

@wwillard7800 wwillard7800 commented Dec 11, 2019

@wwillard7800

This comment has been minimized.

Copy link

@wwillard7800 wwillard7800 commented Dec 14, 2019

Try this:

https://site.api.espn.com/apis/site/v2/sports/cricket/19430/summary?event=1183532

1183532 is the event ID for Australia v Pakistan
19430 represents any 5 digit number in my investigations

@tbaileyxi

This comment has been minimized.

Copy link

@tbaileyxi tbaileyxi commented Dec 26, 2019

This is incredible. My first post. So, I am working through the Bowl games. And the college football scoreboard only shows 2019 bowls (up to the 31st). I Did another api call for 2020 and it works, however was hoping to get this on one api call. I attempted the date range as follows:
http://site.api.espn.com/apis/site/v2/sports/football/college-football/scoreboardhttp://site.api.espn.com/apis/site/v2/sports/football/college-football/scoreboard?dates=20191228-20200114

any help would be great! (looking at bowl games from dec 28 this year to national championship)

@wwillard7800

This comment has been minimized.

Copy link

@wwillard7800 wwillard7800 commented Dec 27, 2019

@tbaileyxi

This comment has been minimized.

Copy link

@tbaileyxi tbaileyxi commented Dec 27, 2019

Thanks so much!, Incredible...i don't quite get the extra time since the epoch to override. I will just copy it.

Was my solution incorrect? I guess it doesnt matter but curious.

Again, thanks so much!!! Much appreciated.

@tbaileyxi

This comment has been minimized.

Copy link

@tbaileyxi tbaileyxi commented Dec 27, 2019

Any way to just see the winner? I dont see any winner columns? like Winner - Team name
Sucks that the format for these apis go from single row format, to double row format, - I'm not complaining cause its a tremendous resource. Just wondering if i am missing things.

@wwillard7800

This comment has been minimized.

Copy link

@wwillard7800 wwillard7800 commented Dec 27, 2019

@jsblair9

This comment has been minimized.

Copy link

@jsblair9 jsblair9 commented Jan 1, 2020

anyone have any indication that these endpoints will vanish at somepoint? or have an authentication gate implemented in the future?

@bharris9

This comment has been minimized.

Copy link

@bharris9 bharris9 commented Jan 1, 2020

@typicaljon

This comment has been minimized.

Copy link

@typicaljon typicaljon commented Jan 2, 2020

Rankings for NCAAMBB

http://site.api.espn.com/apis/site/v2/sports/basketball/mens-college-basketball/rankings

Haven't figured out how to get previous weeks yet.

@akeaswaran

This comment has been minimized.

Copy link
Owner Author

@akeaswaran akeaswaran commented Jan 2, 2020

@typicaljon looks like you can use the URL param weeks to grab rankings for the current season from various weeks during the year. EX: http://site.api.espn.com/apis/site/v2/sports/basketball/mens-college-basketball/rankings?weeks=3

@typicaljon

This comment has been minimized.

Copy link

@typicaljon typicaljon commented Jan 2, 2020

@akeaswaran excellent, thank you! I tried a few things but not that one.

@rink-no2

This comment has been minimized.

Copy link

@rink-no2 rink-no2 commented Jan 8, 2020

So before I ask more questions here, I figure I should give something back. I used the endpoints here to make a pythonic sport ticker that I've posted the code for here: https://github.com/rink-no2/sports-ticker Works on a raspberry pi, too.

My interests lie in college and pro football. I next want to grab forecasts for during game time. To do that I need to uncover the VENUE in the endpoints. Does any know how to explore these endpoint, or grab the "databases" (can't think of a better word) that they use?

@wwillard7800

This comment has been minimized.

Copy link

@wwillard7800 wwillard7800 commented Jan 8, 2020

@rink-no2

This comment has been minimized.

Copy link

@rink-no2 rink-no2 commented Jan 8, 2020

Hmmm ... I stated my issue poorly. I guess I could just use the city/state to do my look up ... duh. (Yeah, weather forecast. If I know it's going to be a rainy game, maybe I want to look at the under for the game.)

I was quasi interested in making my own venue lookup file. I was really going to make this complicated.

@bharris9

This comment has been minimized.

Copy link

@bharris9 bharris9 commented Jan 8, 2020

@rink-no2

This comment has been minimized.

Copy link

@rink-no2 rink-no2 commented Jan 8, 2020

I'm going to try to go a little farther. I want to use hourly forecast throughout the game. If the game starts at 12:30, say, I can get the forecast at 12, 1, 2, and 3. I got 7 or so months to figure this out. :)

@wwillard7800

This comment has been minimized.

Copy link

@wwillard7800 wwillard7800 commented Jan 8, 2020

@johnaustin1995

This comment has been minimized.

Copy link

@johnaustin1995 johnaustin1995 commented Jan 18, 2020

I converted JSON into a google sheet. When using "http://site.api.espn.com/apis/site/v2/sports/basketball/nba/scoreboard" I get the data for every game in the first few rows, but then the last game repeats for several rows. Also, I can only seem to find the winning team's score. Any suggestions?

@emmamaypaul

This comment has been minimized.

Copy link

@emmamaypaul emmamaypaul commented Jan 24, 2020

Anyone know how to get NBA power rankings?

@vall1128

This comment has been minimized.

Copy link

@vall1128 vall1128 commented Feb 16, 2020

@akeaswaran can I bring this data to my WordPress posts ?

@midium

This comment has been minimized.

Copy link

@midium midium commented Feb 19, 2020

Anyone know if the NFL scores feed is populating events for last played week only? I mean at the moment it reports just the superbowl so I assume it will show just last played week games.

@rink-no2

This comment has been minimized.

Copy link

@rink-no2 rink-no2 commented Feb 19, 2020

I think the scores feed get "stuck" once the season is over. You can always find scores using the "dates" parameter. (If you use "dates" and there are no games, like in March, it should return nothing.)

@vall1128

This comment has been minimized.

Copy link

@vall1128 vall1128 commented Feb 19, 2020

All Teams: http://site.api.espn.com/apis/site/v2/sports/basketball/mens-college-basketball/teams

can anyone help me to get a specific team data to a WordPress site?

@MannanK

This comment has been minimized.

Copy link

@MannanK MannanK commented Feb 25, 2020

Has anyone been able to figure out if there are params we can use to get back only specific data from an endpoint?

For example, if I'm trying to get only the jersey number of a specific NFL athlete, I'd be able to use https://site.web.api.espn.com/apis/common/v3/sports/football/nfl/athletes/1, but from there I haven't been able to figure out if it's possible to get back only the jersey number and not all the extra info.

I've tried params such as filter and enable, but to no avail.

@nwithan8

This comment has been minimized.

Copy link

@nwithan8 nwithan8 commented Feb 25, 2020

@MannanK

This comment has been minimized.

Copy link

@MannanK MannanK commented Feb 25, 2020

@nwithan8 that is certainly the route I will likely take, it was more for sake of efficiency since if I only require that one piece of data, there's no real need for all the extraneous data. But it certainly doesn't have a negative impact

@bcutler94

This comment has been minimized.

Copy link

@bcutler94 bcutler94 commented Feb 26, 2020

@MannanK sounds like you want individual player’s info. Depending on your use case, you could use the NFL teams endpoint and extract player info, instead of making an API call for every player. The only question is if the teams endpoint includes players college info ;)

@MannanK

This comment has been minimized.

Copy link

@MannanK MannanK commented Feb 26, 2020

@bcutler94 It seems as though you've read my mind because that was the approach I was leaning towards, just trying to consider all avenues. I had seen some of your replies before already and they were helpful, nice to see an old-timer back to give some experienced advice, thanks ;)

@hwustrack

This comment has been minimized.

Copy link

@hwustrack hwustrack commented Feb 27, 2020

When I make my first request to https://site.api.espn.com/apis/site/v2/sports/basketball/nba/scoreboard?limit=100, the data seems to be stale. like all of the games will say scheduled even though they're in progress. If I make the same request again, I get the expected data. Has anyone else seen this?

@wwillard7800

This comment has been minimized.

Copy link

@wwillard7800 wwillard7800 commented Feb 27, 2020

@jsblair9

This comment has been minimized.

Copy link

@jsblair9 jsblair9 commented Feb 27, 2020

If you're hitting that endpoint through your browser (or a scraper that emulates a browser), very likely you're getting a cached result. If you're hitting it with something like a curl request, then just make sure to set your headers to prevent getting a cached version (but through curl that is the default so shouldn't be happening there)

@akeaswaran

This comment has been minimized.

Copy link
Owner Author

@akeaswaran akeaswaran commented Feb 28, 2020

If you add time since epoch to the end of the URL as another query param without a key, you should bust the cache.

Example here: https://gist.github.com/akeaswaran/b48b02f1c94f873c6655e7129910fc3b#gistcomment-3121318

@typicaljon

This comment has been minimized.

Copy link

@typicaljon typicaljon commented Mar 8, 2020

Anyone know how to get previous seasons in men's college bball?

@willettsdev

This comment has been minimized.

Copy link

@willettsdev willettsdev commented Mar 9, 2020

@vall1128

This comment has been minimized.

Copy link

@vall1128 vall1128 commented Mar 10, 2020

@zag2me

This comment has been minimized.

Copy link

@zag2me zag2me commented Mar 10, 2020

https://www.thesportsdb.com/ also has a lot of free sports API endpoints. It translates some of the ESPN data as source into a nicer package with artwork etc. Particularly good for things like Logos and Banners for teams.

@ashley-figueira

This comment has been minimized.

Copy link

@ashley-figueira ashley-figueira commented Mar 15, 2020

Can anyone get me video content for MMA/UFC?

@ignaciosamba

This comment has been minimized.

Copy link

@ignaciosamba ignaciosamba commented Mar 19, 2020

Can anyone get me video content for MMA/UFC?

Hi, maybe this can help you:
http://www.espn.com/apis/devcenter/docs/video.html#using-the-api

@ashley-figueira

This comment has been minimized.

Copy link

@ashley-figueira ashley-figueira commented Mar 22, 2020

Can anyone get me video content for MMA/UFC?

Hi, maybe this can help you:
http://www.espn.com/apis/devcenter/docs/video.html#using-the-api

Couldn't find anything. Tried a bunch of different combinations and always got an error.

@ignaciosamba

This comment has been minimized.

Copy link

@ignaciosamba ignaciosamba commented Mar 23, 2020

Can anyone get me video content for MMA/UFC?

Hi, maybe this can help you:
http://www.espn.com/apis/devcenter/docs/video.html#using-the-api

Couldn't find anything. Tried a bunch of different combinations and always got an error.

It seems that you need the API key as said on the page:

"The format of an API request is as follows:
http://api.espn.com/:version/:resource/:method?apikey=:yourkey "

Don't know if this API is open...

Also, you could use this one:

http://api.espn.com/v1/now?leagues=mma

And try to get the video of the response.

@zag2me

This comment has been minimized.

Copy link

@zag2me zag2me commented Mar 23, 2020

The site www.thesportsdb.com supports MMA and has YouTube highlight links available on the API. Also loads of event artwork and schedules.

@craigwendel

This comment has been minimized.

Copy link

@craigwendel craigwendel commented Apr 16, 2020

Is there a way to get all the NCAA FBS (I-A) teams? I hit the groups endpoint below but it defaults to 25 teams in each group
http://site.api.espn.com/apis/site/v2/sports/football/college-football/groups

I know you can put a limit on certain endpoints and I can pull up over 700+ teams but I'd like to just get NCAA FBS (I-A) teams
http://site.api.espn.com/apis/site/v2/sports/football/college-football/teams?limit=1000

@akeaswaran

This comment has been minimized.

Copy link
Owner Author

@akeaswaran akeaswaran commented Apr 16, 2020

I think adding the groups query parameter to that second URL should get you want you want. IIRC, the group for FBS schools is 80, so something like http://site.api.espn.com/apis/site/v2/sports/football/college-football/teams?limit=1000&groups=80 should work.

@craigwendel

This comment has been minimized.

Copy link

@craigwendel craigwendel commented Apr 16, 2020

I think adding the groups query parameter to that second URL should get you want you want. IIRC, the group for FBS schools is 80, so something like http://site.api.espn.com/apis/site/v2/sports/football/college-football/teams?limit=1000&groups=80 should work.

This worked awesome! Thanks, @akeaswaran!

@edenidan

This comment has been minimized.

Copy link

@edenidan edenidan commented Apr 28, 2020

Anyone know how to get NBA power rankings?

https://nba-rest-api.now.sh/api/power_ranking.py
This is an api I made to get up to to date power rankings from nba.com

@emmamaypaul

@pecjas

This comment has been minimized.

Copy link

@pecjas pecjas commented May 2, 2020

Has anyone else experienced issues with the NFL - All Teams API? The response I get only has 25 teams in the "teams" object, but stepping through the team-specific API there are 34 (including AFC and NFC for the Pro Bowl). It's a complete JSON object, so I don't believe the request is getting truncated.

@AndresXI

This comment has been minimized.

Copy link

@AndresXI AndresXI commented Jul 1, 2020

How likely will these hidden apis stay active? Will they be taken down sometime in the future?

@akeaswaran

This comment has been minimized.

Copy link
Owner Author

@akeaswaran akeaswaran commented Jul 1, 2020

@AndresXI it's hard to say. My guess is that these will stay available until the next time ESPN redoes their site, as most of these endpoints power various components across the current site.

@dauble

This comment has been minimized.

Copy link

@dauble dauble commented Jul 16, 2020

EDIT: Nevermind. I looked again through these comments. Passing in "dates" as a param and dates in format YYYYMMDD-YYYYMMDD solved my problem.
https://site.web.api.espn.com/apis/v2/scoreboard/header?sport=racing&league=f1&region=us&lang=en&contentorigin=espn&tz=America/New_York&dates=20200711-20200711

Do you have any information for racing, such as Formula1? I have only been able to determine the upcoming race.

https://site.web.api.espn.com/apis/v2/scoreboard/header?sport=racing&league=f1&region=us&lang=en&contentorigin=espn&tz=America/New_York

@raymondflores

This comment has been minimized.

Copy link

@raymondflores raymondflores commented Aug 18, 2020

Has anyone else experienced issues with the NFL - All Teams API? The response I get only has 25 teams in the "teams" object, but stepping through the team-specific API there are 34 (including AFC and NFC for the Pro Bowl). It's a complete JSON object, so I don't believe the request is getting truncated.

@pecjas I believe this is happening because by default the limit is 25 try adding '?limit=32' and that should work. Here's an example of the full url i used to get all 32 teams
https://site.web.api.espn.com/apis/site/v2/sports/football/nfl/teams?region=us&lang=en&contentorigin=espn&limit=99

@aragrevo

This comment has been minimized.

Copy link

@aragrevo aragrevo commented Aug 30, 2020

any endpoint for Cycling?

@ajatsoft

This comment has been minimized.

Copy link

@ajatsoft ajatsoft commented Sep 4, 2020

Is posible to get data between 2 dates? Or for each were instead each day?

@dauble

This comment has been minimized.

Copy link

@dauble dauble commented Sep 4, 2020

Is posible to get data between 2 dates? Or for each were instead each day?

Try adding &dates=20200711-20200904 to the end of your query, in "from-to",. YYYYMMDD format.

@ajatsoft

This comment has been minimized.

Copy link

@ajatsoft ajatsoft commented Sep 7, 2020

thank you¡¡

and statics for league?

@Phloot

This comment has been minimized.

Copy link

@Phloot Phloot commented Sep 11, 2020

Looks like I can get hit the scoreboard endpoint for NFL games, but is there a known play by play endpoint for active games? Can't seem to find it.

@wwillard7800

This comment has been minimized.

Copy link

@wwillard7800 wwillard7800 commented Sep 11, 2020

@jakolion

This comment has been minimized.

Copy link

@jakolion jakolion commented Sep 11, 2020

Looks like I can get hit the scoreboard endpoint for NFL games, but is there a known play by play endpoint for active games? Can't seem to find it.

Found this: http://site.api.espn.com/apis/site/v2/sports/football/nfl/summary?event=401220225

drives > previous > {index} > plays > {index}

@ajatsoft

This comment has been minimized.

Copy link

@ajatsoft ajatsoft commented Sep 15, 2020

how I can get event id of a team events when event is live?
I can get before event is live here:
http://site.api.espn.com/apis/site/v2/sports/soccer/esp.2/teams/4438
but when is live nextevent value is empty

and,

it is possible to obtain these pages from the api,
results:
https://www.espn.com/soccer/team/results/_/id/4438/castellon
fixtures:
https://www.espn.com/soccer/team/fixtures/_/id/4438/castellon

@ericfromspringfield1

This comment has been minimized.

Copy link

@ericfromspringfield1 ericfromspringfield1 commented Sep 22, 2020

how I can get event id of a team events when event is live?
I can get before event is live here:
http://site.api.espn.com/apis/site/v2/sports/soccer/esp.2/teams/4438
but when is live nextevent value is empty

and,

it is possible to obtain these pages from the api,
results:
https://www.espn.com/soccer/team/results/_/id/4438/castellon
fixtures:
https://www.espn.com/soccer/team/fixtures/_/id/4438/castellon

Not sure this helps for your case, but I had the same problem for college football but found that if I go to the ESPN website and find the "Score" section for NCAAF, I can click on Gamecast for a particular game and the Id is listed at the end of the url. Hope that makes sense. Happy GETTING and Fetching.

@dtokarz1

This comment has been minimized.

Copy link

@dtokarz1 dtokarz1 commented Sep 22, 2020

This thread has been fantastic! But I have been having trouble getting the leaderboard for a specific golf tournament. For example, if I want to view the Safeway Open the ESPN link is
https://www.espn.com/golf/leaderboard/_/tournamentId/401219793
If I try to get the API link any combination of /tournamentID/401219793 or /leaderboard/401219793 or whatever
https://site.web.api.espn.com/apis/site/v2/sports/golf/leaderboard
always brings up the current tournament or a 404 error. Has anyone been able to grab a specific tournament's API?

EDIT: Nevermind. I figured it out after looking at jakolion's post. Event parameter was what I was missing. Here is the link in case anyone was looking for the same thing...

http://site.api.espn.com/apis/site/v2/sports/golf/leaderboard?event=401219793

@galbrecht18

This comment has been minimized.

Copy link

@galbrecht18 galbrecht18 commented Sep 23, 2020

Hey @dtokarz1 super helpful thanks! Do you know of a way to get the specific hole breakdowns for a player? So what the scored on what hole by what round?

@dtokarz1

This comment has been minimized.

Copy link

@dtokarz1 dtokarz1 commented Sep 23, 2020

@galbrecht18 No sorry. I haven't come across that endpoint yet. I have found the rankings, leaderboards and a schedule. Player profile I have found too but not very much information. I'll keep my eyes open.

@galbrecht18

This comment has been minimized.

Copy link

@galbrecht18 galbrecht18 commented Sep 23, 2020

Sounds good thanks @dtokarz1. I think its something along the lines of http://www.espn.com/golf/player/scorecards/_/id/78/tournamentId/401223849 (obviously this just being the direct link). Good luck and if I find anything else for this or else golf wise I'll post.

@dtokarz1

This comment has been minimized.

Copy link

@dtokarz1 dtokarz1 commented Sep 23, 2020

Hey @galbrecht18. Check out this link. Change out the tournamentID and PlayerID and I think you can get whatever you want...

http://sports.core.api.espn.com/v2/sports/golf/leagues/pga/events/401219793/competitions/401219793/competitors/78/linescores?lang=en&region=us

@galbrecht18

This comment has been minimized.

Copy link

@galbrecht18 galbrecht18 commented Sep 24, 2020

@dtokarz1 that's it exactly! thanks so much for the follow up and sharing...genuinely appreciated!

@cdulavitz

This comment has been minimized.

Copy link

@cdulavitz cdulavitz commented Sep 30, 2020

Is there any way to get a list of all player IDs (current and historical) in a sport/league? Similar to how you can hit an All Teams endpoint:
https://site.api.espn.com/apis/site/v2/sports/basketball/nba/teams

But trying to do the same for just athletes does not work:
https://site.web.api.espn.com/apis/common/v3/sports/basketball/nba/athletes

Or at least a way find a player ID by a name search?

@tatew

This comment has been minimized.

Copy link

@tatew tatew commented Oct 11, 2020

Anyone curious for the schedule for a specific CFB team just append "/schedule" to the team information link:
http://site.api.espn.com/apis/site/v2/sports/football/college-football/teams/vt/schedule

@danielfowler

This comment has been minimized.

Copy link

@danielfowler danielfowler commented Oct 21, 2020

@MannanK sounds like you want individual player’s info. Depending on your use case, you could use the NFL teams endpoint and extract player info, instead of making an API call for every player. The only question is if the teams endpoint includes players college info ;)

What teams endpoint were you referencing, @MannanK? The team endpoints I see don't have a nested roster.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.