Skip to content

Instantly share code, notes, and snippets.

@nntrn
Last active April 2, 2025 14:32
Show Gist options
  • Save nntrn/ee26cb2a0716de0947a0a4e9a157bc1c to your computer and use it in GitHub Desktop.
Save nntrn/ee26cb2a0716de0947a0a4e9a157bc1c to your computer and use it in GitHub Desktop.
List of nfl api endpoints from espn

ESPN API ENDPOINTS

This page is limited to NFL endpoints but can be refashioned for other leagues (i.e. /sports/football/leagues/nfl/ => /sports/baseball/leagues/mlb/)

NFL ENDPOINTS

Leagues: sports.core.api.espn.com/v2/sports/football/leagues/nfl

Athletes: sports.core.api.espn.com/v2/sports/football/leagues/nfl/seasons/:year/athletes/:athlete_id

Teams: sports.core.api.espn.com/v2/sports/football/leagues/nfl/seasons/:year/teams

Team: sports.core.api.espn.com/v2/sports/football/leagues/nfl/seasons/:year/teams/:team_id

Plays: sports.core.api.espn.com/v2/sports/football/leagues/nfl/events/:game_id/competitions/:game_id/plays?limit=300

Depth charts: sports.core.api.espn.com/v2/sports/football/leagues/nfl/seasons/:year/teams/:team_id/depthcharts

Whitelist dates: sports.core.api.espn.com/v2/sports/football/leagues/nfl/calendar/whitelist

Season: sports.core.api.espn.com/v2/sports/football/leagues/nfl/seasons/:year

Week: sports.core.api.espn.com/v2/sports/football/leagues/nfl/seasons/2020/types/:season_type/weeks/:week

All weeks sports.core.api.espn.com/v2/sports/football/leagues/nfl/seasons/:year/types/:season_type/weeks

Odds

Win probabilities sports.core.api.espn.com/v2/sports/football/leagues/nfl/events/:game_id/competitions/:game_id/probabilities*?limit=200*

Odds: sports.core.api.espn.com/v2/sports/football/leagues/nfl/events/:game_id/competitions/:game_id/odds

Against-the-spread: sports.core.api.espn.com/v2/sports/football/leagues/nfl/seasons/:year/types/2/teams/:team_id/ats

Futures: sports.core.api.espn.com/v2/sports/football/leagues/nfl/seasons/:year/futures

Head-to-head (game): sports.core.api.espn.com/v2/sports/football/leagues/nfl/events/:game_id/competitions/:game_id/odds/:bet_provider_id/head-to-heads

Odds records: sports.core.api.espn.com/v2/sports/football/leagues/nfl/seasons/:year/types/0/teams/:team_id/odds-records

Odds history - Game: sports.core.api.espn.com/v2/sports/football/leagues/nfl/events/401249063/competitions/401249063/odds/:bet_provider_id/history/0/movement?limit=100

Odds history - Team: sports.core.api.espn.com/v2/sports/football/leagues/nfl/teams/:team_id/odds/:bet_provider_id/past-performances?limit=200

bet_provider_id:

  • 38: Caesars
  • 31: William Hill
  • 41: SugarHouse
  • 36: Unibet
  • 2000: Bet 365
  • 25: Westgate
  • 45: William Hill (New Jersey)
  • 1001: accuscore
  • 1004: consensus
  • 1003: numberfire
  • 1002: teamrankings

Stats

Positions (enum): sports.core.api.espn.com/v2/sports/football/leagues/nfl/positions*?limit=100*

QBR Weekly/Game stats: sports.core.api.espn.com/v2/sports/football/leagues/nfl/seasons/2020/types/2/weeks/:week_num/qbr/10000

List of games via date-range: site.api.espn.com/apis/site/v2/sports/football/nfl/scoreboard?limit=1000&dates=20200901-20210228

  • date range cannot exceed 13 months
  • dates can also be = YYYYMMDD, YYYY
  • add &1577413600 at the end for overriding the cache

Athlete

all active athletes: sports.core.api.espn.com/v2/sports/football/leagues/nfl/athletes?active=true

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

site.web.api.espn.com/apis/common/v3/sports/football/nfl/athletes/:athlete_id/splits?season=2020

site.web.api.espn.com/apis/common/v3/sports/football/nfl/athletes/:athlete_id/gamelog

site.web.api.espn.com/apis/common/v3/sports/football/nfl/athletes/:athlete_id/stats

