Skip to content

Instantly share code, notes, and snippets.

@nntrn
Last active May 16, 2024 18:34
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

List of NFL API Endpoints

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

Parameters

Name Description
:year Integer year in which the season started (YYYY)
:seasontype 1=pre, 2=regular, 3=post
:league_id Fantasy league id
:bet_provider_id Sports betting operator, view under odds
:team_id 1-32 (view all)
:athlete_id view all

Table of Contents:


ESPN Base Urls

site.api.espn[.com]

sports.core.api.espn[.com]


Teams

team api
ATL
/v2/sports/football/leagues/nfl/seasons/2021/teams/1 /athletes, /depthcharts, /record, /events, /projections
BUF
/v2/sports/football/leagues/nfl/seasons/2021/teams/2 /athletes, /depthcharts, /record, /events, /projections
CHI
/v2/sports/football/leagues/nfl/seasons/2021/teams/3 /athletes, /depthcharts, /record, /events, /projections
CIN
/v2/sports/football/leagues/nfl/seasons/2021/teams/4 /athletes, /depthcharts, /record, /events, /projections
CLE
/v2/sports/football/leagues/nfl/seasons/2021/teams/5 /athletes, /depthcharts, /record, /events, /projections
DAL
/v2/sports/football/leagues/nfl/seasons/2021/teams/6 /athletes, /depthcharts, /record, /events, /projections
DEN
/v2/sports/football/leagues/nfl/seasons/2021/teams/7 /athletes, /depthcharts, /record, /events, /projections
DET
/v2/sports/football/leagues/nfl/seasons/2021/teams/8 /athletes, /depthcharts, /record, /events, /projections
GB
/v2/sports/football/leagues/nfl/seasons/2021/teams/9 /athletes, /depthcharts, /record, /events, /projections
TEN
/v2/sports/football/leagues/nfl/seasons/2021/teams/10 /athletes, /depthcharts, /record, /events, /projections
IND
/v2/sports/football/leagues/nfl/seasons/2021/teams/11 /athletes, /depthcharts, /record, /events, /projections
KC
/v2/sports/football/leagues/nfl/seasons/2021/teams/12 /athletes, /depthcharts, /record, /events, /projections
LV
/v2/sports/football/leagues/nfl/seasons/2021/teams/13 /athletes, /depthcharts, /record, /events, /projections
LAR
/v2/sports/football/leagues/nfl/seasons/2021/teams/14 /athletes, /depthcharts, /record, /events, /projections
MIA
/v2/sports/football/leagues/nfl/seasons/2021/teams/15 /athletes, /depthcharts, /record, /events, /projections
MIN
/v2/sports/football/leagues/nfl/seasons/2021/teams/16 /athletes, /depthcharts, /record, /events, /projections
NE
/v2/sports/football/leagues/nfl/seasons/2021/teams/17 /athletes, /depthcharts, /record, /events, /projections
NO
/v2/sports/football/leagues/nfl/seasons/2021/teams/18 /athletes, /depthcharts, /record, /events, /projections
NYG
/v2/sports/football/leagues/nfl/seasons/2021/teams/19 /athletes, /depthcharts, /record, /events, /projections
NYJ
/v2/sports/football/leagues/nfl/seasons/2021/teams/20 /athletes, /depthcharts, /record, /events, /projections
PHI
/v2/sports/football/leagues/nfl/seasons/2021/teams/21 /athletes, /depthcharts, /record, /events, /projections
ARI
/v2/sports/football/leagues/nfl/seasons/2021/teams/22 /athletes, /depthcharts, /record, /events, /projections
PIT
/v2/sports/football/leagues/nfl/seasons/2021/teams/23 /athletes, /depthcharts, /record, /events, /projections
LAC
/v2/sports/football/leagues/nfl/seasons/2021/teams/24 /athletes, /depthcharts, /record, /events, /projections
SF
/v2/sports/football/leagues/nfl/seasons/2021/teams/25 /athletes, /depthcharts, /record, /events, /projections
SEA
/v2/sports/football/leagues/nfl/seasons/2021/teams/26 /athletes, /depthcharts, /record, /events, /projections
TB
/v2/sports/football/leagues/nfl/seasons/2021/teams/27 /athletes, /depthcharts, /record, /events, /projections
WSH
/v2/sports/football/leagues/nfl/seasons/2021/teams/28 /athletes, /depthcharts, /record, /events, /projections
CAR
/v2/sports/football/leagues/nfl/seasons/2021/teams/29 /athletes, /depthcharts, /record, /events, /projections
JAX
/v2/sports/football/leagues/nfl/seasons/2021/teams/30 /athletes, /depthcharts, /record, /events, /projections
BAL
/v2/sports/football/leagues/nfl/seasons/2021/teams/33 /athletes, /depthcharts, /record, /events, /projections
HOU
/v2/sports/football/leagues/nfl/seasons/2021/teams/34 /athletes, /depthcharts, /record, /events, /projections

Fantasy

Current season and last 3 years

fantasy.espn.com/apis/v3/games/ffl/seasons/:year/segments/0/leagues/:league_id

League History - get all historical data

fantasy.espn.com/apis/v3/games/ffl/leagueHistory/:league_id?seasonId=:year


Example combining views

https://fantasy.espn.com/apis/v3/games/ffl/leagueHistory/1241838?seasonId=2019&view=mMatchup&view=mMatchupScore

View example combining all

https://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

Detailed API

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/:year/types/:seasontype/weeks/:week

All weeks

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

List of games via date-range

site.api.espn.com/apis/site/v2/sports/football/nfl/scoreboard?limit=1000&dates=YYYYMMDD-YYYYMMDD

  • Add &1577413600 at the end for overriding the cache
  • Date range cannot exceed 13 months
  • Format for date can be date range, single date, or year

Betting

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

Odds

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

Win probabilities

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

Against the spread (ATS)

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

future_id
1561 Super Bowl Winner
2737 AFC South Division Winner
2738 AFC North Division Winner
2739 AFC West Division Winner
2740 AFC East Division Winner
2757 AFC Champion
3904 NFC Champion
3905 NFC North Division Winner
3906 NFC East Division Winner
3907 NFC West Division Winner
3908 NFC South Division Winner

Futures

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

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

Game Odds

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

Team Odds

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

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/:year/types/2/weeks/:week_num/qbr/10000

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=2021

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/:seasontype/athletes/:athlete_id/statistics

sports.core.api.espn.com/v2/sports/football/leagues/nfl/seasons/:year/types/:seasontype/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

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

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/:year/types/:seasontype/teams/:team_id/statistics

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/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/:team_id?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}

sports.core.api.espn.com/v2/sports/football/leagues/nfl/seasons/2021/types/2/leaders

Scoreboard

site.api.espn.com/apis/site/v2/sports/football/nfl/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

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

