# ESPN Sports Scraper - Scores, Odds, Stats & Standings (`scrapesage/espn-sports-scraper`) Actor

Scrape live scores, betting odds, schedules, standings, box scores, rosters and news for 40+ leagues — NFL, NBA, MLB, NHL, NCAA, soccer (EPL, La Liga, UCL…), F1, UFC, golf & more. Keyless, fast, no browser. Monitor mode for score & odds updates. Export to JSON, CSV or Excel.

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

## Pricing

from $3.00 / 1,000 game scrapeds

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

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

## What's an Apify Actor?

Actors are a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
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.
Actors are written with capital "A".

## 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.
The best way to integrate Actors is as follows.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js/docs.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python/docs.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/integrations/mcp.md).

If your project is in a different language, use the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).


# README

## ESPN Sports Scraper — Scores, Odds, Stats, Standings & News

Extract **complete sports data for 40+ leagues** from ESPN's public data API — live and final **scores**, sportsbook **betting odds**, full **box scores & player stats**, **standings**, team **rosters**, **schedules**, **rankings** and **news**. One actor covers the NFL, NBA, MLB, NHL, NCAA football & basketball, worldwide soccer (Premier League, La Liga, Serie A, Bundesliga, Ligue 1, MLS, Champions League, Europa League, Liga MX…), Formula 1, UFC, golf and more.