site.web.api.espn.com/apis/common/v3/sports/football/nfl/athletes/:athlete_id/bio

site.web.api.espn.com/apis/common/v3/sports/football/nfl/athletes/:athlete_id/overview

sports.core.api.espn.com/v2/sports/football/leagues/nfl/seasons/:year/types/2/athletes/:athlete_id/statistics

sports.core.api.espn.com/v2/sports/football/leagues/nfl/seasons/2020/types/2/athletes/:athlete_id/projections

sports.core.api.espn.com/v2/sports/football/leagues/nfl/events/:game_id/competitions/:game_id/competitors/:team_id/roster/:athlete_id/statistics/0

Team

site.api.espn.com/apis/site/v2/sports/football/nfl/teams

site.api.espn.com/apis/site/v2/sports/football/nfl/teams/:team_id

site.api.espn.com/apis/site/v2/sports/football/nfl/teams/:team_id/roster

site.api.espn.com/apis/site/v2/sports/football/nfl/teams/:team_id/schedule*{?season,seasontype}*

sports.core.api.espn.com/v2/sports/football/leagues/nfl/seasons/2020/types/2/teams/:team_id/statistics

sports.core.api.espn.com/v2/sports/football/leagues/nfl/seasons/2020/teams/:team_id/projection

sports.core.api.espn.com/v2/sports/football/leagues/nfl/teams/:team_id/odds/1002/past-performances?limit=140

sports.core.api.espn.com/v2/sports/football/leagues/nfl/events/:game_id/competitions/:game_id/competitors/:team_id/roster?season=YYYY

site.api.espn.com/apis/site/v2/sports/football/nfl/teams/3?enable=roster

sports.core.api.espn.com/v2/sports/football/leagues/nfl/seasons/:year/teams/:team_id/projection

sports.core.api.espn.com/v2/sports/football/leagues/nfl/teams/:team_id/odds/:bet_provider_id/past-performances?limit=200

Leaders

site.api.espn.com/apis/site/v3/sports/football/nfl/leaders*{?season,seasontype}*

Scoreboard

site.api.espn.com/apis/site/v2/sports/football/college-football**/scoreboard**{?dates=YYYYMMDD}

Search

site.web.api.espn.com/apis/common/v3/search?region=us&lang=en&query=nfl&limit=5&mode=prefix

site.web.api.espn.com/apis/common/v3/search

site.web.api.espn.com/apis/fantasy/v2/games/ffl/games?dates={YYYYMMDD}-{YYYYMMDD}&pbpOnly=true

News

site.api.espn.com/apis/site/v2/sports/football/nfl/news

Header

site.web.api.espn.com/apis/v2/scoreboard/header?sport=football&league=nfl

Fantasy

fantasy.espn.com/apis/v3/games/ffl/seasons/2019/segments/0/leagues/1241838?view=mDraftDetail&view=mLiveScoring&view=mMatchupScore&view=mPendingTransactions&view=mPositionalRatings&view=mSettings&view=mTeam&view=modular&view=mNav

seasontype

  • year - Integer year in which the season started.
  • type - Integer corresponding to the season type (1 = preseason, 2 = regular season, 3 = postseason).
  • description - String representation of the season type. For example, "regular" for season type 2.

Misc

sports.core.api.espn.com/v2/sports/football/leagues/nfl/athletes/2/statisticslog

sports.core.api.espn.com/v2/sports/football/leagues/nfl/seasons/:year/teams/:team_id

sports.core.api.espn.com/v2/sports/football/leagues/nfl/seasons/:year/teams/:team_id/athletes?limit=200


Resources

ESPN Leagues API List

Starting endpoint: https://sports.core.api.espn.com/v2/sports

BASEBALL

BASKETBALL

FOOTBALL

GOLF

HOCKEY

LACROSSE

MMA

RACING

RUGBY

RUGBY-LEAGUE

SOCCER

VOLLEYBALL

AUSTRALIAN-FOOTBALL

TENNIS

WATER-POLO

FIELD-HOCKEY

@JimNayzium
Copy link

rotating proxies sounds like it's above my current pay-grade. 😄 But I could probably figure it out. Is that basically like sending my requests from a different IP address each time somehow automatically? A quick google returned services like smartproxy and simiilar.
Is that basically the gist of it? My outgoing request goes out as if it's not from me, but from some other "proxied" IP address?

Yep, you got it!

You are a GOD-SEND to me!! I figured it out! Thanks for the tip.

@JimNayzium
Copy link