================================================================================
SOURCE
================================================================================
List of endpoints used in this gist
GIST
https://gist.github.com/nntrn/ee26cb2a0716de0947a0a4e9a157bc1c
BASE URLS
* https://site.api.espn.com
* https://site.web.api.espn.com
* https://sports.core.api.espn.com
ALL ENDPOINTS
* https://site.api.espn.com/apis/site/v2/sports/football/nfl/news
* https://site.api.espn.com/apis/site/v2/sports/football/nfl/news?limit=50&page=1
* https://site.api.espn.com/apis/site/v2/sports/football/nfl/scoreboard
* https://site.api.espn.com/apis/site/v2/sports/football/nfl/scoreboard?dates=20180901
* https://site.api.espn.com/apis/site/v2/sports/football/nfl/scoreboard?limit=1000&dates=20200901-20201022
* https://site.api.espn.com/apis/site/v2/sports/football/nfl/scoreboard?limit=1000&dates=2021
* https://site.api.espn.com/apis/site/v2/sports/football/nfl/scoreboard?limit=1000&dates=20210901
* https://site.api.espn.com/apis/site/v2/sports/football/nfl/summary?event=401326315
* https://site.api.espn.com/apis/site/v2/sports/football/nfl/teams
* https://site.api.espn.com/apis/site/v2/sports/football/nfl/teams/1
* https://site.api.espn.com/apis/site/v2/sports/football/nfl/teams/3
* https://site.api.espn.com/apis/site/v2/sports/football/nfl/teams/3/roster
* https://site.api.espn.com/apis/site/v2/sports/football/nfl/teams/3/schedule?season=2020&seasontype=2
* https://site.api.espn.com/apis/site/v2/sports/football/nfl/teams/3?enable=roster,projection,stats
* https://site.api.espn.com/apis/site/v2/sports/football/nfl/teams/4/roster
* https://site.api.espn.com/apis/site/v2/sports/football/nfl/teams/4/schedule
* https://site.api.espn.com/apis/site/v2/sports/football/nfl/teams/4/schedule?season=2019
* https://site.api.espn.com/apis/site/v2/sports/football/nfl/teams/4?enable=roster,projection,stats
* https://site.api.espn.com/apis/site/v3/sports/football/nfl/leaders?season=2021&seasontype=2
* https://site.web.api.espn.com/apis/common/v3/search
* https://site.web.api.espn.com/apis/common/v3/search?region=us&lang=en&query=nfl&limit=5&mode=prefix
* https://site.web.api.espn.com/apis/common/v3/sports/football/nfl/athletes/14876
* https://site.web.api.espn.com/apis/common/v3/sports/football/nfl/athletes/14876/bio
* https://site.web.api.espn.com/apis/common/v3/sports/football/nfl/athletes/14876/gamelog
* https://site.web.api.espn.com/apis/common/v3/sports/football/nfl/athletes/14876/overview
* https://site.web.api.espn.com/apis/common/v3/sports/football/nfl/athletes/14876/splits
* https://site.web.api.espn.com/apis/common/v3/sports/football/nfl/athletes/14876/splits?season=2021
* https://site.web.api.espn.com/apis/common/v3/sports/football/nfl/athletes/14876/stats
* https://site.web.api.espn.com/apis/fantasy/v2/games/ffl/games?dates=20210901-20211108&pbpOnly=true
* https://site.web.api.espn.com/apis/v2/scoreboard/header?sport=football&league=nfl
* https://sports.core.api.espn.com/v2/sports/football/leagues/nfl
* https://sports.core.api.espn.com/v2/sports/football/leagues/nfl/athletes
* https://sports.core.api.espn.com/v2/sports/football/leagues/nfl/athletes/2/statisticslog
* https://sports.core.api.espn.com/v2/sports/football/leagues/nfl/athletes?active=true
* https://sports.core.api.espn.com/v2/sports/football/leagues/nfl/athletes?limit=1000
* https://sports.core.api.espn.com/v2/sports/football/leagues/nfl/athletes?limit=200
* https://sports.core.api.espn.com/v2/sports/football/leagues/nfl/calendar
* https://sports.core.api.espn.com/v2/sports/football/leagues/nfl/calendar/blacklist
* https://sports.core.api.espn.com/v2/sports/football/leagues/nfl/calendar/whitelist
* https://sports.core.api.espn.com/v2/sports/football/leagues/nfl/events
* https://sports.core.api.espn.com/v2/sports/football/leagues/nfl/events/401220181/competitions/401220181/competitors/34/roster/2508176/statistics/0
* https://sports.core.api.espn.com/v2/sports/football/leagues/nfl/events/401220225/competitions/401220225/competitors/12/roster
* https://sports.core.api.espn.com/v2/sports/football/leagues/nfl/events/401220225/competitions/401220225/competitors/12/roster?season=2019
* https://sports.core.api.espn.com/v2/sports/football/leagues/nfl/events/401249063/competitions/401249063/odds
* https://sports.core.api.espn.com/v2/sports/football/leagues/nfl/events/401249063/competitions/401249063/odds/1002/head-to-heads
* https://sports.core.api.espn.com/v2/sports/football/leagues/nfl/events/401249063/competitions/401249063/odds/1002/history/0/movement?limit=100
* https://sports.core.api.espn.com/v2/sports/football/leagues/nfl/events/401249063/competitions/401249063/plays?limit=300
* https://sports.core.api.espn.com/v2/sports/football/leagues/nfl/events/401249063/competitions/401249063/probabilities?limit=200
* https://sports.core.api.espn.com/v2/sports/football/leagues/nfl/franchises
* https://sports.core.api.espn.com/v2/sports/football/leagues/nfl/leaders
* https://sports.core.api.espn.com/v2/sports/football/leagues/nfl/positions?limit=100
* https://sports.core.api.espn.com/v2/sports/football/leagues/nfl/seasons
* https://sports.core.api.espn.com/v2/sports/football/leagues/nfl/seasons/2020/athletes/2330/eventlog
* https://sports.core.api.espn.com/v2/sports/football/leagues/nfl/seasons/2020/types/2/athletes/2972304/statistics
* https://sports.core.api.espn.com/v2/sports/football/leagues/nfl/seasons/2020/types/2/athletes/3061612/projections
* https://sports.core.api.espn.com/v2/sports/football/leagues/nfl/seasons/2020/types/2/weeks/6/qbr/10000
* https://sports.core.api.espn.com/v2/sports/football/leagues/nfl/seasons/2021
* https://sports.core.api.espn.com/v2/sports/football/leagues/nfl/seasons/2021/athletes/2580
* https://sports.core.api.espn.com/v2/sports/football/leagues/nfl/seasons/2021/draft
* https://sports.core.api.espn.com/v2/sports/football/leagues/nfl/seasons/2021/freeagents
* https://sports.core.api.espn.com/v2/sports/football/leagues/nfl/seasons/2021/futures
* https://sports.core.api.espn.com/v2/sports/football/leagues/nfl/seasons/2021/futures/1561
* https://sports.core.api.espn.com/v2/sports/football/leagues/nfl/seasons/2021/teams
* https://sports.core.api.espn.com/v2/sports/football/leagues/nfl/seasons/2021/teams/1
* https://sports.core.api.espn.com/v2/sports/football/leagues/nfl/seasons/2021/teams/1/athletes
* https://sports.core.api.espn.com/v2/sports/football/leagues/nfl/seasons/2021/teams/1/depthcharts
* https://sports.core.api.espn.com/v2/sports/football/leagues/nfl/seasons/2021/teams/1/events
* https://sports.core.api.espn.com/v2/sports/football/leagues/nfl/seasons/2021/teams/1/projection
* https://sports.core.api.espn.com/v2/sports/football/leagues/nfl/seasons/2021/teams/1/record
* https://sports.core.api.espn.com/v2/sports/football/leagues/nfl/seasons/2021/teams/10
* https://sports.core.api.espn.com/v2/sports/football/leagues/nfl/seasons/2021/teams/10/athletes
* https://sports.core.api.espn.com/v2/sports/football/leagues/nfl/seasons/2021/teams/10/depthcharts
* https://sports.core.api.espn.com/v2/sports/football/leagues/nfl/seasons/2021/teams/10/events
* https://sports.core.api.espn.com/v2/sports/football/leagues/nfl/seasons/2021/teams/10/projection
* https://sports.core.api.espn.com/v2/sports/football/leagues/nfl/seasons/2021/teams/10/record
* https://sports.core.api.espn.com/v2/sports/football/leagues/nfl/seasons/2021/teams/11
* https://sports.core.api.espn.com/v2/sports/football/leagues/nfl/seasons/2021/teams/11/athletes
* https://sports.core.api.espn.com/v2/sports/football/leagues/nfl/seasons/2021/teams/11/depthcharts
* https://sports.core.api.espn.com/v2/sports/football/leagues/nfl/seasons/2021/teams/11/events
* https://sports.core.api.espn.com/v2/sports/football/leagues/nfl/seasons/2021/teams/11/projection
* https://sports.core.api.espn.com/v2/sports/football/leagues/nfl/seasons/2021/teams/11/record
* https://sports.core.api.espn.com/v2/sports/football/leagues/nfl/seasons/2021/teams/12
* https://sports.core.api.espn.com/v2/sports/football/leagues/nfl/seasons/2021/teams/12/athletes
* https://sports.core.api.espn.com/v2/sports/football/leagues/nfl/seasons/2021/teams/12/depthcharts
* https://sports.core.api.espn.com/v2/sports/football/leagues/nfl/seasons/2021/teams/12/events
* https://sports.core.api.espn.com/v2/sports/football/leagues/nfl/seasons/2021/teams/12/projection
* https://sports.core.api.espn.com/v2/sports/football/leagues/nfl/seasons/2021/teams/12/record
* https://sports.core.api.espn.com/v2/sports/football/leagues/nfl/seasons/2021/teams/13
* https://sports.core.api.espn.com/v2/sports/football/leagues/nfl/seasons/2021/teams/13/athletes
* https://sports.core.api.espn.com/v2/sports/football/leagues/nfl/seasons/2021/teams/13/depthcharts
* https://sports.core.api.espn.com/v2/sports/football/leagues/nfl/seasons/2021/teams/13/events
* https://sports.core.api.espn.com/v2/sports/football/leagues/nfl/seasons/2021/teams/13/projection
* https://sports.core.api.espn.com/v2/sports/football/leagues/nfl/seasons/2021/teams/13/record
* https://sports.core.api.espn.com/v2/sports/football/leagues/nfl/seasons/2021/teams/14
* https://sports.core.api.espn.com/v2/sports/football/leagues/nfl/seasons/2021/teams/14/athletes
* https://sports.core.api.espn.com/v2/sports/football/leagues/nfl/seasons/2021/teams/14/depthcharts
* https://sports.core.api.espn.com/v2/sports/football/leagues/nfl/seasons/2021/teams/14/events
* https://sports.core.api.espn.com/v2/sports/football/leagues/nfl/seasons/2021/teams/14/projection
* https://sports.core.api.espn.com/v2/sports/football/leagues/nfl/seasons/2021/teams/14/record
* https://sports.core.api.espn.com/v2/sports/football/leagues/nfl/seasons/2021/teams/15
* https://sports.core.api.espn.com/v2/sports/football/leagues/nfl/seasons/2021/teams/15/athletes
* https://sports.core.api.espn.com/v2/sports/football/leagues/nfl/seasons/2021/teams/15/depthcharts
* https://sports.core.api.espn.com/v2/sports/football/leagues/nfl/seasons/2021/teams/15/events
* https://sports.core.api.espn.com/v2/sports/football/leagues/nfl/seasons/2021/teams/15/projection
* https://sports.core.api.espn.com/v2/sports/football/leagues/nfl/seasons/2021/teams/15/record
* https://sports.core.api.espn.com/v2/sports/football/leagues/nfl/seasons/2021/teams/16
* https://sports.core.api.espn.com/v2/sports/football/leagues/nfl/seasons/2021/teams/16/athletes
* https://sports.core.api.espn.com/v2/sports/football/leagues/nfl/seasons/2021/teams/16/depthcharts
* https://sports.core.api.espn.com/v2/sports/football/leagues/nfl/seasons/2021/teams/16/events
* https://sports.core.api.espn.com/v2/sports/football/leagues/nfl/seasons/2021/teams/16/projection
* https://sports.core.api.espn.com/v2/sports/football/leagues/nfl/seasons/2021/teams/16/record
* https://sports.core.api.espn.com/v2/sports/football/leagues/nfl/seasons/2021/teams/17
* https://sports.core.api.espn.com/v2/sports/football/leagues/nfl/seasons/2021/teams/17/athletes
* https://sports.core.api.espn.com/v2/sports/football/leagues/nfl/seasons/2021/teams/17/depthcharts
* https://sports.core.api.espn.com/v2/sports/football/leagues/nfl/seasons/2021/teams/17/events
* https://sports.core.api.espn.com/v2/sports/football/leagues/nfl/seasons/2021/teams/17/projection
* https://sports.core.api.espn.com/v2/sports/football/leagues/nfl/seasons/2021/teams/17/record
* https://sports.core.api.espn.com/v2/sports/football/leagues/nfl/seasons/2021/teams/18
* https://sports.core.api.espn.com/v2/sports/football/leagues/nfl/seasons/2021/teams/18/athletes
* https://sports.core.api.espn.com/v2/sports/football/leagues/nfl/seasons/2021/teams/18/athletes?limit=200
* https://sports.core.api.espn.com/v2/sports/football/leagues/nfl/seasons/2021/teams/18/depthcharts
* https://sports.core.api.espn.com/v2/sports/football/leagues/nfl/seasons/2021/teams/18/events
* https://sports.core.api.espn.com/v2/sports/football/leagues/nfl/seasons/2021/teams/18/projection
* https://sports.core.api.espn.com/v2/sports/football/leagues/nfl/seasons/2021/teams/18/record
* https://sports.core.api.espn.com/v2/sports/football/leagues/nfl/seasons/2021/teams/19
* https://sports.core.api.espn.com/v2/sports/football/leagues/nfl/seasons/2021/teams/19/athletes
* https://sports.core.api.espn.com/v2/sports/football/leagues/nfl/seasons/2021/teams/19/depthcharts
* https://sports.core.api.espn.com/v2/sports/football/leagues/nfl/seasons/2021/teams/19/events
* https://sports.core.api.espn.com/v2/sports/football/leagues/nfl/seasons/2021/teams/19/projection
* https://sports.core.api.espn.com/v2/sports/football/leagues/nfl/seasons/2021/teams/19/record
* https://sports.core.api.espn.com/v2/sports/football/leagues/nfl/seasons/2021/teams/2
* https://sports.core.api.espn.com/v2/sports/football/leagues/nfl/seasons/2021/teams/2/athletes
* https://sports.core.api.espn.com/v2/sports/football/leagues/nfl/seasons/2021/teams/2/depthcharts
* https://sports.core.api.espn.com/v2/sports/football/leagues/nfl/seasons/2021/teams/2/events
* https://sports.core.api.espn.com/v2/sports/football/leagues/nfl/seasons/2021/teams/2/projection
* https://sports.core.api.espn.com/v2/sports/football/leagues/nfl/seasons/2021/teams/2/record
* https://sports.core.api.espn.com/v2/sports/football/leagues/nfl/seasons/2021/teams/20
* https://sports.core.api.espn.com/v2/sports/football/leagues/nfl/seasons/2021/teams/20/athletes
* https://sports.core.api.espn.com/v2/sports/football/leagues/nfl/seasons/2021/teams/20/depthcharts
* https://sports.core.api.espn.com/v2/sports/football/leagues/nfl/seasons/2021/teams/20/events
* https://sports.core.api.espn.com/v2/sports/football/leagues/nfl/seasons/2021/teams/20/projection
* https://sports.core.api.espn.com/v2/sports/football/leagues/nfl/seasons/2021/teams/20/record
* https://sports.core.api.espn.com/v2/sports/football/leagues/nfl/seasons/2021/teams/21
* https://sports.core.api.espn.com/v2/sports/football/leagues/nfl/seasons/2021/teams/21/athletes
* https://sports.core.api.espn.com/v2/sports/football/leagues/nfl/seasons/2021/teams/21/depthcharts
* https://sports.core.api.espn.com/v2/sports/football/leagues/nfl/seasons/2021/teams/21/events
* https://sports.core.api.espn.com/v2/sports/football/leagues/nfl/seasons/2021/teams/21/projection
* https://sports.core.api.espn.com/v2/sports/football/leagues/nfl/seasons/2021/teams/21/record
* https://sports.core.api.espn.com/v2/sports/football/leagues/nfl/seasons/2021/teams/22
* https://sports.core.api.espn.com/v2/sports/football/leagues/nfl/seasons/2021/teams/22/athletes
* https://sports.core.api.espn.com/v2/sports/football/leagues/nfl/seasons/2021/teams/22/depthcharts
* https://sports.core.api.espn.com/v2/sports/football/leagues/nfl/seasons/2021/teams/22/events
* https://sports.core.api.espn.com/v2/sports/football/leagues/nfl/seasons/2021/teams/22/projection
* https://sports.core.api.espn.com/v2/sports/football/leagues/nfl/seasons/2021/teams/22/record
* https://sports.core.api.espn.com/v2/sports/football/leagues/nfl/seasons/2021/teams/23
* https://sports.core.api.espn.com/v2/sports/football/leagues/nfl/seasons/2021/teams/23/athletes
* https://sports.core.api.espn.com/v2/sports/football/leagues/nfl/seasons/2021/teams/23/depthcharts
* https://sports.core.api.espn.com/v2/sports/football/leagues/nfl/seasons/2021/teams/23/events
* https://sports.core.api.espn.com/v2/sports/football/leagues/nfl/seasons/2021/teams/23/projection
* https://sports.core.api.espn.com/v2/sports/football/leagues/nfl/seasons/2021/teams/23/projection
* https://sports.core.api.espn.com/v2/sports/football/leagues/nfl/seasons/2021/teams/23/record
* https://sports.core.api.espn.com/v2/sports/football/leagues/nfl/seasons/2021/teams/24
* https://sports.core.api.espn.com/v2/sports/football/leagues/nfl/seasons/2021/teams/24/athletes
* https://sports.core.api.espn.com/v2/sports/football/leagues/nfl/seasons/2021/teams/24/depthcharts
* https://sports.core.api.espn.com/v2/sports/football/leagues/nfl/seasons/2021/teams/24/depthcharts
* https://sports.core.api.espn.com/v2/sports/football/leagues/nfl/seasons/2021/teams/24/events
* https://sports.core.api.espn.com/v2/sports/football/leagues/nfl/seasons/2021/teams/24/projection
* https://sports.core.api.espn.com/v2/sports/football/leagues/nfl/seasons/2021/teams/24/record
* https://sports.core.api.espn.com/v2/sports/football/leagues/nfl/seasons/2021/teams/25
* https://sports.core.api.espn.com/v2/sports/football/leagues/nfl/seasons/2021/teams/25/athletes
* https://sports.core.api.espn.com/v2/sports/football/leagues/nfl/seasons/2021/teams/25/depthcharts
* https://sports.core.api.espn.com/v2/sports/football/leagues/nfl/seasons/2021/teams/25/events
* https://sports.core.api.espn.com/v2/sports/football/leagues/nfl/seasons/2021/teams/25/projection
* https://sports.core.api.espn.com/v2/sports/football/leagues/nfl/seasons/2021/teams/25/record
* https://sports.core.api.espn.com/v2/sports/football/leagues/nfl/seasons/2021/teams/26
* https://sports.core.api.espn.com/v2/sports/football/leagues/nfl/seasons/2021/teams/26/athletes
* https://sports.core.api.espn.com/v2/sports/football/leagues/nfl/seasons/2021/teams/26/depthcharts
* https://sports.core.api.espn.com/v2/sports/football/leagues/nfl/seasons/2021/teams/26/events
* https://sports.core.api.espn.com/v2/sports/football/leagues/nfl/seasons/2021/teams/26/projection
* https://sports.core.api.espn.com/v2/sports/football/leagues/nfl/seasons/2021/teams/26/record
* https://sports.core.api.espn.com/v2/sports/football/leagues/nfl/seasons/2021/teams/27
* https://sports.core.api.espn.com/v2/sports/football/leagues/nfl/seasons/2021/teams/27/athletes
* https://sports.core.api.espn.com/v2/sports/football/leagues/nfl/seasons/2021/teams/27/depthcharts
* https://sports.core.api.espn.com/v2/sports/football/leagues/nfl/seasons/2021/teams/27/events
* https://sports.core.api.espn.com/v2/sports/football/leagues/nfl/seasons/2021/teams/27/projection
* https://sports.core.api.espn.com/v2/sports/football/leagues/nfl/seasons/2021/teams/27/record
* https://sports.core.api.espn.com/v2/sports/football/leagues/nfl/seasons/2021/teams/28
* https://sports.core.api.espn.com/v2/sports/football/leagues/nfl/seasons/2021/teams/28/athletes
* https://sports.core.api.espn.com/v2/sports/football/leagues/nfl/seasons/2021/teams/28/depthcharts
* https://sports.core.api.espn.com/v2/sports/football/leagues/nfl/seasons/2021/teams/28/events
* https://sports.core.api.espn.com/v2/sports/football/leagues/nfl/seasons/2021/teams/28/projection
* https://sports.core.api.espn.com/v2/sports/football/leagues/nfl/seasons/2021/teams/28/record
* https://sports.core.api.espn.com/v2/sports/football/leagues/nfl/seasons/2021/teams/29
* https://sports.core.api.espn.com/v2/sports/football/leagues/nfl/seasons/2021/teams/29/athletes
* https://sports.core.api.espn.com/v2/sports/football/leagues/nfl/seasons/2021/teams/29/depthcharts
* https://sports.core.api.espn.com/v2/sports/football/leagues/nfl/seasons/2021/teams/29/events
* https://sports.core.api.espn.com/v2/sports/football/leagues/nfl/seasons/2021/teams/29/projection
* https://sports.core.api.espn.com/v2/sports/football/leagues/nfl/seasons/2021/teams/29/record
* https://sports.core.api.espn.com/v2/sports/football/leagues/nfl/seasons/2021/teams/3
* https://sports.core.api.espn.com/v2/sports/football/leagues/nfl/seasons/2021/teams/3/athletes
* https://sports.core.api.espn.com/v2/sports/football/leagues/nfl/seasons/2021/teams/3/depthcharts
* https://sports.core.api.espn.com/v2/sports/football/leagues/nfl/seasons/2021/teams/3/events
* https://sports.core.api.espn.com/v2/sports/football/leagues/nfl/seasons/2021/teams/3/projection
* https://sports.core.api.espn.com/v2/sports/football/leagues/nfl/seasons/2021/teams/3/record
* https://sports.core.api.espn.com/v2/sports/football/leagues/nfl/seasons/2021/teams/30
* https://sports.core.api.espn.com/v2/sports/football/leagues/nfl/seasons/2021/teams/30/athletes
* https://sports.core.api.espn.com/v2/sports/football/leagues/nfl/seasons/2021/teams/30/depthcharts
* https://sports.core.api.espn.com/v2/sports/football/leagues/nfl/seasons/2021/teams/30/events
* https://sports.core.api.espn.com/v2/sports/football/leagues/nfl/seasons/2021/teams/30/projection
* https://sports.core.api.espn.com/v2/sports/football/leagues/nfl/seasons/2021/teams/30/record
* https://sports.core.api.espn.com/v2/sports/football/leagues/nfl/seasons/2021/teams/33
* https://sports.core.api.espn.com/v2/sports/football/leagues/nfl/seasons/2021/teams/33/athletes
* https://sports.core.api.espn.com/v2/sports/football/leagues/nfl/seasons/2021/teams/33/depthcharts
* https://sports.core.api.espn.com/v2/sports/football/leagues/nfl/seasons/2021/teams/33/events
* https://sports.core.api.espn.com/v2/sports/football/leagues/nfl/seasons/2021/teams/33/projection
* https://sports.core.api.espn.com/v2/sports/football/leagues/nfl/seasons/2021/teams/33/record
* https://sports.core.api.espn.com/v2/sports/football/leagues/nfl/seasons/2021/teams/34
* https://sports.core.api.espn.com/v2/sports/football/leagues/nfl/seasons/2021/teams/34/athletes
* https://sports.core.api.espn.com/v2/sports/football/leagues/nfl/seasons/2021/teams/34/depthcharts
* https://sports.core.api.espn.com/v2/sports/football/leagues/nfl/seasons/2021/teams/34/events
* https://sports.core.api.espn.com/v2/sports/football/leagues/nfl/seasons/2021/teams/34/projection
* https://sports.core.api.espn.com/v2/sports/football/leagues/nfl/seasons/2021/teams/34/record
* https://sports.core.api.espn.com/v2/sports/football/leagues/nfl/seasons/2021/teams/4
* https://sports.core.api.espn.com/v2/sports/football/leagues/nfl/seasons/2021/teams/4/athletes
* https://sports.core.api.espn.com/v2/sports/football/leagues/nfl/seasons/2021/teams/4/depthcharts
* https://sports.core.api.espn.com/v2/sports/football/leagues/nfl/seasons/2021/teams/4/events
* https://sports.core.api.espn.com/v2/sports/football/leagues/nfl/seasons/2021/teams/4/projection
* https://sports.core.api.espn.com/v2/sports/football/leagues/nfl/seasons/2021/teams/4/record
* https://sports.core.api.espn.com/v2/sports/football/leagues/nfl/seasons/2021/teams/5
* https://sports.core.api.espn.com/v2/sports/football/leagues/nfl/seasons/2021/teams/5/athletes
* https://sports.core.api.espn.com/v2/sports/football/leagues/nfl/seasons/2021/teams/5/depthcharts
* https://sports.core.api.espn.com/v2/sports/football/leagues/nfl/seasons/2021/teams/5/events
* https://sports.core.api.espn.com/v2/sports/football/leagues/nfl/seasons/2021/teams/5/projection
* https://sports.core.api.espn.com/v2/sports/football/leagues/nfl/seasons/2021/teams/5/record
* https://sports.core.api.espn.com/v2/sports/football/leagues/nfl/seasons/2021/teams/6
* https://sports.core.api.espn.com/v2/sports/football/leagues/nfl/seasons/2021/teams/6/athletes
* https://sports.core.api.espn.com/v2/sports/football/leagues/nfl/seasons/2021/teams/6/depthcharts
* https://sports.core.api.espn.com/v2/sports/football/leagues/nfl/seasons/2021/teams/6/events
* https://sports.core.api.espn.com/v2/sports/football/leagues/nfl/seasons/2021/teams/6/projection
* https://sports.core.api.espn.com/v2/sports/football/leagues/nfl/seasons/2021/teams/6/record
* https://sports.core.api.espn.com/v2/sports/football/leagues/nfl/seasons/2021/teams/7
* https://sports.core.api.espn.com/v2/sports/football/leagues/nfl/seasons/2021/teams/7/athletes
* https://sports.core.api.espn.com/v2/sports/football/leagues/nfl/seasons/2021/teams/7/depthcharts
* https://sports.core.api.espn.com/v2/sports/football/leagues/nfl/seasons/2021/teams/7/events
* https://sports.core.api.espn.com/v2/sports/football/leagues/nfl/seasons/2021/teams/7/projection
* https://sports.core.api.espn.com/v2/sports/football/leagues/nfl/seasons/2021/teams/7/record
* https://sports.core.api.espn.com/v2/sports/football/leagues/nfl/seasons/2021/teams/8
* https://sports.core.api.espn.com/v2/sports/football/leagues/nfl/seasons/2021/teams/8/athletes
* https://sports.core.api.espn.com/v2/sports/football/leagues/nfl/seasons/2021/teams/8/depthcharts
* https://sports.core.api.espn.com/v2/sports/football/leagues/nfl/seasons/2021/teams/8/events
* https://sports.core.api.espn.com/v2/sports/football/leagues/nfl/seasons/2021/teams/8/projection
* https://sports.core.api.espn.com/v2/sports/football/leagues/nfl/seasons/2021/teams/8/record
* https://sports.core.api.espn.com/v2/sports/football/leagues/nfl/seasons/2021/teams/9
* https://sports.core.api.espn.com/v2/sports/football/leagues/nfl/seasons/2021/teams/9/athletes
* https://sports.core.api.espn.com/v2/sports/football/leagues/nfl/seasons/2021/teams/9/depthcharts
* https://sports.core.api.espn.com/v2/sports/football/leagues/nfl/seasons/2021/teams/9/events
* https://sports.core.api.espn.com/v2/sports/football/leagues/nfl/seasons/2021/teams/9/projection
* https://sports.core.api.espn.com/v2/sports/football/leagues/nfl/seasons/2021/teams/9/record
* https://sports.core.api.espn.com/v2/sports/football/leagues/nfl/seasons/2021/types/0/teams/4/odds-records
* https://sports.core.api.espn.com/v2/sports/football/leagues/nfl/seasons/2021/types/2/athletes/3061612/projections
* https://sports.core.api.espn.com/v2/sports/football/leagues/nfl/seasons/2021/types/2/leaders
* https://sports.core.api.espn.com/v2/sports/football/leagues/nfl/seasons/2021/types/2/teams/24/statistics
* https://sports.core.api.espn.com/v2/sports/football/leagues/nfl/seasons/2021/types/2/teams/26/ats
* https://sports.core.api.espn.com/v2/sports/football/leagues/nfl/seasons/2021/types/2/weeks
* https://sports.core.api.espn.com/v2/sports/football/leagues/nfl/seasons/2021/types/2/weeks/1/events
* https://sports.core.api.espn.com/v2/sports/football/leagues/nfl/seasons/2021/types/2/weeks/9
* https://sports.core.api.espn.com/v2/sports/football/leagues/nfl/seasons/2021/types/2/weeks
* https://sports.core.api.espn.com/v2/sports/football/leagues/nfl/seasons/2021/types/4/groups
* https://sports.core.api.espn.com/v2/sports/football/leagues/nfl/seasons/2021/types/4/groups/9
* https://sports.core.api.espn.com/v2/sports/football/leagues/nfl/talentpicks
* https://sports.core.api.espn.com/v2/sports/football/leagues/nfl/teams/10/odds/1002/past-performances?limit=134
* https://sports.core.api.espn.com/v2/sports/football/leagues/nfl/teams/10/odds/1002/past-performances?limit=200
* https://sports.core.api.espn.com/v2/sports/football/leagues/nfl/teams/8/injuries?limit=100
* https://sports.core.api.espn.com/v2/sports/football/leagues/nfl/teams/8/odds/1002/past-performances?limit=140
* https://sports.core.api.espn.com/v2/sports/football/leagues/nfl/transactions
@nntrn
Copy link
Author