No API key, no login, no browser — fast JSON straight from the same endpoints that power ESPN.com and the ESPN app. Add **monitor mode** to pull only new games, score changes and odds movements, and run it on a [schedule](https://docs.apify.com/platform/schedules) for an always-fresh feed.

### Why this ESPN scraper?

Most sports scrapers do one league, one thing, and break the moment a season changes. This actor ships the **richest sports dataset in the category** from a single, reliable source — and it's the only one that bundles **live scores, real sportsbook odds, deep box scores, standings, rosters and news together**.

| Data | Typical scrapers | This actor |
|---|---|---|
| Live & final **scores** | partial | ✅ all 40+ leagues |
| **Betting odds** (spread, total, money line) | ❌ | ✅ across sportsbooks |
| Deep **box score** + player stats | ❌ | ✅ |
| **Win probability**, scoring plays, injuries | ❌ | ✅ (Game mode) |
| League **standings** (W-L, GB, streaks, +/-) | partial | ✅ |
| Team **rosters** (age, height, college, salary) | ❌ | ✅ |
| Team & league **schedules** | partial | ✅ |
| AP / Coaches **rankings** | ❌ | ✅ |
| League **news** articles | ❌ | ✅ |
| **Monitor mode** — only new/changed data | ❌ | ✅ |
| Worldwide **soccer** + F1 / UFC / golf | rarely | ✅ |

### Use cases

- **Sports betting & odds tools** — pull spreads, totals and money lines per game across sportsbooks, and use monitor mode to catch **line movements** as they happen.
- **Fantasy & analytics apps** — feed schedules, box scores, player stats, standings and injuries into models and dashboards.
- **Media, blogs & Discord/Telegram bots** — auto-post live scores, final results, rankings and headlines on a schedule.
- **Data science & prediction models** — build historical datasets of results, odds and win probabilities across seasons.
- **League & team tracking** — monitor a favorite team's schedule, results and roster changes automatically.

### How to use

1. [Sign up for Apify](https://console.apify.com/sign-up) — the free plan is enough to try this actor.
2. Open the **ESPN Sports Scraper**, pick a **Mode** (Scoreboard by default) and the **leagues** you want (e.g. `nba`, `nfl`, `epl`).
3. Click **Start** and watch results stream into the dataset table.
4. **Export** as JSON, CSV, Excel, XML or RSS — or pull results programmatically via the [Apify API](https://docs.apify.com/api/v2).

### Input

```json
{
    "mode": "scoreboard",
    "leagues": ["nba", "nfl"],
    "dates": "today",
    "maxResults": 200
}
````

| Field | What it does |
|---|---|
| **mode** | `scoreboard` (games + scores + odds), `game` (deep box score), `odds` (lines per game), `standings`, `teams`, `roster`, `schedule`, `news`, `rankings`. |
| **leagues** | League keys for the league-level modes — `nfl`, `nba`, `mlb`, `nhl`, `college-football`, `ncaam`, `epl`, `la-liga`, `ucl`, `mls`, `f1`, `ufc`, `pga`… (full list below). |
| **dates** | Scoreboard/odds date selector: `YYYYMMDD`, `YYYY-MM-DD`, a range `YYYYMMDD-YYYYMMDD`, or `today` / `yesterday` / `tomorrow`. Blank = today. |
| **eventIds** | Game mode — `nba/401766123`, `nfl/401671800`. |
| **teamIds** | Teams / Roster / Schedule — `nba/LAL`, `nfl/KC`, `mlb/NYY` (abbreviations auto-resolve to IDs). |
| **startUrls** | Paste ESPN.com URLs (game / team / standings / scoreboard pages) and they're auto-routed. |
| **enrichGameDetails** | Attach each scoreboard game's deep summary (box score, odds, win probability). |
| **includeAllOddsProviders** | Odds mode: fetch every sportsbook line per game (default on). |
| **monitorMode / monitorKey** | Output only new/changed records vs previous runs (see below). |
| **season / seasonType / groups** | Optional fine-tuning for standings, schedules and college filters. |
| **maxResults / maxConcurrency / proxyConfiguration** | Run limits and proxy. |

#### Supported leagues (keys)

`nfl`, `college-football` (`ncaaf`), `ufl` · `nba`, `wnba`, `mens-college-basketball` (`ncaam`), `womens-college-basketball` (`ncaaw`) · `mlb`, `college-baseball` · `nhl` · Soccer: `epl`, `efl-championship`, `fa-cup`, `carabao-cup`, `la-liga`, `serie-a`, `bundesliga`, `ligue-1`, `eredivisie`, `primeira-liga`, `mls`, `liga-mx`, `saudi-pro-league`, `brasileirao`, `liga-argentina`, `ucl`, `uel`, `uecl`, `world-cup`, `womens-world-cup`, `euro`, `copa-america`, `nwsl` · `ufc` (`mma`), `pfl`, `boxing` · `f1`, `nascar`, `indycar` · `pga`, `lpga`.

### Output

By default you get **one clean table of games**. Switch the dataset **view** (Games / Betting odds / Standings / Teams / Players / Schedule / News / Rankings) to match your mode. Every record carries a `type`, the `league`, and a `scrapedAt` timestamp.

A **game** record (`type: "game"`):

```json
{
    "type": "game",
    "league": "nba",
    "leagueName": "NBA",
    "gameId": "401766123",
    "date": "2026-06-17T23:00Z",
    "name": "Boston Celtics at New York Knicks",
    "shortName": "BOS @ NY",
    "status": { "state": "in", "detail": "Q3 4:21", "completed": false, "period": 3, "clock": "4:21" },
    "homeTeam": "New York Knicks", "homeAbbr": "NY", "homeScore": 68, "homeRecord": "41-22",
    "awayTeam": "Boston Celtics", "awayAbbr": "BOS", "awayScore": 72, "awayRecord": "45-18",
    "odds": { "provider": "ESPN BET", "details": "BOS -3.5", "spread": -3.5, "overUnder": 224.5, "homeMoneyLine": 140, "awayMoneyLine": -165 },
    "venue": { "name": "Madison Square Garden", "city": "New York", "state": "NY", "indoor": true },
    "broadcasts": ["ESPN"],
    "leaders": [{ "team": "BOS", "category": "Points", "athlete": "Jayson Tatum", "value": "24 PTS" }],
    "url": "https://www.espn.com/nba/game/_/gameId/401766123"
}
```

An **oddsLine** record carries `homeTeam`/`awayTeam`, a flattened primary line (`provider`, `spread`, `overUnder`, `homeMoneyLine`, `awayMoneyLine`) **plus** a `providers` array with every sportsbook. A **gameSummary** adds `teamStats`, `leaders`, `odds[]`, `winProbability`, `scoringPlays`, `injuries` and `seasonSeries`. **standing**, **team**, **player**, **scheduleGame**, **article** and **ranking** records each ship the full set of fields shown in their dataset view.

#### What to expect (field coverage)

ESPN populates some fields only in context — odds appear for upcoming/live games, live `situation` only during play, salaries only for leagues that publish them.

| Mode | Always present | Present in context |
|---|---|---|
| **Scoreboard** | teams, score, status, venue, date | odds (pre-game/live), leaders, live situation, broadcasts |
| **Odds** | teams, date, ≥1 sportsbook line | multiple providers (with `includeAllOddsProviders`) |
| **Game** | box score, team stats, status | odds, win probability, injuries, play-by-play (opt-in) |
| **Standings** | team, W-L, win % | points, GB, streak, +/- (varies by sport) |
| **Roster** | name, position, jersey | age, height, weight, college, salary, injury status |

A blank field means ESPN didn't publish it for that record — nothing is dropped, so you always get the richest data available.

### Monitor mode — only new & changed data

Turn on **monitorMode** and the actor remembers what it saw in previous runs (in a named key-value store) and outputs **only what's new or changed**:

- **Scoreboard / Schedule** — new games and any **score/status change** (catch finals you haven't recorded, or live updates).
- **Odds** — re-emits a game when its **line moves** (line-movement tracking).
- **Standings** — re-emits a team when its **record changes**.
- **News** — only **new articles**.

Set a distinct **monitorKey** per saved task so separate watchlists don't collide. This works **alongside** Apify's built-in scheduler — a [Schedule](https://docs.apify.com/platform/schedules) starts each run, and monitor mode deduplicates against the run history, so you never double-process the same data.

### Automate & schedule

Run this actor on autopilot and pull results into your own stack:

- **[Apify API](https://docs.apify.com/api/v2)** — start runs, fetch datasets, manage schedules over REST.
- **[apify-client for JavaScript](https://docs.apify.com/api/client/js/)** and **[Python](https://docs.apify.com/api/client/python/)** — official SDKs.
- **[Schedules](https://docs.apify.com/platform/schedules)** — poll a league every few minutes on game day for live scores and odds, or daily for standings and news.
- **[Webhooks](https://docs.apify.com/platform/integrations/webhooks)** — trigger downstream actions (post a score, send an odds-movement alert) the moment a run finishes.

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

const client = new ApifyClient({ token: 'MY_APIFY_TOKEN' });

const run = await client.actor('scrapesage/espn-sports-scraper').call({
    mode: 'odds',
    leagues: ['nba', 'nfl'],
    dates: 'today',
});

const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(`Got odds for ${items.length} game(s)`);
```

### Integrate with any app

Connect the dataset to 5,000+ apps — no code required:

- **[Make](https://docs.apify.com/platform/integrations/make)** — multi-step automation scenarios.
- **[Zapier](https://docs.apify.com/platform/integrations/zapier)** — push scores or odds into Sheets, Slack or a database.
- **[Slack](https://docs.apify.com/platform/integrations/slack)** — get notified on final scores or line movements.
- **[Google Drive / Sheets](https://docs.apify.com/platform/integrations/drive)** — auto-export every run to a spreadsheet.
- **[Airbyte](https://docs.apify.com/platform/integrations/airbyte)** — pipe results into your data warehouse.
- **[GitHub](https://docs.apify.com/platform/integrations/github)** — trigger runs from commits or releases.

### Use with AI assistants (MCP)

The output is clean, LLM-ready JSON. Call this actor from Claude, ChatGPT or any agent framework through the **[Apify MCP server](https://docs.apify.com/platform/integrations/mcp)** — ask your assistant to "get tonight's NBA odds" or "pull the Premier League standings" and let it run the scraper for you.

### More scrapers from scrapesage

Build a complete **real-time data & market-intelligence stack**:

- **[CoinGecko Crypto Scraper](https://apify.com/scrapesage/coingecko-crypto-scraper)** — crypto prices, markets, NFTs and trending coins.
- **[Yahoo Finance Scraper](https://apify.com/scrapesage/yahoo-finance-scraper)** — live stock, ETF, FX and crypto quotes plus financials.
- **[Google Trends Scraper](https://apify.com/scrapesage/google-trends-scraper)** — search interest over time, by region and rising topics.
- **[Google News Scraper](https://apify.com/scrapesage/google-news-scraper)** — articles, publishers, full text and related coverage.
- **[YouTube Scraper](https://apify.com/scrapesage/youtube-scraper)** — channels, videos, stats and creator contacts.
- **[Steam Scraper](https://apify.com/scrapesage/steam-scraper)** — game prices, reviews and player data.
- **[Eventbrite Scraper](https://apify.com/scrapesage/eventbrite-scraper)** — events plus organizer leads.
- **[Reddit-free social stack →](https://apify.com/scrapesage)** — see all scrapesage actors.

### Tips

- **Pick one mode per task** for a clean, fully-populated table. Use the dataset views to match (Games / Odds / Standings / …).
- **Live game day**: schedule Scoreboard or Odds every few minutes with **monitorMode** on to capture score and line changes without re-processing finished games.
- **College sports**: defaults filter to the top division (FBS football, D-I basketball). Override with `groups` if you need more.
- **Individual sports** (golf, racing, MMA): the full field of competitors is in the `competitors` array of each event.
- **Off-season** leagues return no games for "today" — pass a `dates` value from when the league was in season.

### FAQ

**Does it need an ESPN API key?** No. This actor reads ESPN's public data endpoints — no key, login or browser required.

**Which leagues are supported?** 40+ across football, basketball, baseball, hockey, worldwide soccer, F1, NASCAR, IndyCar, UFC, boxing and golf. See the league-keys list above.

**Can I get historical scores and odds?** Yes — pass a past `dates` value (or range) in Scoreboard/Odds mode. ESPN keeps results; odds are present for games that had a published line.

**How do I track live scores or line movements?** Schedule the actor (e.g. every 2–5 minutes on game day) with **monitorMode** on — you'll only get new games and changes.

**Can I export to Google Sheets, CSV or Excel?** Yes — one click in the dataset view, or automatically on every run via the [Google Drive integration](https://docs.apify.com/platform/integrations/drive).

**A field is empty — why?** ESPN didn't publish it for that record (e.g. odds before a line is posted, or salary for a league that hides it). Fields are blank only when the source omits them — never because the scraper skipped them.

**Is scraping ESPN legal?** This actor collects publicly available data only. You're responsible for using the data in compliance with applicable laws and ESPN's terms — for example, attributing the source and not reselling raw feeds where prohibited.

### Need help?

Open an issue on the actor's **Issues** tab, or visit the [Apify help center](https://help.apify.com/). Feature requests (new leagues, fields or modes) are welcome — this actor is actively maintained.

# Actor input Schema

## `mode` (type: `string`):

What to scrape. `Scoreboard` = games for a date with live scores + odds (the default). `Game` = deep box score + odds + win probability for a specific game. `Odds` = betting lines per game across providers. `Standings`, `Teams`, `Roster` (players), `Schedule`, `News` and `Rankings` (polls) cover the rest.

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

League keys to scrape (for scoreboard, odds, standings, teams, news, rankings). Examples: nfl, nba, mlb, nhl, college-football, mens-college-basketball, epl, la-liga, serie-a, bundesliga, ligue-1, mls, ucl, europa-league, liga-mx, f1, ufc, pga. Full list in the README.

## `dates` (type: `string`):

For scoreboard & odds. A single day `YYYYMMDD` (or `YYYY-MM-DD`), a range `YYYYMMDD-YYYYMMDD`, or `today` / `yesterday` / `tomorrow`. Leave blank for today's games (current/upcoming for in-season leagues).

## `eventIds` (type: `array`):

For Game mode. ESPN game IDs, each prefixed with its league: `nba/401766123`, `nfl/401671800`. (A bare ID is paired with the first league above.)

## `teamIds` (type: `array`):

For Teams, Roster & Schedule modes. Use `league/abbreviation` or `league/id`: `nba/LAL`, `nfl/KC`, `mlb/NYY`, `epl/360`. Abbreviations are resolved to IDs automatically.

## `startUrls` (type: `array`):

Paste ESPN.com URLs and they're auto-routed: a game page → Game, a team page → Teams, a /standings or /scoreboard page → that mode. Mixes with the fields above.

## `enrichGameDetails` (type: `boolean`):

In Scoreboard mode, also attach each game's full summary (box score, odds, win probability, injuries). Adds one request per game.

## `includeAllOddsProviders` (type: `boolean`):

In Odds mode, fetch every sportsbook line for each game (DraftKings, ESPN BET, etc.) via the game summary. Adds one request per game. Turn off to use only the scoreboard's primary line (cheaper, faster).

## `includePlayByPlay` (type: `boolean`):

In Game/enriched modes, include the play-by-play feed (up to 500 plays). Off by default — it makes records much larger.

## `enrichTeamDetails` (type: `boolean`):

In Teams directory mode, open each team page for venue, record and standing summary. Adds one request per team.

## `season` (type: `string`):

Optional season year for Standings & Schedule, e.g. `2025`. Defaults to the current season.

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

Optional for Schedule: 1 = preseason, 2 = regular season, 3 = postseason.

## `groups` (type: `string`):

Optional ESPN scoreboard group filter for college sports, e.g. `80` (FBS football) or `50` (D-I basketball). Sensible defaults are applied for college leagues.

## `maxResults` (type: `integer`):

Maximum records to output across the whole run.

## `deduplicateResults` (type: `boolean`):

Skip duplicate records inside a single run.

## `monitorMode` (type: `boolean`):

Remember what was seen in previous runs and output ONLY new or changed records — new games, updated scores, line movements, standings changes, fresh articles. Pair with Apify Schedules for automatic score/odds tracking. (Uses a named key-value store; works alongside the built-in scheduler.)

## `monitorKey` (type: `string`):

Names the monitor's memory so separate watchlists don't collide. Use a distinct key per saved task.

## `maxConcurrency` (type: `integer`):

Maximum parallel requests to ESPN.

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

Proxy settings. ESPN's data API has no aggressive anti-bot, so Apify datacenter proxy (the default) is plenty.

## Actor input object example

```json
{
  "mode": "scoreboard",
  "leagues": [
    "nba"
  ],
  "dates": "20260617",
  "enrichGameDetails": false,
  "includeAllOddsProviders": true,
  "includePlayByPlay": false,
  "enrichTeamDetails": false,
  "maxResults": 200,
  "deduplicateResults": true,
  "monitorMode": false,
  "monitorKey": "default",
  "maxConcurrency": 5,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

# Actor output Schema

## `results` (type: `string`):

All scraped records in the default dataset. Each row is tagged with a `type` (game, oddsLine, gameSummary, standing, team, player, scheduleGame, article, ranking); use the views to filter the columns.

# 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 = {
    "leagues": [
        "nba"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("scrapesage/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 = { "leagues": ["nba"] }

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

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

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

```

## CLI example

```bash
echo '{
  "leagues": [
    "nba"
  ]
}' |
apify call scrapesage/espn-sports-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=scrapesage/espn-sports-scraper",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "ESPN Sports Scraper - Scores, Odds, Stats & Standings",
        "description": "Scrape live scores, betting odds, schedules, standings, box scores, rosters and news for 40+ leagues — NFL, NBA, MLB, NHL, NCAA, soccer (EPL, La Liga, UCL…), F1, UFC, golf & more. Keyless, fast, no browser. Monitor mode for score & odds updates. Export to JSON, CSV or Excel.",
        "version": "0.1",
        "x-build-id": "nmSyR00OfdkMfEeIN"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/scrapesage~espn-sports-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-scrapesage-espn-sports-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/acts/scrapesage~espn-sports-scraper/runs": {
            "post": {
                "operationId": "runs-sync-scrapesage-espn-sports-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor and returns information about the initiated run in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/runsResponseSchema"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/acts/scrapesage~espn-sports-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-scrapesage-espn-sports-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "required": [
                    "mode"
                ],
                "properties": {
                    "mode": {
                        "title": "Mode",
                        "enum": [
                            "scoreboard",
                            "game",
                            "odds",
                            "standings",
                            "teams",
                            "roster",
                            "schedule",
                            "news",
                            "rankings"
                        ],
                        "type": "string",
                        "description": "What to scrape. `Scoreboard` = games for a date with live scores + odds (the default). `Game` = deep box score + odds + win probability for a specific game. `Odds` = betting lines per game across providers. `Standings`, `Teams`, `Roster` (players), `Schedule`, `News` and `Rankings` (polls) cover the rest.",
                        "default": "scoreboard"
                    },
                    "leagues": {
                        "title": "Leagues",
                        "type": "array",
                        "description": "League keys to scrape (for scoreboard, odds, standings, teams, news, rankings). Examples: nfl, nba, mlb, nhl, college-football, mens-college-basketball, epl, la-liga, serie-a, bundesliga, ligue-1, mls, ucl, europa-league, liga-mx, f1, ufc, pga. Full list in the README.",
                        "items": {
                            "type": "string"
                        }
                    },
                    "dates": {
                        "title": "Date / date range",
                        "type": "string",
                        "description": "For scoreboard & odds. A single day `YYYYMMDD` (or `YYYY-MM-DD`), a range `YYYYMMDD-YYYYMMDD`, or `today` / `yesterday` / `tomorrow`. Leave blank for today's games (current/upcoming for in-season leagues)."
                    },
                    "eventIds": {
                        "title": "Game / event IDs",
                        "type": "array",
                        "description": "For Game mode. ESPN game IDs, each prefixed with its league: `nba/401766123`, `nfl/401671800`. (A bare ID is paired with the first league above.)",
                        "items": {
                            "type": "string"
                        }
                    },
                    "teamIds": {
                        "title": "Team IDs / abbreviations",
                        "type": "array",
                        "description": "For Teams, Roster & Schedule modes. Use `league/abbreviation` or `league/id`: `nba/LAL`, `nfl/KC`, `mlb/NYY`, `epl/360`. Abbreviations are resolved to IDs automatically.",
                        "items": {
                            "type": "string"
                        }
                    },
                    "startUrls": {
                        "title": "ESPN URLs (optional)",
                        "type": "array",
                        "description": "Paste ESPN.com URLs and they're auto-routed: a game page → Game, a team page → Teams, a /standings or /scoreboard page → that mode. Mixes with the fields above.",
                        "items": {
                            "type": "string"
                        }
                    },
                    "enrichGameDetails": {
                        "title": "Enrich scoreboard with deep game detail",
                        "type": "boolean",
                        "description": "In Scoreboard mode, also attach each game's full summary (box score, odds, win probability, injuries). Adds one request per game.",
                        "default": false
                    },
                    "includeAllOddsProviders": {
                        "title": "All odds providers (Odds mode)",
                        "type": "boolean",
                        "description": "In Odds mode, fetch every sportsbook line for each game (DraftKings, ESPN BET, etc.) via the game summary. Adds one request per game. Turn off to use only the scoreboard's primary line (cheaper, faster).",
                        "default": true
                    },
                    "includePlayByPlay": {
                        "title": "Include play-by-play (Game mode)",
                        "type": "boolean",
                        "description": "In Game/enriched modes, include the play-by-play feed (up to 500 plays). Off by default — it makes records much larger.",
                        "default": false
                    },
                    "enrichTeamDetails": {
                        "title": "Enrich team profiles (Teams mode)",
                        "type": "boolean",
                        "description": "In Teams directory mode, open each team page for venue, record and standing summary. Adds one request per team.",
                        "default": false
                    },
                    "season": {
                        "title": "Season (year)",
                        "type": "string",
                        "description": "Optional season year for Standings & Schedule, e.g. `2025`. Defaults to the current season."
                    },
                    "seasonType": {
                        "title": "Season type (Schedule)",
                        "type": "string",
                        "description": "Optional for Schedule: 1 = preseason, 2 = regular season, 3 = postseason."
                    },
                    "groups": {
                        "title": "Conference / group filter",
                        "type": "string",
                        "description": "Optional ESPN scoreboard group filter for college sports, e.g. `80` (FBS football) or `50` (D-I basketball). Sensible defaults are applied for college leagues."
                    },
                    "maxResults": {
                        "title": "Max results",
                        "minimum": 1,
                        "type": "integer",
                        "description": "Maximum records to output across the whole run.",
                        "default": 200
                    },
                    "deduplicateResults": {
                        "title": "Deduplicate within a run",
                        "type": "boolean",
                        "description": "Skip duplicate records inside a single run.",
                        "default": true
                    },
                    "monitorMode": {
                        "title": "Monitor mode (only new/changed data)",
                        "type": "boolean",
                        "description": "Remember what was seen in previous runs and output ONLY new or changed records — new games, updated scores, line movements, standings changes, fresh articles. Pair with Apify Schedules for automatic score/odds tracking. (Uses a named key-value store; works alongside the built-in scheduler.)",
                        "default": false
                    },
                    "monitorKey": {
                        "title": "Monitor key",
                        "type": "string",
                        "description": "Names the monitor's memory so separate watchlists don't collide. Use a distinct key per saved task.",
                        "default": "default"
                    },
                    "maxConcurrency": {
                        "title": "Max concurrency",
                        "minimum": 1,
                        "maximum": 15,
                        "type": "integer",
                        "description": "Maximum parallel requests to ESPN.",
                        "default": 5
                    },
                    "proxyConfiguration": {
                        "title": "Proxy configuration",
                        "type": "object",
                        "description": "Proxy settings. ESPN's data API has no aggressive anti-bot, so Apify datacenter proxy (the default) is plenty.",
                        "default": {
                            "useApifyProxy": true
                        }
                    }
                }
            },
            "runsResponseSchema": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "actId": {
                                "type": "string"
                            },
                            "userId": {
                                "type": "string"
                            },
                            "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "finishedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "status": {
                                "type": "string",
                                "example": "READY"
                            },
                            "meta": {
                                "type": "object",
                                "properties": {
                                    "origin": {
                                        "type": "string",
                                        "example": "API"
                                    },
                                    "userAgent": {
                                        "type": "string"
                                    }
                                }
                            },
                            "stats": {
                                "type": "object",
                                "properties": {
                                    "inputBodyLen": {
                                        "type": "integer",
                                        "example": 2000
                                    },
                                    "rebootCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "restartCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "resurrectCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "computeUnits": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "options": {
                                "type": "object",
                                "properties": {
                                    "build": {
                                        "type": "string",
                                        "example": "latest"
                                    },
                                    "timeoutSecs": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "memoryMbytes": {
                                        "type": "integer",
                                        "example": 1024
                                    },
                                    "diskMbytes": {
                                        "type": "integer",
                                        "example": 2048
                                    }
                                }
                            },
                            "buildId": {
                                "type": "string"
                            },
                            "defaultKeyValueStoreId": {
                                "type": "string"
                            },
                            "defaultDatasetId": {
                                "type": "string"
                            },
                            "defaultRequestQueueId": {
                                "type": "string"
                            },
                            "buildNumber": {
                                "type": "string",
                                "example": "1.0.0"
                            },
                            "containerUrl": {
                                "type": "string"
                            },
                            "usage": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "usageTotalUsd": {
                                "type": "number",
                                "example": 0.00005
                            },
                            "usageUsd": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "number",
                                        "example": 0.00005
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