JimNayzium commented Feb 25, 2025

Has anyone ever made any sense out of the espn game id's?

401671489

I feel like the 40167 is for season 2024 of the NFL, and the play_id's all begin with the game id, but that's about where it ends pattern wise for me.

Unless it's something like the play_id is the game id plus the number of seconds since kickoff maybe?

But the GAME id's themselves make no sense at all.

40167 - 1489 - during week 18 all the game ids' last four digits begin with 18, but the other weeks, that's not true at all.

Here are the espn game ids next to the week number of the game.
Sorted by the game id within the give week.
I was hoping to derive any information implied by the game id to help with some other things, like MNF or TNF or SNF or whatever... maybe stadium location etc... which I know I can derive from other feeds, but I was just assuming the game id had more intuitive name conventions than it actually does, but I don't think it does.

Preseason

401671610 : -4
401671615 : -3
401671897 : -3
401671900 : -3
401671902 : -3
401671905 : -3
401671907 : -3
401671910 : -3
401671913 : -3
401671915 : -3
401671918 : -3
401671920 : -3
401672005 : -3
401673171 : -3
401673456 : -3
401673457 : -3
401673472 : -3
401671611 : -2
401671898 : -2
401671901 : -2
401671903 : -2
401671906 : -2
401671908 : -2
401671911 : -2
401671916 : -2
401671919 : -2
401671921 : -2
401671924 : -2
401671925 : -2
401671936 : -2
401672897 : -2
401673562 : -2
401676591 : -2
401671612 : -1
401671613 : -1
401671614 : -1
401671896 : -1
401671899 : -1
401671904 : -1
401671909 : -1
401671912 : -1
401671914 : -1
401671917 : -1
401671922 : -1
401672006 : -1
401672898 : -1
401673172 : -1
401673458 : -1
401673561 : -1

Regular Season 

