OrbTop

ESPN Hidden API Multi-Sport Scores Scraper

SPORTSAI

ESPN Hidden API Multi-Sport Scores Scraper

Extract scores, schedules, team rosters, and athlete data from ESPN's undocumented public JSON APIs — covering NFL, NBA, MLB, NHL, soccer, and more. No HTML parsing, no authentication, no proxy required.

Why the hidden API? ESPN's site.api.espn.com and sports.core.api.espn.com are the same endpoints ESPN's own website and mobile app use. They return clean, structured JSON and have been stable for years. Unlike HTML scrapers that break on every redesign, API-based extraction survives indefinitely.


What Data Does It Return?

All three modes return flat JSON records with consistent field names.

Scoreboard (scoreboard)

Game scores and schedules for any sport and league. Returns one record per game with home/away teams, scores, status (scheduled, in-progress, final), venue, and season/week context.

Team Roster (roster)

All athletes on a specific team's roster. Returns athlete name, position, jersey number, and status. Requires the ESPN teamId (find it from scoreboard home_team_id / away_team_id fields).

Athlete List (athletes)

Paginated full league athlete directory via sports.core.api.espn.com. Returns athlete name, position, jersey, and team association for every active (and recently inactive) player in the league.


Input

Field Type Required Description
dataType string Yes What to fetch: scoreboard, roster, or athletes
sport string Yes ESPN sport slug (e.g. basketball, football, baseball, hockey, soccer)
league string Yes ESPN league slug (e.g. nba, nfl, mlb, nhl, eng.1, wnba, ncaaf, ncaab)
teamId string For roster ESPN team ID. Find from scoreboard output (home_team_id, away_team_id)
date string No Date in YYYYMMDD format for scoreboard. Defaults to today
season integer No Season year for athletes list. Defaults to current active season
maxItems integer No Maximum records to return

Example Inputs

NBA games today:

{
  "dataType": "scoreboard",
  "sport": "basketball",
  "league": "nba",
  "maxItems": 20
}

NFL Week 1 2025 schedule:

{
  "dataType": "scoreboard",
  "sport": "football",
  "league": "nfl",
  "date": "20250907",
  "maxItems": 50
}

Premier League today:

{
  "dataType": "scoreboard",
  "sport": "soccer",
  "league": "eng.1",
  "maxItems": 20
}

Los Angeles Lakers roster (teamId 13):

{
  "dataType": "roster",
  "sport": "basketball",
  "league": "nba",
  "teamId": "13",
  "maxItems": 20
}

Full NBA athlete directory:

{
  "dataType": "athletes",
  "sport": "basketball",
  "league": "nba",
  "maxItems": 500
}

Output Schema

Each record is a flat JSON object. Fields not applicable to the current dataType are null.

Field Type Modes Description
sport string all Sport slug
league string all League slug
data_type string all scoreboard, roster, or athletes
event_id string scoreboard ESPN event ID
event_name string scoreboard Full game display name
event_date string scoreboard Game date/time (ISO 8601)
status string all Game status or athlete status
season_year integer scoreboard Season year
week integer scoreboard Week number (NFL/college football)
home_team string scoreboard Home team name
home_team_id string scoreboard ESPN home team ID
away_team string scoreboard Away team name
away_team_id string scoreboard ESPN away team ID
home_score integer scoreboard Home team score
away_score integer scoreboard Away team score
home_record string scoreboard Home team season record (e.g. 60-22)
away_record string scoreboard Away team season record
venue string scoreboard Stadium/arena full name
venue_city string scoreboard Venue city
athlete_id string roster, athletes ESPN athlete ID
athlete_name string roster, athletes Athlete full name
position string roster, athletes Position display name
jersey string roster, athletes Jersey number
roster_team string roster, athletes Team name
team_id string roster, athletes ESPN team ID

Supported Sports and Leagues

Sport League Input
American Football NFL sport: football, league: nfl
American Football College Football (FBS) sport: football, league: college-football
Basketball NBA sport: basketball, league: nba
Basketball WNBA sport: basketball, league: wnba
Basketball College Basketball (Men's) sport: basketball, league: mens-college-basketball
Baseball MLB sport: baseball, league: mlb
Ice Hockey NHL sport: hockey, league: nhl
Soccer English Premier League sport: soccer, league: eng.1
Soccer MLS sport: soccer, league: usa.1
Soccer UEFA Champions League sport: soccer, league: uefa.champions
Soccer La Liga sport: soccer, league: esp.1
Soccer Bundesliga sport: soccer, league: ger.1

Any valid ESPN sport/league slug combination works. Invalid combinations return an empty events array.


Tips

  • Find team IDs: Run a scoreboard query, then read home_team_id and away_team_id from the results.
  • Historical scores: Pass a date in YYYYMMDD format to the scoreboard mode to retrieve past game results.
  • Off-season: Scoreboard queries during the off-season return zero or few results — this is expected.
  • Rate limits: ESPN's CDN is permissive. No proxy needed. For bulk roster pulls across all teams, run one query per team with maxItems: 0.