nntrn commented Sep 7, 2023

I mean a teams average passing/rushing yards allowed per game over a season. Sorry for the confusion.
@Achtbaan

I found averagePointsAgainst, a close cousin to averageYardsAllowed -

{
    "name": "avgPointsAgainst",
    "displayName": "Opponent Points Per Game",
    "shortDisplayName": "OPTS/G",
    "description": "Opponent Points Per Game",
    "abbreviation": "OPTS/G",
    "type": "avgpointsagainst",
    "value": 20.117647,
    "displayValue": "20.1"
},
{
    "name": "pointsAgainst",
    "displayName": "Points Against",
    "shortDisplayName": "PA",
    "description": "Total Points Against",
    "abbreviation": "PA",
    "type": "pointsagainst",
    "value": 342,
    "displayValue": "342"
},

https://sports.core.api.espn.com/v2/sports/football/leagues/nfl/seasons/2022/types/2/teams/6/record

@lexcraw4d
Copy link

This is great! Does anyone have a similar one with ncaa cfb? Looking for player stats specifically... GREAT job!

@nntrn
Copy link
Author

nntrn commented Sep 15, 2023

@lexcraw4d
Does anyone have a similar one with ncaa cfb? Looking for player stats specifically... GREAT job!

Most of the urls can be refashioned for other leagues:
Example: /sports/football/leagues/nfl/ => /sports/baseball/leagues/mlb/