401671617 : 1
401671628 : 1
401671659 : 1
401671664 : 1
401671696 : 1
401671712 : 1
401671719 : 1
401671734 : 1
401671744 : 1
401671761 : 1
401671770 : 1
401671789 : 1
401671792 : 1
401671805 : 1
401671849 : 1
401671861 : 1
401671624 : 2
401671635 : 2
401671636 : 2
401671645 : 2
401671652 : 2
401671668 : 2
401671670 : 2
401671691 : 2
401671702 : 2
401671709 : 2
401671716 : 2
401671721 : 2
401671723 : 2
401671754 : 2
401671786 : 2
401671807 : 2
401671490 : 3
401671632 : 3
401671646 : 3
401671658 : 3
401671662 : 3
401671682 : 3
401671736 : 3
401671741 : 3
401671763 : 3
401671771 : 3
401671772 : 3
401671793 : 3
401671808 : 3
401671823 : 3
401671855 : 3
401671865 : 3
401671491 : 4
401671622 : 4
401671643 : 4
401671672 : 4
401671674 : 4
401671683 : 4
401671727 : 4
401671740 : 4
401671745 : 4
401671755 : 4
401671758 : 4
401671783 : 4
401671812 : 4
401671857 : 4
401671867 : 4
401671871 : 4
401671626 : 5
401671633 : 5
401671679 : 5
401671680 : 5
401671687 : 5
401671700 : 5
401671718 : 5
401671747 : 5
401671756 : 5
401671784 : 5
401671804 : 5
401671815 : 5
401671859 : 5
401671872 : 5
401671619 : 6
401671625 : 6
401671655 : 6
401671657 : 6
401671684 : 6
401671714 : 6
401671722 : 6
401671735 : 6
401671764 : 6
401671769 : 6
401671791 : 6
401671802 : 6
401671819 : 6
401671820 : 6
401671616 : 7
401671640 : 7
401671644 : 7
401671663 : 7
401671695 : 7
401671699 : 7
401671710 : 7
401671724 : 7
401671730 : 7
401671777 : 7
401671785 : 7
401671801 : 7
401671816 : 7
401671853 : 7
401671864 : 7
401671599 : 8
401671600 : 8
401671618 : 8
401671667 : 8
401671671 : 8
401671685 : 8
401671707 : 8
401671720 : 8
401671739 : 8
401671750 : 8
401671760 : 8
401671795 : 8
401671817 : 8
401671850 : 8
401671852 : 8
401671856 : 8
401671493 : 9
401671623 : 9
401671629 : 9
401671647 : 9
401671650 : 9
401671661 : 9
401671688 : 9
401671704 : 9
401671711 : 9
401671728 : 9
401671767 : 9
401671776 : 9
401671797 : 9
401671809 : 9
401671822 : 9
401671637 : 10
401671641 : 10
401671676 : 10
401671678 : 10
401671693 : 10
401671708 : 10
401671733 : 10
401671742 : 10
401671751 : 10
401671787 : 10
401671803 : 10
401671810 : 10
401671863 : 10
401671873 : 10
401671630 : 11
401671642 : 11
401671665 : 11
401671675 : 11
401671694 : 11
401671701 : 11
401671746 : 11
401671748 : 11
401671757 : 11
401671782 : 11
401671813 : 11
401671824 : 11
401671851 : 11
401671869 : 11
401671638 : 12
401671651 : 12
401671656 : 12
401671689 : 12
401671715 : 12
401671768 : 12
401671775 : 12
401671794 : 12
401671847 : 12
401671858 : 12
401671866 : 12
401671870 : 12
401671875 : 12
401671492 : 13
401671620 : 13
401671627 : 13
401671649 : 13
401671666 : 13
401671686 : 13
401671703 : 13
401671705 : 13
401671726 : 13
401671743 : 13
401671752 : 13
401671753 : 13
401671779 : 13
401671781 : 13
401671798 : 13
401671806 : 13
401671601 : 14
401671631 : 14
401671648 : 14
401671654 : 14
401671660 : 14
401671690 : 14
401671713 : 14
401671773 : 14
401671774 : 14
401671788 : 14
401671814 : 14
401671821 : 14
401671848 : 14
401671489 : 15
401671639 : 15
401671669 : 15
401671677 : 15
401671681 : 15
401671697 : 15
401671706 : 15
401671731 : 15
401671737 : 15
401671762 : 15
401671766 : 15
401671796 : 15
401671818 : 15
401671825 : 15
401671854 : 15
401671860 : 15
401671494 : 16
401671621 : 16
401671673 : 16
401671692 : 16
401671717 : 16
401671729 : 16
401671732 : 16
401671749 : 16
401671759 : 16
401671778 : 16
401671780 : 16
401671790 : 16
401671811 : 16
401671862 : 16
401671868 : 16
401671874 : 16
401671495 : 17
401671634 : 17
401671653 : 17
401671698 : 17
401671725 : 17
401671738 : 17
401671765 : 17
401671799 : 17
401671800 : 17
401671829 : 17
401671832 : 17
401671835 : 17
401671842 : 17
401671846 : 17
401671876 : 17
401671877 : 17
401671826 : 18
401671827 : 18
401671828 : 18
401671830 : 18
401671831 : 18
401671833 : 18
401671834 : 18
401671836 : 18
401671837 : 18
401671838 : 18
401671839 : 18
401671840 : 18
401671841 : 18
401671843 : 18
401671844 : 18
401671845 : 18

Post Season
401671878 : 19
401671879 : 19
401671880 : 19
401671881 : 19
401671882 : 19
401671883 : 19
401671884 : 20
401671885 : 20
401671886 : 20
401671937 : 20
401671887 : 21
401671888 : 21
401671889 : 23

@RhettTitus
Copy link

Some of the conferences for Men's College Basketball are not on the api. Does anyone know how to obtain these conference teams past games? SBC, WCC, Summit, MVC, and the Big West?

@propsdaily
Copy link

propsdaily commented Feb 25, 2025

Some of the conferences for Men's College Basketball are not on the api. Does anyone know how to obtain these conference teams past games? SBC, WCC, Summit, MVC, and the Big West?

You can filter by group (conference). For example group 29 is WCC:
https://site.api.espn.com/apis/site/v2/sports/basketball/mens-college-basketball/scoreboard?groups=29

Group 50 is all Division 1
https://site.api.espn.com/apis/site/v2/sports/basketball/mens-college-basketball/scoreboard?groups=50

And for past games you can add the &dates=YYYYMMDD parameter

@ryanbuckner
Copy link

I'm guessing it's just the next unique ID int he database they use, and it may not be sport specific

@JimNayzium
Copy link

The description text in the plays feeds refers to the players who get penalties like this:

PENALTY on BUF-Do.Williams.

But I cannot find any references from the feeds on where that short name gets defined. The athlete individual end points have a shortName property that in this case would be equal to:

D. Williams

But no where in the feeds can I find Dorian Williams referenced as BUF-Do.Williams or Do.Williams.

