ESPN APIunofficial
ESPN scores, standings and NBA rosters, logged out.
- espn.com
all live 4 operations, checked by the installs that call them.
Seeded by the maintainers.
Try it
Set up API Anything for your agents:
npx -y api-anything setupThen ask your agent, which finds this site by itself, or call it from a shell:
api-anything pull espn
api-anything call espn getGame league=nba gameId=401909277Operations
| Operation | Method | Login | Writes | Status |
|---|---|---|---|---|
getGame(league, gameId) -> gameId, date, status, home, homeScore, homeLinescores, homeRecord, away, awayScore, awayLinescores, awayRecord, venue, attendance, leaderStats, homeLeaders, homeLeaderValues, awayLeaders, awayLeaderValues, headline, recapOne game's page: status, home and away teams with score, per-period linescores and record, venue, attendance, the leaders in each stat category (leaderStats, with the home and away player and value at the same index) and the story headline and recap. Before a game starts there is no score, and the leaders are season leaders. |
GET | no | no | Live0 confirmations · success unknown; last worked unknown |
scoreboard(league, date) -> gameId, date, status, state, team1, team1Abbrev, team1Score, team1Home, team2, team2Abbrev, team2Score, venue, noteA league's games on one day, from ESPN's scoreboard page: gameId, date (UTC start), status ("Final", "3:47 - 4th", "11/1 - 1:00 PM EST"), state (pre, in or post), both teams with names, abbreviations and scores, team1Home, venue and note (a series or tournament label, when there is one). An empty list means no games that day. |
GET | no | no | Live0 confirmations · success unknown; last worked unknown |
standings(league) -> headers, groupsCurrent league standings grouped by conference or division. Header indices identify each team's positional stats, including wins, losses, percentage, games back and streak where ESPN supplies them. Large results may be truncated. |
GET | no | no | Live0 confirmations · success unknown; last worked unknown |
teamRoster(league, team) -> name, position, jersey, age, height, weightCurrent NBA team roster with each player's name, position, jersey, age, height and weight when available. |
GET | no | no | Live0 confirmations · success unknown; last worked unknown |
Notes
No account is needed.
dateisYYYYMMDD. ESPN groups games by US Eastern day, so a late game can start after midnight UTC (datein the result is UTC).- Soccer and other sports with a league segment in the URL are not covered.
- In
scoreboard,team1Homesays whether team1 is the home team (it usually is). MLB games have an emptyteam1Score/team2Score; get the score withgetGame. - College basketball scoreboards list only the games ESPN features by default (Top 25 and similar), not every Division I game.
standingsreturns the current standings for NBA, NFL or MLB. Use each header'sias the index into a team'sstatsarray; groups may contain divisions underchildren. The MLB result can be truncated, in which case use the returned result handle to retrieve the rest.teamRostercurrently covers NBA teams only. Use ESPN URL abbreviations such aslal,bosorgs; a player's jersey or other field may be absent.getGamenumbers are strings exceptattendance.leaderStats,homeLeaders,homeLeaderValues,awayLeadersandawayLeaderValuesline up by index (points,rebounds,assistsin the NBA; passing, rushing, receiving yards, sacks and tackles in football). Before a game, the score, linescores and attendance are missing and the leaders are season totals.
About these operations
Each operation is a request learned from ESPN's own web pages: API Anything replays it over plain HTTP and falls back to a browser when it must. Read them as JSON.