For athlete stats:
https://sports.core.api.espn.com/v2/sports/football/leagues/college-football/athletes/2988219
https://site.web.api.espn.com/apis/common/v3/sports/football/college-football/athletes/4432710/stats

--
for college football, you just need to replace nfl with college-football

@alecmatt5
Copy link

Anyone know why this endpoint: [https://site.api.espn.com/apis/site/v2/sports/football/nfl/scoreboard?limit=1000&dates={year}] doesn't return any of the Thursday NFL games? As far as I can tell it returns all the scoreboards from the year including Sunday, Monday, and Saturday games but skips all of the Thursday games.

Follow up question, anyone know another way I can get all of the game_ids from the NFL games (where the Thursday games aren't being ignored)?

@ryanbuckner
Copy link

ryanbuckner commented Sep 15, 2023 via email

@alecmatt5
Copy link

Anyone know why this endpoint: [https://site.api.espn.com/apis/site/v2/sports/football/nfl/scoreboard?limit=1000&dates={year}] doesn't return any of the Thursday NFL games? As far as I can tell it returns all the scoreboards from the year including Sunday, Monday, and Saturday games but skips all of the Thursday games.

Follow up question, anyone know another way I can get all of the game_ids from the NFL games (where the Thursday games aren't being ignored)?

Thanks for the reply Ryan, I actually figured out the issue. It's not that the Thursday games are being skipped but rather the dates listed are in UTC time and therefore the date corresponding to the 'Thursday' games is actually Friday.

@sandyjtech
Copy link

I want to access player's ppr and standard points per game. Does anyone have any suggestions?

@TheSeahawksAri
Copy link

Can someone please tell me how to get player stats of all time? Also, do I need an API token or something to use this. I'm really confused, and would really appreciate some help

@mrmikeytj
Copy link

Is there an endpoint to get related players for each play?

In the play by play link (https://cdn.espn.com/core/nfl/playbyplay?xhr=1&gameId=401437654), you can find all the plays for each drive.
Although, in each play, it doesn't really say which players were involved. A few years ago there was another section for each player involved.
This was in the nfl gameday json site that disappeared.

One of the first plays of the linked game above, has this:
{ "sequenceNumber": "5600", "period": { "number": 1 }, "homeScore": 0, "start": { "shortDownDistanceText": "1st & 10", "possessionText": "BUF 25", "downDistanceText": "1st & 10 at BUF 25", "distance": 10, "yardLine": 75, "team": { "id": "2" }, "down": 1, "yardsToEndzone": 75 }, "scoringPlay": false, "clock": { "displayValue": "15:00" }, "type": { "id": "24", "text": "Pass Reception", "abbreviation": "REC" }, "priority": false, "statYardage": 6, "awayScore": 0, "wallclock": "2022-09-09T00:24:04Z", "modified": "2022-09-14T21:05Z", "end": { "shortDownDistanceText": "2nd & 10", "possessionText": "BUF 31", "downDistanceText": "2nd & 10 at BUF 31", "distance": 10, "yardLine": 69, "team": { "id": "2" }, "down": 2, "yardsToEndzone": 69 }, "id": "40143765456", "text": "(15:00) (Shotgun) J.Allen pass short right to S.Diggs to BUF 31 for 6 yards (J.Ramsey)." },

Although, besides the last property (text), it doesn't say who threw the pass, who caught it, where it was caught, how many yards after catch, who tackled, who assisted the tackle, etc. I was hoping it had the player id, stat type id, yardage/stat, etc.

I have noticed the play id (40143765456)
Does this link into another end point somewhere?

@mrmikeytj
Copy link

Cloests thing I've been able to find is this: http://sports.core.api.espn.com/v2/sports/football/leagues/nfl/events/401437654/competitions/401437654/plays/40143765456?lang=en&region=us

It includes the stat type, and stat yardage:
"id": "40143765456", "sequenceNumber": "5600", "type": { "id": "24", "text": "Pass Reception", "abbreviation": "REC" },
... then a little farther down ...
"statYardage": 6

It also has a participants property.
It doesn't have a referenced player id as I had hoped, though it does have a player reference link:
It is confusing how it includes the athelete's game stat totals within the participants, instead of the totals for this specific play.
{ "athlete": { "$ref": "http://sports.core.api.espn.com/v2/sports/football/leagues/nfl/seasons/2022/athletes/2976212?lang=en&region=us" }, "position": { "$ref": "http://sports.core.api.espn.com/v2/sports/football/leagues/nfl/positions/1?lang=en&region=us" }, "statistics": { "$ref": "http://sports.core.api.espn.com/v2/sports/football/leagues/nfl/events/401437654/competitions/401437654/competitors/2/roster/2976212/statistics/0?lang=en&region=us" }, "stats": [ { "name": "receptions", "displayName": "Receptions", "shortDisplayName": "Receptions", "description": "The total number of receptions.", "abbreviation": "REC", "value": 8, "displayValue": "8" }, { "name": "receivingYards", "displayName": "Receiving Yards", "shortDisplayName": "Rec. Yards", "description": "The total receiving yards.", "abbreviation": "YDS", "value": 122, "displayValue": "122" }, { "name": "receivingTouchdowns", "displayName": "Receiving Touchdowns", "shortDisplayName": "Receiving Touchdowns", "description": "The total number of receiving touchdowns.", "abbreviation": "TD", "value": 1, "displayValue": "1" } ], "order": 2, "type": "receiver" },

The player reference link has the player details:
"id": "2976212", "uid": "s:20~l:28~a:2976212", "guid": "d6ba7023-458c-f59a-4af2-638770067518", "type": "football", "alternateIds": { "sdr": "2976212" }, "firstName": "Stefon", "lastName": "Diggs",

@mrmikeytj
Copy link

So I'm left with these questions:

Why is the result of this play (6 yard pass reception) say this:
"downDistanceText": "2nd & 10 at BUF 31"

Anywhere I can find stat types like air yards? To know how far the ball traveled on an incomplete or completed pass?
Anywhere I can find stat types for offensive and defensive linemen? missed tackles? yards after catch?

@nntrn
Copy link
Author

nntrn commented Sep 28, 2023

@mrmikeytj
Copy link

@nntrn yeah that seems to have a similar layout as this link
http://sports.core.api.espn.com/v2/sports/football/leagues/nfl/events/401437654/competitions/401437654/plays/40143765456?lang=en&region=us

{ "$ref": "http://sports.core.api.espn.com/v2/sports/football/leagues/nfl/events/401437654/competitions/401437654/plays/40143765456?lang=en&region=us", "id": "40143765456", "sequenceNumber": "5600", "type": { "id": "24", "text": "Pass Reception", "abbreviation": "REC" }, "text": "(15:00) (Shotgun) J.Allen pass short right to S.Diggs to BUF 31 for 6 yards (J.Ramsey).", "shortText": "Josh Allen Pass Complete for 6 Yds to Stefon Diggs", "alternativeText": "(15:00) (Shotgun) J.Allen pass short right to S.Diggs to BUF 31 for 6 yards (J.Ramsey).", "shortAlternativeText": "Josh Allen Pass Complete for 6 Yds to Stefon Diggs", "awayScore": 0, "homeScore": 0, "period": { "number": 1 }, "clock": { "value": 900, "displayValue": "15:00" }, "scoringPlay": false, "priority": false, "scoreValue": 0, "modified": "2022-09-14T21:05Z", "team": { "$ref": "http://sports.core.api.espn.com/v2/sports/football/leagues/nfl/seasons/2022/teams/2?lang=en&region=us" }, "participants": [ { "athlete": { "$ref": "http://sports.core.api.espn.com/v2/sports/football/leagues/nfl/seasons/2022/athletes/3918298?lang=en&region=us" }, "position": { "$ref": "http://sports.core.api.espn.com/v2/sports/football/leagues/nfl/positions/8?lang=en&region=us" }, "statistics": { "$ref": "http://sports.core.api.espn.com/v2/sports/football/leagues/nfl/events/401437654/competitions/401437654/competitors/2/roster/3918298/statistics/0?lang=en&region=us" }, "stats": [ { "name": "completions/attempts", "displayName": "Completions / Attempts", "shortDisplayName": "COMP/ATT", "description": "The number of passing completions and attempts.", "abbreviation": "COMP/ATT", "value": 0.8387096774, "displayValue": "26/31" }, { "name": "passingYards", "displayName": "Passing Yards", "shortDisplayName": "Pass Yards", "description": "The total passing yards.", "abbreviation": "YDS", "value": 297, "displayValue": "297" }, { "name": "passingTouchdowns", "displayName": "Passing Touchdowns", "shortDisplayName": "Touchdowns", "description": "The total number of passing touchdowns.", "abbreviation": "TD", "value": 3, "displayValue": "3" }, { "name": "interceptions", "displayName": "Interceptions", "shortDisplayName": "INT", "description": "The number of passes thrown that were intercepted by the opposing team.", "abbreviation": "INT", "value": 2, "displayValue": "2" } ], "order": 1, "type": "passer" }, { "athlete": { "$ref": "http://sports.core.api.espn.com/v2/sports/football/leagues/nfl/seasons/2022/athletes/2976212?lang=en&region=us" }, "position": { "$ref": "http://sports.core.api.espn.com/v2/sports/football/leagues/nfl/positions/1?lang=en&region=us" }, "statistics": { "$ref": "http://sports.core.api.espn.com/v2/sports/football/leagues/nfl/events/401437654/competitions/401437654/competitors/2/roster/2976212/statistics/0?lang=en&region=us" }, "stats": [ { "name": "receptions", "displayName": "Receptions", "shortDisplayName": "Receptions", "description": "The total number of receptions.", "abbreviation": "REC", "value": 8, "displayValue": "8" }, { "name": "receivingYards", "displayName": "Receiving Yards", "shortDisplayName": "Rec. Yards", "description": "The total receiving yards.", "abbreviation": "YDS", "value": 122, "displayValue": "122" }, { "name": "receivingTouchdowns", "displayName": "Receiving Touchdowns", "shortDisplayName": "Receiving Touchdowns", "description": "The total number of receiving touchdowns.", "abbreviation": "TD", "value": 1, "displayValue": "1" } ], "order": 2, "type": "receiver" }, { "athlete": { "$ref": "http://sports.core.api.espn.com/v2/sports/football/leagues/nfl/seasons/2022/athletes/3045373?lang=en&region=us" }, "position": { "$ref": "http://sports.core.api.espn.com/v2/sports/football/leagues/nfl/positions/29?lang=en&region=us" }, "statistics": { "$ref": "http://sports.core.api.espn.com/v2/sports/football/leagues/nfl/events/401437654/competitions/401437654/competitors/15/roster/3045373/statistics/0?lang=en&region=us" }, "stats": [ { "name": "totalTackles", "displayName": "Total Tackles", "shortDisplayName": "Tackles", "description": "The total number of tackles.", "abbreviation": "TOT", "value": 6, "displayValue": "6" }, { "name": "sacks", "displayName": "Sacks", "shortDisplayName": "Sacks", "description": "The total number of sacks.", "abbreviation": "SACK", "value": 0, "displayValue": "0" }, { "name": "interceptions", "displayName": "Interceptions", "shortDisplayName": "INT", "description": "The number of passes thrown that were intercepted by the opposing team.", "abbreviation": "INT", "value": 0, "displayValue": "0" } ], "order": 3, "type": "tackler" } ], "probability": { "$ref": "http://sports.core.api.espn.com/v2/sports/football/leagues/nfl/events/401437654/competitions/401437654/probabilities/40143765456?lang=en&region=us" }, "wallclock": "2022-09-09T00:24:04Z", "drive": { "$ref": "http://sports.core.api.espn.com/v2/sports/football/leagues/nfl/events/401437654/competitions/401437654/drives/4014376541?lang=en&region=us" }, "start": { "down": 1, "distance": 10, "yardLine": 75, "yardsToEndzone": 75, "downDistanceText": "1st & 10 at BUF 25", "shortDownDistanceText": "1st & 10", "possessionText": "BUF 25", "team": { "$ref": "http://sports.core.api.espn.com/v2/sports/football/leagues/nfl/seasons/2022/teams/2?lang=en&region=us" } }, "end": { "down": 2, "distance": 10, "yardLine": 69, "yardsToEndzone": 69, "downDistanceText": "2nd & 10 at BUF 31", "shortDownDistanceText": "2nd & 10", "possessionText": "BUF 31", "team": { "$ref": "http://sports.core.api.espn.com/v2/sports/football/leagues/nfl/seasons/2022/teams/2?lang=en&region=us" } }, "statYardage": 6 },

@mrmikeytj
Copy link

And thanks for putting this together, its super helpful!

@psuTickleMonster
Copy link

psuTickleMonster commented Oct 15, 2023

@krax13
Copy link

krax13 commented Oct 19, 2023

Hi all,
I want to make a Grafana dashboard to present our ESPN Pigskin Pick'em scoreboard.
Is there available API path to show the picks of the group?
Thank you in advance!

@nntrn
Copy link
Author

nntrn commented Oct 20, 2023

Hi all, I want to make a Grafana dashboard to present our ESPN Pigskin Pick'em scoreboard. Is there available API path to show the picks of the group? Thank you in advance!

@krax13 - heres the pickem api

# challenge_name
# --------------
# CHALLENGE_NAME=nfl-win-totals-2023
# CHALLENGE_NAME=nfl-eliminator-challenge-2023
CHALLENGE_NAME=nfl-pigskin-pickem-2023

# view_name:
# ---------------------------
# VIEW_NAME=allon
# VIEW_NAME=chui_default
# VIEW_NAME=chui_default_group
# VIEW_NAME=chui_default_groupParticipationHistory
# VIEW_NAME=chui_default_metadata
# VIEW_NAME=chui_pagetype_group_picks
VIEW_NAME=pagetype_leaderboard

# group_ids
# -------------------------
# EXAMPLE_GROUP_ID_WINTOTAL=3ea0845b-59d5-499b-97a0-2eb9d02e1cc9
# EXAMPLE_GROUP_ID_ELIMINATOR=ac72d269-e700-4efb-bcb1-269413d1a815
EXAMPLE_GROUP_ID_PIGSKIN=19961d87-2563-4972-bdd3-de7e55ee26be

################################################################################

GROUP_ID=$EXAMPLE_GROUP_ID_PIGSKIN

API_PATH="apis/v1/challenges/${CHALLENGE_NAME}/groups/${GROUP_ID}?view=${VIEW_NAME}&platform=chui"

API_HEADER='gambit-filter: {"filterSortId":{"value":null},"limit":100,"offset":0,"sortRank":{"sortAsc":true,"sortPriority":1}}'

curl "https://gambit-api.fantasy.espn.com/${API_PATH}" -H "$API_HEADER"

Examples:

@krax13
Copy link

krax13 commented Oct 20, 2023

Hi all, I want to make a Grafana dashboard to present our ESPN Pigskin Pick'em scoreboard. Is there available API path to show the picks of the group? Thank you in advance!

@krax13 - heres the pickem api

# challenge_name
# --------------
# CHALLENGE_NAME=nfl-win-totals-2023
# CHALLENGE_NAME=nfl-eliminator-challenge-2023
CHALLENGE_NAME=nfl-pigskin-pickem-2023

# view_name:
# ---------------------------
# VIEW_NAME=allon
# VIEW_NAME=chui_default
# VIEW_NAME=chui_default_group
# VIEW_NAME=chui_default_groupParticipationHistory
# VIEW_NAME=chui_default_metadata
# VIEW_NAME=chui_pagetype_group_picks
VIEW_NAME=pagetype_leaderboard

# group_ids
# -------------------------
# EXAMPLE_GROUP_ID_WINTOTAL=3ea0845b-59d5-499b-97a0-2eb9d02e1cc9
# EXAMPLE_GROUP_ID_ELIMINATOR=ac72d269-e700-4efb-bcb1-269413d1a815
EXAMPLE_GROUP_ID_PIGSKIN=19961d87-2563-4972-bdd3-de7e55ee26be

################################################################################

GROUP_ID=$EXAMPLE_GROUP_ID_PIGSKIN

API_PATH="apis/v1/challenges/${CHALLENGE_NAME}/groups/${GROUP_ID}?view=${VIEW_NAME}&platform=chui"

API_HEADER='gambit-filter: {"filterSortId":{"value":null},"limit":100,"offset":0,"sortRank":{"sortAsc":true,"sortPriority":1}}'

curl "https://gambit-api.fantasy.espn.com/${API_PATH}" -H "$API_HEADER"

Examples:

* [/apis/v1/challenges/**nfl-win-totals-2023**/groups/3ea0845b-59d5-499b-97a0-2eb9d02e1cc9?view=**allon**](https://gambit-api.fantasy.espn.com/apis/v1/challenges/nfl-win-totals-2023/groups/3ea0845b-59d5-499b-97a0-2eb9d02e1cc9?view=allon&platform=chui)

* [/apis/v1/challenges/**nfl-eliminator-challenge-2023**/groups/ac72d269-e700-4efb-bcb1-269413d1a815?view=**chui_default_group**](https://gambit-api.fantasy.espn.com/apis/v1/challenges/nfl-eliminator-challenge-2023/groups/ac72d269-e700-4efb-bcb1-269413d1a815?view=chui_default_group&platform=chui)

* [/apis/v1/challenges/**nfl-pigskin-pickem-2023**/groups/19961d87-2563-4972-bdd3-de7e55ee26be?view=**pagetype_leaderboard**](https://gambit-api.fantasy.espn.com/apis/v1/challenges/nfl-pigskin-pickem-2023/groups/19961d87-2563-4972-bdd3-de7e55ee26be?view=pagetype_leaderboard)

Many thanks @nntrn That is what I am looking for. :)

@ZacharySal
Copy link

Is there any way to get the season leaders for a team without fetching one of their games? I know there is a link listed, but it takes an extra api call for each player to get the data. Is there a more concise call? Thank you for all of this information by the way!

@nntrn
Copy link
Author

nntrn commented Oct 31, 2023

Is there any way to get the season leaders for a team without fetching one of their games? I know there is a link listed, but it takes an extra api call for each player to get the data. Is there a more concise call? Thank you for all of this information by the way!

@ZacharySal - maybe these?

@psuTickleMonster
Copy link

@nntrn - Anybody get results for the Rankings Endpoint? https://sports.core.api.espn.com/v2/sports/football/leagues/nfl/seasons/2023/types/2/weeks/6/rankings

Anyone? Has anyone found a way to get rankings besides the efficiency ranks? Eff Rank and standard off/def rank seem to be different.

@jalikens
Copy link

jalikens commented Nov 28, 2023

@nntrn Does anyone know how to get the season leaders for TEAM stats? for example stats from here https://www.espn.com/nfl/stats/_/view/team

Is there something similar to this endpoint: https://sports.core.api.espn.com/v2/sports/football/leagues/nfl/seasons/2023/types/2/leaders

@nntrn
Copy link
Author

nntrn commented Dec 1, 2023

@lewishardie
Copy link

This might be a noob question, I'm fairly new to programming, but I'm trying to setup a search function to pull player profile information (i.e name, headshot, age, number, team), the only issue being that for the search to work as I've set it up I can't just search "Ryan Tannehill" and get that information, I need to search using their player id, which isn't intuitive for users.

https://sports.core.api.espn.com/v2/sports/football/leagues/nfl/athletes
https://sports.core.api.espn.com/v2/sports/football/leagues/nfl/athletes/14876

Is it a situation where I'm better of having a local file that has all the key: value pairings e.g. { "Ryan Tannehill" : 14876 } or is there a better way to do this?

@ryanbuckner
Copy link

ryanbuckner commented Dec 15, 2023 via email

@eye4eneye
Copy link

@lewishardie Hey Lewis, were you able to solve? I'm wondering the same.

@nntrn
Copy link
Author

nntrn commented Dec 26, 2023

Is it a situation where I'm better of having a local file that has all the key: value pairings e.g. { "Ryan Tannehill" : 14876 } or is there a better way to do this?

you can run this script to build a local roster
https://github.com/nntrn/espn-wiki/blob/main/scripts/roster.sh

$ curl -O https://github.com/nntrn/espn-wiki/blob/main/scripts/roster.sh
$ chmod a+x roster.sh
$ ./roster.sh /tmp/nfl-roster

Results:

[
  {
    "id": "4259305",
    "team": "GB",
    "position": "WR",
    "fullName": "Bo Melton"
  },
  {
    "id": "4685016",
    "team": "GB",
    "position": "RB",
    "fullName": "Ellis Merriweather"
  }
  ...
]

@lewishardie @eye4eneye

@eye4eneye
Copy link

@nntrn Thank you so much for this script!

@mattabets
Copy link

This might be a noob question, I'm fairly new to programming, but I'm trying to setup a search function to pull player profile information (i.e name, headshot, age, number, team), the only issue being that for the search to work as I've set it up I can't just search "Ryan Tannehill" and get that information, I need to search using their player id, which isn't intuitive for users.

https://sports.core.api.espn.com/v2/sports/football/leagues/nfl/athletes https://sports.core.api.espn.com/v2/sports/football/leagues/nfl/athletes/14876

Is it a situation where I'm better of having a local file that has all the key: value pairings e.g. { "Ryan Tannehill" : 14876 } or is there a better way to do this?

alternatively, I just used @nntrn 's script to build a python function to reverse lookup the player id by their name. You can find the documentation here: https://github.com/mattabets/espn_api_player_id_reverse_lookup/blob/main/README.md

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