Which is not the biggest deal as we can recreate a player database to match them all I guess, but it just feels like ESPN has this information out there if we could find it. They clearly add the second and third letter to the abbreviation when multiple players on the same team would match if they left it one letter.

Anyone seen this information in a roster feed or team feed somewhere?

@JimNayzium
Copy link

Does anyone know or is able to figure out exactly what the P11, R16 type verbiage on the far right of these reports means from the NFL?

https://static.www.nfl.com/gamecenter/45c2774c-1313-11ef-afd1-646009f18b2e.pdf

They are periodically in the far right but not on every line.

@ryanbuckner
Copy link

ryanbuckner commented Feb 28, 2025 via email

@JimNayzium
Copy link

You're probably right!!!

Here is another random question for anyone to figure out:
Check out this link: https://static.www.nfl.com/gamecenter/ae9d66f7-1312-11ef-afd1-646009f18b2e.pdf
This the game book you can download from any NFL.com link on the box score page.

Particularly look at K.Mitchell KOR statistics. He has 3 for 79 yards.

When I look through the play by play descriptions I see:

C.Boswell kicks 62 yards from PIT 35 to BLT 3. K.Mitchell to BLT 29 for 26 yards (M.Robinson).

C.Boswell kicks 65 yards from PIT 35 to BLT 0. K.Mitchell to BLT 28 for 28 yards (B.Bishop).
PENALTY on BLT-M.Harrison, Offensive Holding, 10 yards, enforced at BLT 24.

C.Boswell kicks 63 yards from PIT 35 to BLT 2. K.Mitchell pushed ob at BLT 31 for 29 yards (B.Bishop).

Can anyone make it make sense how the NFL determines that K. Mitchell has 3 returns for 79 yards?

To me the ones without the penalties are easy:
26 yards
29 yards
55 yards on those two.

So to end with 3 for 79 the third one calculated must be 24 yards, right?

Does that mean they credit the Return yards all the way up to WHERE the penalty occurred? The ball ends on the 14 yard line after the 10 yard penalty. To me it feels like K. Mitchell should get a 14 yard return on the one with the penalty, but it's pretty clear they give him the 24 yards from the 0 yard line to the 24 where the Holding occurred. Versus where the BALL ends up after the holding is enforced.

Is that the same way they would do a running play? If a RB has a 35 yard run, but after a holding downfield on a WR is enforced the gain on the play is 10 total yards from the LOS. Would that mean the RB gets a 20 yard run on his stats? That seems wierd to me.

@chisox721
Copy link

right now https://sports.core.api.espn.com/v2/sports/football/leagues/nfl/seasons/2024/types/2/athletes/3915416/statistics and https://sports.core.api.espn.com/v2/sports/football/leagues/nfl/seasons/2024/types/2/athletes/3915416/projections

show the same stats. Is this suppose to happen since it is the off-season meaning it will update when the 2025 season comes around?

Was looking into something similar recently. My assumption is you're right but maybe just check the projections endpoint for 2025 once in awhile prior to July 31st.

@chisox721
Copy link

The description text in the plays feeds refers to the players who get penalties like this:

PENALTY on BUF-Do.Williams.

But I cannot find any references from the feeds on where that short name gets defined. The athlete individual end points have a shortName property that in this case would be equal to:

D. Williams

But no where in the feeds can I find Dorian Williams referenced as BUF-Do.Williams or Do.Williams.

Which is not the biggest deal as we can recreate a player database to match them all I guess, but it just feels like ESPN has this information out there if we could find it. They clearly add the second and third letter to the abbreviation when multiple players on the same team would match if they left it one letter.

Anyone seen this information in a roster feed or team feed somewhere?

I can't check until later today but am 99% sure you just need to work with the "core" prefix instead of "site".

@JimNayzium
Copy link

I can't check until later today but am 99% sure you just need to work with the "core" prefix instead of "site".

Not sure exactly what you mean, as all the links I am asking about do start with sports.core?

@JimNayzium
Copy link

Has anyone else noticed that Kickoff Returners are not assigned a participant type of returner sometimes? Meaning, if we want to accumulate or track kickoff yardage that was not returned for a touchdown from the plays or drives, we have to just do a string parsing of the description texts. That seems insane on ESPN's side of things. Surely I am missing something?

@chisox721
Copy link

I can't check until later today but am 99% sure you just need to work with the "core" prefix instead of "site".

Not sure exactly what you mean, as all the links I am asking about do start with sports.core?

