ESPN Games Data for NBA, NFL, MLB, NHL, MLS, EPL avatar
ESPN Games Data for NBA, NFL, MLB, NHL, MLS, EPL

Pricing

Pay per usage

Go to Apify Store
ESPN Games Data for NBA, NFL, MLB, NHL, MLS, EPL

ESPN Games Data for NBA, NFL, MLB, NHL, MLS, EPL

An Apify Actor that fetches sports games data from ESPN's public API. Supports multiple sports and leagues with flexible date ranges and filtering options. Fetch games from NBA, NFL, MLB, NHL, MLS, EPL, and more in a single run.

Pricing

Pay per usage

Rating

0.0

(0)

Developer

Harish Garg

Harish Garg

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

4 days ago

Last modified

Share

ESPN Games Data Actor

An Apify Actor that fetches sports games data from ESPN's public API. Supports multiple sports and leagues with flexible date ranges and filtering options.

Features

  • Multi-league support: Fetch games from NBA, NFL, MLB, NHL, MLS, EPL, and more in a single run
  • Flexible date modes: Today, tomorrow, yesterday, single date, or date ranges
  • Team filtering: Filter games by team abbreviations
  • Status filtering: Filter by game status (scheduled, in progress, final)
  • Timezone conversion: Output dates in your preferred timezone
  • Rate limiting: Built-in 1 req/sec rate limiting with exponential backoff

Supported Leagues

SportLeagueCode
BasketballNBAnba
BasketballWNBAwnba
BasketballNCAA Men'sncaam
BasketballNCAA Women'sncaaw
FootballNFLnfl
FootballNCAA Footballncaaf
BaseballMLBmlb
HockeyNHLnhl
SoccerMLSmls
SoccerEnglish Premier Leagueepl
SoccerLa Ligalaliga
SoccerUEFA Champions Leagueucl

Input

ParameterTypeRequiredDefaultDescription
leaguesstring[]Yes-League codes to fetch
dateModeenumYestodaytoday, tomorrow, yesterday, single, range
datestringNo-Date in YYYYMMDD format (for single mode)
startDatestringNo-Start date YYYYMMDD (for range mode)
endDatestringNo-End date YYYYMMDD (for range mode)
teamsstring[]No[]Filter by team abbreviations (e.g., LAL, NYK)
gameStatusstring[]No["pre", "in", "post"]Filter by game status
timezonestringNoUTCOutput timezone (e.g., America/New_York)

Example Input

{
"leagues": ["nba", "nhl"],
"dateMode": "today",
"teams": [],
"gameStatus": ["pre", "in", "post"],
"timezone": "America/New_York"
}

Date Range Example

{
"leagues": ["nfl"],
"dateMode": "range",
"startDate": "20260118",
"endDate": "20260120",
"timezone": "America/Los_Angeles"
}

Output

Each game is output as a flat object:

{
"gameId": "401584721",
"sport": "basketball",
"league": "nba",
"date": "2026-01-23T00:00:00Z",
"dateLocal": "2026-01-22T19:00:00-05:00",
"name": "Cleveland Cavaliers at Charlotte Hornets",
"shortName": "CLE @ CHA",
"status": {
"state": "pre",
"description": "Scheduled",
"detail": "7:00 PM ET",
"clock": null,
"period": null
},
"homeTeam": {
"id": "30",
"name": "Charlotte Hornets",
"abbreviation": "CHA",
"score": null
},
"awayTeam": {
"id": "5",
"name": "Cleveland Cavaliers",
"abbreviation": "CLE",
"score": null
},
"venue": {
"name": "Spectrum Center",
"city": "Charlotte",
"state": "NC"
},
"broadcasts": ["NBA TV"]
}

Status States

StateDescription
preGame is scheduled but hasn't started
inGame is currently in progress
postGame has ended (final, postponed, canceled)

Local Development

  1. Install dependencies:

    $npm install
  2. Create input file at storage/key_value_stores/default/INPUT.json

  3. Run the actor:

    $npm start
  4. Output will be saved to storage/datasets/default/

Scheduling Examples

Use CaseCron ExpressionDescription
Daily morning digest0 6 * * *6 AM daily
Live score updates*/5 * * * *Every 5 minutes
Weekly preview0 8 * * 1Monday at 8 AM
Nightly results0 2 * * *2 AM daily

License

ISC