# ESPN Sports Scraper — Scores, Standings, Rosters & Injuries (`fabrikit/espn-sports-scraper`) Actor

ESPN sports data: scores and results with period scores and top performers, team season schedules, standings, teams, pro rosters, injury reports and news for NFL, NBA, WNBA, MLB, NHL, college and soccer leagues.

- **URL**: https://apify.com/fabrikit/espn-sports-scraper.md
- **Developed by:** [Fabrikit](https://apify.com/fabrikit) (community)
- **Categories:** Other, Developer tools, News
- **Security:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.75 / 1,000 sports record scrapeds

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## ESPN Sports Scraper

ESPN Sports Scraper extracts sports data from espn.com's public API: live and final scores with period-by-period line scores, team box-score totals and top performers, a team's full season schedule, standings, team directories, professional rosters, injury reports and news headlines. It covers the NFL, NBA, WNBA, MLB, NHL, college football and basketball, MLS, the Premier League, LaLiga, Bundesliga, Serie A, Ligue 1, the Champions League, Liga MX and any other team-sport league ESPN lists. Every row is flat, typed JSON (ISO dates, numbers as numbers). Plain HTTP: no browser, no login, no API key, no proxy.

Looking for **betting lines** (spread, total, moneyline, opening and closing odds)? They are not in this Actor. Our [Sports Betting Odds Scraper](https://apify.com/fabrikit/sports-odds-scraper) is built on the same ESPN feed and returns one row per game and sportsbook.

### What you get

Pick one `dataType` per run:

| dataType | One row per | Main fields |
|---|---|---|
| `games` | game on the chosen days | teams, start time, status, score, line score per quarter / period / inning, winner, attendance, venue, TV, recap headline, team stats, top performers, soccer goals and red cards |
| `schedule` | game in a team's season | the same game fields for every past and upcoming game of the teams you name (soccer: results and fixtures) |
| `standings` | team in a table | group (conference / division / table), place, W-L-T, OT losses, win %, points, goals or points for / against, games behind, streak, playoff seed, clinch flag, home / road / last-10 / division / conference records, qualification zone |
| `teams` | team | ESPN id, name, abbreviation, colours, logo, venue, current record, standing summary, next game |
| `rosters` | player (pro leagues) | name, jersey, position, position group, age, height, weight, birthplace, college, years in the league, injury status, headshot |
| `injuries` | injury (NFL, NBA, WNBA, MLB, NHL) | player, team, status (Out, Questionable, IR, Day-To-Day...), injury, detail, side, expected return, fantasy status, short note, last update |
| `news` | article | headline, summary, type, author, published time, tagged teams and athletes, image, link |

A `SUMMARY` record in the key-value store lists what was found and saved per league, the requests made and any ESPN error.

### Use cases

- **Results and scores feeds**: schedule a run every morning (the default covers yesterday and today) and push last night's finals to a Google Sheet, Slack channel or website widget.
- **Fantasy sports and betting research**: the injury report with return dates, team stats and top performers per game, plus standings and streaks, in one place.
- **Sports apps and newsletters**: team directories with logos and colours, full season calendars, and the latest headlines per team.
- **Data science**: build season tables of results with line scores, attendance and venues for models and dashboards.
- **AI agents**: give an LLM a clean JSON answer to "who won last night?", "who is injured for the Bears?" or "what is the Premier League table?".

### Input

Scores for the last two days (default) in five leagues:

```json
{
    "dataType": "games",
    "leagues": ["nba", "nhl", "nfl", "mlb", "epl"],
    "maxItems": 30
}
```

The 2025 season of two teams:

```json
{
    "dataType": "schedule",
    "leagues": ["nfl", "epl"],
    "teams": ["Bears", "Arsenal"],
    "season": 2025
}
```

Other examples: `{"dataType": "standings", "leagues": ["nfl"], "standingsLevel": "division"}`, `{"dataType": "injuries", "leagues": ["nfl", "nba"]}`, `{"dataType": "rosters", "leagues": ["nba"], "teams": ["LAL", "BOS"]}`, `{"dataType": "news", "leagues": ["nba"], "teams": ["Lakers"], "newsLimit": 10}`.

- `leagues`: nfl, ncaaf, nba, wnba, ncaab, mlb, nhl, mls, epl, laliga, bundesliga, seriea, ligue1, ucl, ligamx. `customLeagues` takes any other ESPN path such as `soccer/ned.1`, `soccer/uefa.europa` or `football/cfl`.
- `teams`: abbreviation (`LAL`), full name, nickname (`Lakers`) or ESPN id (`13`). Filters every data type; for `news` each team gets its own feed.
- `dateFrom` / `dateTo` / `days` (games): US Eastern game days; `today`, `yesterday`, `-3`, `+2` work too. Empty = yesterday and today. NFL and college football without dates return ESPN's current week. Up to 31 days per run.
- `gameStates`: `pre`, `in`, `post` (games and schedule).
- `season`, `seasonType` (schedule) and `standingsLevel` (`default`, `overall`, `division`).
- `includeTeamDetails` (teams, on), `includePlayerNotes` (injuries, off), `newsLimit` (1-50).
- `maxItems` is exact and global; duplicates (the same game seen on two team schedules) are saved and charged once.

### Output example

A finished Premier League match from a `games` run:

```json
{
    "recordType": "game",
    "gameId": "401879263",
    "league": "epl",
    "leagueName": "English Premier League",
    "sport": "soccer",
    "season": 2026,
    "shortName": "SUN @ BOU",
    "startTime": "2026-10-18T13:00:00.000Z",
    "status": "post",
    "statusDetail": "FT",
    "homeTeam": "AFC Bournemouth",
    "homeTeamAbbr": "BOU",
    "homeScore": 2,
    "homeForm": "DWLLW",
    "awayTeam": "Sunderland",
    "awayScore": 0,
    "winner": "home",
    "winnerTeam": "AFC Bournemouth",
    "attendance": 12004,
    "venue": "Vitality Stadium",
    "broadcast": "Peacock",
    "headline": "Bournemouth ease past 10-man Sunderland",
    "goals": [
        { "minute": "6'", "team": "BOU", "player": "Marcus Tavernier", "type": "Goal - Header", "penalty": false, "ownGoal": false },
        { "minute": "48'", "team": "BOU", "player": "Evanilson", "type": "Goal", "penalty": false, "ownGoal": false }
    ],
    "redCards": [{ "minute": "17'", "team": "SUN", "player": "Kevin Danso" }],
    "homeStats": { "possessionPct": 65, "totalShots": 29, "shotsOnTarget": 6, "wonCorners": 5, "foulsCommitted": 16 },
    "espnUrl": "https://www.espn.com/soccer/match/_/gameId/401879263/sunderland-afc-bournemouth",
    "scrapedAt": "2026-10-21T16:52:10.412Z"
}
```

(Shortened for reading; real rows always carry every field, with `null` when ESPN has no value. Basketball, hockey, football and baseball rows add `homeLinescores` / `awayLinescores` and `homeLeaders` / `awayLeaders`, e.g. `{"category": "Points", "player": "Jalen Duren", "value": "22"}`.)

A `standings` row:

```json
{
    "recordType": "standing", "league": "nfl", "season": 2026, "group": "AFC East", "parentGroup": "American Football Conference",
    "groupRank": 1, "team": "Buffalo Bills", "teamAbbr": "BUF", "gamesPlayed": 6, "wins": 5, "losses": 1, "ties": 0,
    "winPercent": 0.833, "pointsFor": 197, "pointsAgainst": 171, "pointDifferential": 26, "gamesBehind": 0, "streak": "W2",
    "playoffSeed": 2, "homeRecord": "2-1", "awayRecord": "3-0", "divisionRecord": "0-1", "conferenceRecord": "3-1"
}
```

### Pricing

Pay per event: each row saved (`sports-record`) is charged once, plus a tiny amount of Apify platform usage. No proxy cost. See the Pricing tab for current prices; paid Apify plans get lower rates.

Typical row counts:

| Run | Rows |
|---|---|
| Default input (5 leagues, yesterday + today, capped at 30) | 30 |
| One NFL week of games | 14-16 |
| A team's full NBA regular season | ~80 |
| Every NBA roster | ~540 |
| NFL + NBA + MLB + NHL injury reports | ~680 |

### How it compares

- **Other ESPN score scrapers** return games and scores only. This Actor adds line scores, team stats, top performers, soccer scorers, standings, rosters, injuries, team schedules and news.
- **Official sports data APIs** are complete but sold as monthly contracts. This is pay-as-you-go and needs no key.
- **Scraping espn.com pages** with a browser is slow and fragile; the JSON API behind the site is fast and stable.

Limits, honestly: no play-by-play, no individual box scores, no betting odds (see the odds Actor above), no individual sports (golf, tennis, F1, UFC). Rosters are offered for professional leagues only.

### Integrations

Use the Apify API or the dataset export (JSON, CSV, Excel), schedules and webhooks, or connect Make, Zapier, n8n, Google Sheets and Airbyte. AI agents can call it as a tool through Apify's MCP server or from LangChain and LlamaIndex.

### FAQ

**Is it legal?** The Actor reads the public JSON that powers espn.com, without login or circumvention, and stores sports facts: teams, scores, tables and public information about professional athletes as published by ESPN. Dates of birth and contract amounts are deliberately left out. Respect ESPN's terms for how you reuse the data.

**Do I need a proxy?** No. ESPN accepts direct requests. If the platform's IP is ever refused, the Actor retries with other browser headers and then Apify Proxy (datacenter) on its own.

**Why did a league return nothing?** No games on those days, a college league without `teams` for `schedule`, or a league ESPN has no injury report for. The log and the `SUMMARY` record say which.

**How fresh is it?** Live from ESPN at run time. Schedule it as often as you need.

### Changelog

- **0.1** (October 2026): first release. Seven data types, 15 leagues plus custom ESPN paths, team filter, exact `maxItems`, pay-per-row pricing.

***

### En español

ESPN Sports Scraper extrae datos deportivos de la API pública de ESPN: marcadores en vivo y finales con parciales por cuarto, periodo o entrada, estadísticas por equipo y figuras del partido, goleadores y tarjetas rojas en fútbol, calendario completo de la temporada de un equipo, tablas de posiciones, equipos (sede, récord, próximo partido), planteles de ligas profesionales, partes de lesiones y noticias. Ligas: NFL, NBA, WNBA, MLB, NHL, fútbol americano y básquetbol universitario, MLS, Premier League, LaLiga, Bundesliga, Serie A, Ligue 1, Champions League, Liga MX y cualquier otra liga por equipos de ESPN. Sin navegador, sin login y sin proxy. Las cuotas de apuestas están en nuestro [Sports Betting Odds Scraper](https://apify.com/fabrikit/sports-odds-scraper). Consulta la pestaña Pricing para ver los precios actuales; los planes de pago de Apify tienen tarifas más bajas.

# Actor input Schema

## `dataType` (type: `string`):

`games`: scores, results and upcoming games for the chosen dates. `schedule`: the full season of the teams in `teams`. `standings`: league tables. `teams`: team directory with venue, record and next game. `rosters`: players of professional teams. `injuries`: current injury report (NFL, NBA, WNBA, MLB, NHL). `news`: latest headlines per league or team.

## `leagues` (type: `array`):

Leagues to cover. Rosters are only returned for professional leagues; injuries only where ESPN publishes a report (NFL, NBA, WNBA, MLB, NHL).

## `customLeagues` (type: `array`):

Any other team-sport league on ESPN, written as `sport/league` exactly like in ESPN's URLs: soccer/ned.1 (Eredivisie), soccer/por.1, soccer/uefa.europa, soccer/arg.1, football/cfl... Unknown paths are reported in the log and skipped.

## `teams` (type: `array`):

Optional. Limit the run to these teams: ESPN abbreviation (LAL), full name (Los Angeles Lakers), nickname (Lakers) or ESPN team id (13). Required for `schedule` in college leagues. For `news` each team gets its own feed.

## `dateFrom` (type: `string`):

First game day for `games`, YYYY-MM-DD (US Eastern). Also accepts `today`, `yesterday`, `tomorrow`, `-3` or `+2` (days from today). Empty = yesterday, so the default run returns last night's results and today's games. NFL and college football without dates use ESPN's current week.

## `dateTo` (type: `string`):

Last game day for `games` (inclusive), YYYY-MM-DD. Empty = `dateFrom` plus `days` - 1. At most 31 days per run.

## `days` (type: `integer`):

Number of days for `games` when `dateTo` is empty. One request per league and day.

## `gameStates` (type: `array`):

For `games` and `schedule`: keep only games in these states. Empty = all.

## `season` (type: `integer`):

For `schedule` and `standings`. Empty = current season. ESPN numbers NBA, NHL and college basketball seasons by the year they end (2026 = 2025-26) and soccer seasons by the year they start (2025 = 2025-26); NFL and MLB by their calendar year.

## `seasonType` (type: `string`):

For `schedule` in US leagues: regular season or postseason. Empty = whatever part of the season ESPN shows now.

## `standingsLevel` (type: `string`):

For `standings`: ESPN's default grouping (conferences in the NBA, NFL and NHL; leagues in MLB; one table in soccer), a single overall table, or divisions.

## `includeTeamDetails` (type: `boolean`):

For `teams`: one extra request per team to add the home venue, current record, standing summary and next game. Turn off for a faster logo and colour list.

## `includePlayerNotes` (type: `boolean`):

For `injuries`: ESPN's feed also carries short notes on healthy (Active) players, e.g. last game's stat line. Off = only real injury designations (Out, Questionable, Injured Reserve, Day-To-Day...).

## `newsLimit` (type: `integer`):

For `news`: how many headlines to request per league (or per team when `teams` is set). ESPN returns at most 50.

## `maxItems` (type: `integer`):

Stop after this many rows in total (exact). Each row is one game, standings line, team, player, injury or article.

## `proxyConfiguration` (type: `object`):

Optional. ESPN's public API accepts direct connections, so no proxy is used by default. If the platform's IP is ever refused, the Actor retries with other browser headers and then with Apify Proxy (datacenter) on its own.

## Actor input object example

```json
{
  "dataType": "games",
  "leagues": [
    "nba",
    "nhl",
    "nfl",
    "mlb",
    "epl"
  ],
  "days": 2,
  "seasonType": "current",
  "standingsLevel": "default",
  "includeTeamDetails": true,
  "includePlayerNotes": false,
  "newsLimit": 20,
  "maxItems": 30,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

# Actor output Schema

## `records` (type: `string`):

All rows saved during the run, one data type per run

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "dataType": "games",
    "leagues": [
        "nba",
        "nhl",
        "nfl",
        "mlb",
        "epl"
    ],
    "maxItems": 30,
    "proxyConfiguration": {
        "useApifyProxy": false
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("fabrikit/espn-sports-scraper").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "dataType": "games",
    "leagues": [
        "nba",
        "nhl",
        "nfl",
        "mlb",
        "epl",
    ],
    "maxItems": 30,
    "proxyConfiguration": { "useApifyProxy": False },
}

# Run the Actor and wait for it to finish
run = client.actor("fabrikit/espn-sports-scraper").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "dataType": "games",
  "leagues": [
    "nba",
    "nhl",
    "nfl",
    "mlb",
    "epl"
  ],
  "maxItems": 30,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}' |
apify call fabrikit/espn-sports-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,fabrikit/espn-sports-scraper"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/cltBjNzSysVVEXXWy/builds/cjWvyWp5sfqUhMRG6/openapi.json