Oh my fault I was just assuming you hadn't gotten that deep in the weeds yet. My approach is to just take play--> participant->$ref - that way you have 100% certainty on the participant. Then just load the json locally after saving it once before the season or whatever approach you prefer.

Also I came across your previous discussion about rate limiting. For whatever reason I used to get popped routinely when sending requests to the site prefix but have never had issues with core. I'm not even gonna say how many I've sent in 1 day but 2500 is nothing.

@JimNayzium
Copy link

No worries, and thanks for the input!!! That's great to know!
And not all relevant player_id's make it into the participants array, which is why I was asking about that short name.
Often the play is not a penalty type id, if it was declined or enforced betweened downs etc... So I guess I was asking "For player names NOT in the participants array who DO appear in the description, does anyone know where those short names are referenced?"

It's obvious that it's just First initial and last name, UNLESS teh current roster has 2 of those, then it's first two letters and last name, and first three letters and so on and so forth... but just wasn't really able to easily find that information so it's a pain when you are trying to reverse engineer that stuff. Especially when you realize Sauce Gardner is referenced with A.Gardner hahahaah and all sorts of other things like that that make it maddening!

@chisox721
Copy link

No worries, and thanks for the input!!! That's great to know! And not all relevant player_id's make it into the participants array, which is why I was asking about that short name. Often the play is not a penalty type id, if it was declined or enforced betweened downs etc... So I guess I was asking "For player names NOT in the participants array who DO appear in the description, does anyone know where those short names are referenced?"

It's obvious that it's just First initial and last name, UNLESS teh current roster has 2 of those, then it's first two letters and last name, and first three letters and so on and so forth... but just wasn't really able to easily find that information so it's a pain when you are trying to reverse engineer that stuff. Especially when you realize Sauce Gardner is referenced with A.Gardner hahahaah and all sorts of other things like that that make it maddening!

Oh man I get the issue now. Got me having flashbacks to when the NBA broke my code after Marcus and Markieff Morris both ended up on the Suns. Doing a ton of random things with core api the next couple days - if I come across anything that may help I'll report back.

@JimNayzium
Copy link

JimNayzium commented Mar 5, 2025

Can anyone see how we are supposed to know that Josh Downs had 13 rushing yards credited on this play, And Anthony Richardson gets 3? OTHER than parsing through the text or shortText properties and figuring it out?

The statYardage property is 3 yards. The start and end of the play would be different from the statYardage obviously so we could possibly sniff it out that way.

But if feels like Anthony Richardson should also be in the participants array with his own "rusher" value and each participant have their own statYardage.

If you look at the stats array under Josh Downs participant item, it says 13 yards, but had he already had 20 rushing yards in the game that number would be 32.

https://sports.core.api.espn.com/v2/sports/football/leagues/nfl/events/401671856/competitions/401671856/plays/4016718562290

@tdart5
Copy link

tdart5 commented Mar 8, 2025

This is awesome stuff! This is kind of what I have been looking for. I just don't know if this is possible what I am trying to do.

Is it possible to get live scoring of an actual NFL playoff game for fantasy stats? We do our fantasy playoffs during the actual playoffs and we have been calculated scores by hand, but would love to be able to just connect this API to a google sheet and then create formulas to get our scores. We would use the following score types from the fantasy section.

id   displayid  abbrev    description
---  ---------  --------  --------------------------------
3    0          PY        Passing Yards
4    14         PTD       TD Pass
15   15         PTD40     40+ yard TD pass bonus
16   16         PTD50     50+ yard TD pass bonus
17   20         P300      300-399 yard passing game
18   21         P400      400+ yard passing game
19   19         2PC       2pt Passing Conversion
20   18         INTT      Interceptions Thrown

24   23         RY        Rushing Yards
25   33         RTD       TD Rush
26   37         2PR       2pt Rushing Conversion
35   34         RTD40     40+ yard TD rush bonus
36   35         RTD50     50+ yard TD rush bonus
37   38         RY100     100-199 yard rushing game
38   39         RY200     200+ yard rushing game

42   40         REY       Receiving Yards
43   50         RETD      TD Reception
44   54         2PRE      2pt Receiving Conversion
45   51         RETD40    40+ yard TD rec bonus
46   52         RETD50    50+ yard TD rec bonus
53   47         REC       Each reception
56   55         REY100    100-199 yard receiving game
57   56         REY200    200+ yard receiving game

