API Anything

ESPN APIunofficial

ESPN scores, standings and NBA rosters, logged out.

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 setup

Then 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=401909277

Operations

OperationMethodLoginWritesStatus
getGame(league, gameId) -> gameId, date, status, home, homeScore, homeLinescores, homeRecord, away, awayScore, awayLinescores, awayRecord, venue, attendance, leaderStats, homeLeaders, homeLeaderValues, awayLeaders, awayLeaderValues, headline, recap

One 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, note

A 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, groups

Current 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, weight

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

  • date is YYYYMMDD. ESPN groups games by US Eastern day, so a late game can start after midnight UTC (date in the result is UTC).
  • Soccer and other sports with a league segment in the URL are not covered.
  • In scoreboard, team1Home says whether team1 is the home team (it usually is). MLB games have an empty team1Score/team2Score; get the score with getGame.
  • College basketball scoreboards list only the games ESPN features by default (Top 25 and similar), not every Division I game.
  • standings returns the current standings for NBA, NFL or MLB. Use each header's i as the index into a team's stats array; groups may contain divisions under children. The MLB result can be truncated, in which case use the returned result handle to retrieve the rest.
  • teamRoster currently covers NBA teams only. Use ESPN URL abbreviations such as lal, bos or gs; a player's jersey or other field may be absent.
  • getGame numbers are strings except attendance. leaderStats, homeLeaders, homeLeaderValues, awayLeaders and awayLeaderValues line up by index (points, rebounds, assists in 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.

← All shared sites