63   66         FTD       Fumble Recovered for TD
72   68         FUML      Total Fumbles Lost
101  64         KRTD      Kickoff Return TD
102  65         PRTD      Punt Return TD
103  71         INTTD     Interception Return TD
104  72         FRTD      Fumble Return TD

74   84         FG50P     FG Made (50+ yards)
76   172        FGM50P    FG Missed (50+ yards)
77   83         FG40      FG Made (40-49 yards)
79   89         FGM40     FG Missed (40-49 yards)
80   82         FG0       FG Made (0-39 yards)
82   88         FGM0      FG Missed (0-39 yards)
86   76         PAT       Each PAT Made
88   78         PATM      Each PAT Missed

89   136        PA0       0 points allowed
90   137        PA1       1-6 points allowed
91   138        PA7       7-13 points allowed
92   139        PA14      14-17 points allowed
93   73         BLKKRTD   Blocked Punt or FG return for TD
94   173        DEFRETTD  Fumble or INT Return for TD
95   113        INT       Each Interception
96   114        FR        Each Fumble Recovered
97   112        BLKK      Blocked Punt, PAT or FG
98   116        SF        Each Safety
99   107        SK        Each Sack
121  140        PA18      18-21 points allowed
122  141        PA22      22-27 points allowed
123  142        PA28      28-34 points allowed
124  143        PA35      35-45 points allowed
125  144        PA46      46+ points allowed
206  74         2PRET     2pt Return
209  75         1PSF      1pt Safety

@SuspectAG
Copy link

I am currently trying to find the endpoints of certain reporters on every sport. However, I am encountering an error on NFL, I just can't get the API endpoint out.

So far I could somehow find out all team IDs, but not the contributor ID or that of Reporter.
Does anyone have a clue?

@MABeatty1978
Copy link

Any chance someone has found an endpoint for the American Hockey League (AHL)?

@JimNayzium
Copy link

I am currently trying to find the endpoints of certain reporters on every sport. However, I am encountering an error on NFL, I just can't get the API endpoint out.

So far I could somehow find out all team IDs, but not the contributor ID or that of Reporter. Does anyone have a clue?

Everything I find that acts like it attributes a "source" to any information is at best "inconsistent" and at worst usually just useless.

@JimNayzium
Copy link

JimNayzium commented Mar 9, 2025

Is there a special end point just for kick off returns? Has anyone else noticed that none of the 2024 participant arrays on any kickoff include a "returner" participant like the punt plays do? Is it possible ESPN calculates KOR yardage purely from text-parsing the descriptions? Surely not?

There is a play-type-id of 53 which is Kickoff (Defense) and play-type-id 12 which is Kickoff Returns, but the play-type-id of 12 is just NEVER in the 2024 drives or plays end points at all.

And to be clear, in the play-type-id 53, often there are "returner" types present in the participants array, but as often, even when the play is not a touchback and not a penalty, there is NOT a returner in the participants array. Its very strange.

@JimNayzium
Copy link

Is there a special end point just for kick off returns? Has anyone else noticed that none of the 2024 participant arrays on any kickoff include a "returner" participant like the punt plays do? Is it possible ESPN calculates KOR yardage purely from text-parsing the descriptions? Surely not?

There is a play-type-id of 53 which is Kickoff (Defense) and play-type-id 12 which is Kickoff Returns, but the play-type-id of 12 is just NEVER in the 2024 drives or plays end points at all.

And to be clear, in the play-type-id 53, often there are "returner" types present in the participants array, but as often, even when the play is not a touchback and not a penalty, there is NOT a returner in the participants array. Its very strange.

I have a little data to update this frustration, that could be useful to anyone else.

It would appear that all kickoffs stopped getting a play-type-id of "12" after week 10 of 2024. Before that, going back to 2022, Espn's play-type-id could be 53,12, or 32 for a kickoff. 32 being a TD return. 12 being an offensive returned kick, and 53 being a touchback or otherwise no returner relevant.

BUT after week 10 of 2024, the id of 53 stayed, and became the only one, and the "returner" type was LEFT out OFF the participants array! Super frustrating if that is what will be the norm moving forward.

Maybe it was an oversight that gets corrected next season somehow.

I HAVE TO imagine this impacted EsPN fantasy leagues who award return yards without leagues even realizing it happened! Crazy.

@ryanbuckner
Copy link

ryanbuckner commented Mar 10, 2025 via email

@JimNayzium
Copy link

It makes sense why odds would be removed, but play by play line score, box score stats in my experience stick around for a good while.

I am more just curious why individual plays in different games are not enforced with the same rules statistically from game to game week to week.

Sometimes on a play with laterals, all the recipients of the lateral get stat yards, and other times they do not.

Also, a glaring thing to me is it would appear from the play by play data that if a player intercepts a pass, then during that play laterals to a teammate, that the final player with the ball when the play ends is labelled by ESPN as both the "returner" and the "passDefender" which means the "passDefender" is credited with the interception statistically.

Surely they must go back and manually reallocate that interception statistic?

@SuspectAG
Copy link

I am currently trying to find the endpoints of certain reporters on every sport. However, I am encountering an error on NFL, I just can't get the API endpoint out.
So far I could somehow find out all team IDs, but not the contributor ID or that of Reporter. Does anyone have a clue?

Everything I find that acts like it attributes a "source" to any information is at best "inconsistent" and at worst usually just useless.

I'm a bit lost :D I still can't figure it out

For example, I want to pull the posts from Adam Schefter [https://www.espn.com/contributor/adam-schefter] directly to my Discord server
But somehow I cannot find his endpoint / ID

@nntrn
Copy link
Author

nntrn commented Mar 10, 2025

For example, I want to pull the posts from Adam Schefter [https://www.espn.com/contributor/adam-schefter] directly to my Discord server But somehow I cannot find his endpoint / ID

@SuspectAG - here ya go

https://site.web.api.espn.com/apis/v2/flex?region=us&lang=en&contentorigin=espn&contributor=adam-schefter&limit=100&pubkey=contributor-page

@SuspectAG
Copy link

SuspectAG commented Mar 10, 2025

For example, I want to pull the posts from Adam Schefter [https://www.espn.com/contributor/adam-schefter] directly to my Discord server But somehow I cannot find his endpoint / ID

@SuspectAG - here ya go

https://site.web.api.espn.com/apis/v2/flex?region=us&lang=en&contentorigin=espn&contributor=adam-schefter&limit=100&pubkey=contributor-page

Wow you are goated, thanks! <3

edit:
and it works like charm! the way I wanted it, for my Server no more X/Twitter 👍
Tested it and with some tweaks its fine

@nntrn
Copy link
Author

nntrn commented Mar 11, 2025

Any chance someone has found an endpoint for the American Hockey League (AHL)?

@MABeatty1978
https://sports.core.api.espn.com/v2/sports/hockey/leagues/nhl

List of endpoints for other leagues (mlb, mma, rugby, soccer, etc)
https://gist.githubusercontent.com/nntrn/ee26cb2a0716de0947a0a4e9a157bc1c/raw/b99b9e0d2df72470fa622e2f76cecb0362111e9a/extending-espn-api.md

@nntrn
Copy link
Author

nntrn commented Mar 11, 2025

Is it possible to get live scoring of an actual NFL playoff game for fantasy stats? We do our fantasy playoffs during the actual playoffs and we have been calculated scores by hand, but would love to be able to just connect this API to a google sheet and then create formulas to get our scores. We would use the following score types from the fantasy section.

@tdart5 - i threw a bunch of stuff together but i hope something helps

https://site.api.espn.com/apis/fantasy/v2/games/ffl/news/players?limit=50&playerId=2977187

https://gambit-api.fantasy.espn.com/apis/v1/dashboards/espn-en?view=allon
https://gambit-api.fantasy.espn.com/apis/v1/challenges/tournament-challenge-bracket-2024/groups/6e682872-7e5f-3aa2-84bf-003cb6a630ae?view=chui_pagetype_group_picks

https://lm-api-reads.fantasy.espn.com/apis/v3/games/ffl/seasons/2024/players?view=players_wl
https://lm-api-reads.fantasy.espn.com/apis/v3/games/ffl/seasons/2024/players?view=kona_player_info
https://lm-api-reads.fantasy.espn.com/apis/v3/games/ffl/seasons/2024/players?scoringPeriodId=0&view=allon
https://lm-api-reads.fantasy.espn.com/apis/v3/games/ffl/seasons/2024?view=proTeamSchedules_wl
https://lm-api-reads.fantasy.espn.com/apis/v3/games/ffl/seasons/2024?view=chui_default_platformsettings

Header for increasing the limit returned: X-Fantasy-Filter: {"players":{"limit":3000}}

Example
curl -H 'X-Fantasy-Filter: {"players":{"limit":3000}}' 'https://lm-api-reads.fantasy.espn.com/apis/v3/games/ffl/seasons/2024/players?view=players_wl'

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