# ESPN Scores & Schedules Scraper (`w3crawler/espn-scores-schedules-scraper`) Actor

Collect public live scores, final results, and upcoming schedules from ESPN across 16 leagues and five sports, with explicit fail-closed diagnostics when data is unavailable.

- **URL**: https://apify.com/w3crawler/espn-scores-schedules-scraper.md
- **Developed by:** [w3crawler](https://apify.com/w3crawler) (community)
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.99 / 1,000 scores & schedules

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.

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 Scores & Schedules Scraper

Collect public ESPN live scores, final results, and upcoming schedules as normalized event records. The Actor reads ESPN's public scoreboard API directly, supports 16 league slugs and optional date ranges, and records exact source and status provenance for each game. No account, proxy, or user-supplied API key is required.

### Get started

1. Open the [Actor Store page](https://apify.com/w3crawler/espn-scores-schedules-scraper) and select **Try for free** or open the **Input** tab.
2. Add one or more supported league slugs to `leagues`. Optionally set `dateFrom` and `dateTo` (inclusive, at most 31 days apart) and choose a `status` filter.
3. Set `maxItems` to the number of unique games you need. Keep it small for the first run.
4. Start the Actor, open the dataset, and export the events as JSON, CSV, or Excel. Open **Run summary** (`OUTPUT`) to check saved, duplicate, and invalid-event counts.

### Input

`leagues` is required. Other fields are optional; unsupported field names and out-of-range values are rejected before requests start.

| Field | Type | Required? | Default | Meaning |
| --- | --- | --- | --- | --- |
| `leagues` | string array | Required | `["mlb","wnba"]` | Supported ESPN league slugs: `nfl`, `college-football`, `nba`, `wnba`, `mens-college-basketball`, `womens-college-basketball`, `mlb`, `college-baseball`, `nhl`, `eng.1`, `esp.1`, `ger.1`, `ita.1`, `fra.1`, `usa.1`, `uefa.champions`. |
| `dateFrom` | string | Optional | Not supplied | Inclusive start date in `YYYY-MM-DD` format. |
| `dateTo` | string | Optional | Not supplied | Inclusive end date, at most 31 days after `dateFrom`. |
| `status` | string enum | Optional | `all` | Event filter: `all`, `live`, `upcoming`, or `final`. |
| `maxItems` | integer | Optional | `50` | Maximum unique games saved, 1–1,000. |
| `requestDelayMs` | integer | Optional | `250` | Pause between league API calls, 0–10,000 ms. |

Full default input:

```json
{
  "leagues": ["mlb", "wnba"],
  "status": "all",
  "maxItems": 50,
  "requestDelayMs": 250
}
```

The Actor reads public ESPN scoreboard data only. It does not accept credentials, proxy settings, or arbitrary source URLs.

### Output

The dataset contains one row per unique event. Optional fields and nested details are omitted when ESPN does not publish them; values are not inferred, and diagnostic issues never become dataset rows.

| Field | Type | Availability | Meaning |
| --- | --- | --- | --- |
| `recordType` | string | Always | Record discriminator; `espn-event`. |
| `sourceName` | string | Always | Human-readable source name. |
| `sourceKind` | string | Always | Provenance: `public-espn-scoreboard` or `fixture-public-scoreboard`. |
| `sourceUrl` | string | Always | Exact public scoreboard URL used for the row. |
| `eventId` | string | Always | Public ESPN event identifier. |
| `sport` | string | Always | Sport path associated with the league. |
| `league` | string | Always | Requested league slug. |
| `leagueName` | string | Always | League display name reported by ESPN. |
| `name` | string | Always | Full event name, such as `Philadelphia Phillies at Atlanta Braves`. |
| `shortName` | string | Always | Short event name, such as `PHI @ ATL`. |
| `startTime` | string | Always | Scheduled start time in ISO UTC. |
| `statusName` | string | Always | ESPN status name, such as `STATUS_FINAL`. |
| `statusDescription` | string | Always | Short status description, such as `Final`. |
| `statusDetail` | string | Always | Detailed status text. |
| `statusState` | string enum | Always | ESPN state: `pre`, `in`, or `post`. |
| `completed` | boolean | Always | Whether ESPN marks the event complete. |
| `period` | integer | Always | Current or final period. |
| `clock` | number | Always | Clock value reported by ESPN. |
| `displayClock` | string | Always | Display clock, such as `0:00`. |
| `season` | object | Always | Season with `year` (integer), `type` (integer), and `slug` (string). |
| `competitors` | object array | Always | Participating teams, scores, records, colors, logos, and leaders. |
| `venue` | object | Always | Venue with `id`, `name`, `city`, `state`, `country`, and `indoor`. |
| `attendance` | integer | Always | Published attendance. |
| `broadcasts` | string array | Always | Published broadcast names. |
| `odds` | object | When ESPN publishes odds | Odds with `details`, `overUnder`, `spread`, and `provider`. |
| `weather` | object | When ESPN publishes weather | Weather with `displayValue`, `temperature`, and `conditionId`. |
| `notes` | string array | Always | Published event notes, such as playoff round or game number. |
| `eventUrl` | string | Always | Official ESPN event page. |
| `scrapedAt` | string | Always | Time the row was saved, in ISO UTC. |

Each `competitors` entry can contain `teamId`, `name`, `shortName`, `abbreviation`, `homeAway`, `score`, `winner`, `records` (`type`, `summary`), `logoUrl`, `color`, `alternateColor`, and `leaders` (`category`, `abbreviation`, `value`, `athleteId`, `athleteName`, `athleteUrl`).

The example below is a real saved row from the 2026-10-25 run. The competitors array is shortened and leader entries are omitted for readability; the saved row contained the full lineup.

```json
{
  "recordType": "espn-event",
  "sourceName": "ESPN public scoreboard API",
  "sourceKind": "public-espn-scoreboard",
  "sourceUrl": "https://site.api.espn.com/apis/site/v2/sports/baseball/mlb/scoreboard?limit=50&dates=202610",
  "eventId": "401907973",
  "sport": "baseball",
  "league": "mlb",
  "leagueName": "MLB",
  "name": "Philadelphia Phillies at Atlanta Braves",
  "shortName": "PHI @ ATL",
  "startTime": "2026-10-02T00:00:00.000Z",
  "statusName": "STATUS_FINAL",
  "statusDescription": "Final",
  "statusDetail": "Final",
  "statusState": "post",
  "completed": true,
  "period": 9,
  "clock": 0,
  "displayClock": "0:00",
  "season": {
    "year": 2026,
    "type": 3,
    "slug": "post-season"
  },
  "competitors": [
    {
      "teamId": "15",
      "name": "Atlanta Braves",
      "shortName": "Braves",
      "abbreviation": "ATL",
      "homeAway": "home",
      "score": "6",
      "winner": true,
      "records": [
        { "type": "total", "summary": "94-68" },
        { "type": "home", "summary": "52-29" }
      ],
      "logoUrl": "https://a.espncdn.com/i/teamlogos/mlb/500/scoreboard/atl.png",
      "color": "0c2340",
      "alternateColor": "ba0c2f"
    },
    {
      "teamId": "22",
      "name": "Philadelphia Phillies",
      "shortName": "Phillies",
      "abbreviation": "PHI",
      "homeAway": "away",
      "score": "2",
      "winner": false,
      "records": [
        { "type": "total", "summary": "88-74" },
        { "type": "away", "summary": "45-36" }
      ],
      "logoUrl": "https://a.espncdn.com/i/teamlogos/mlb/500/scoreboard/phi.png",
      "color": "e81828",
      "alternateColor": "003278"
    }
  ],
  "venue": {
    "id": "218",
    "name": "Truist Park",
    "city": "Atlanta",
    "state": "Georgia",
    "indoor": false
  },
  "attendance": 41731,
  "broadcasts": ["NBC", "Peacock"],
  "notes": ["NLWC - Game 3"],
  "eventUrl": "https://www.espn.com/mlb/game/_/gameId/401907973/phillies-braves",
  "scrapedAt": "2026-10-25T20:50:45.153Z"
}
```

### Run summary

**Run summary** is stored separately from the dataset in the run's key-value store under `OUTPUT`. The same JSON is mirrored at `OUTPUT_SUMMARY`.

| Field | Meaning |
| --- | --- |
| `source` | Public source label recorded for the run. |
| `status` | Actor outcome: `SUCCEEDED` or `FAILED`. |
| `runStatus` | Canonical run status; matches `status`. |
| `dataStatus` | Completeness of saved events: `COMPLETE`, `PARTIAL`, `NO_RESULTS`, or `FAILED`. |
| `requestedItemCount` | Item limit requested for the run. |
| `itemCount` | Unique events saved. |
| `datasetItems` | Dataset rows written. |
| `diagnosticItems` | Diagnostic dataset rows; always 0. |
| `uniqueEventIds` | Distinct event IDs saved. |
| `diagnosticCount` | Operational issues recorded without dataset rows. |
| `duplicateCount` | Duplicate events removed. |
| `attemptedFeeds` | League scoreboard requests attempted. |
| `invalidEventCount` | Events omitted because required fields were missing. |
| `leagues` | League slugs used for the run. |
| `dateFrom` | Start date used, when supplied. |
| `dateTo` | End date used, when supplied. |
| `statusFilter` | Status filter used for the run. |
| `fixtureMode` | Whether the run used an offline QA fixture instead of live ESPN responses. |
| `finishedAt` | Time the summary was written, in ISO UTC. |

| Status | Data status | Meaning |
| --- | --- | --- |
| `SUCCEEDED` | `COMPLETE` | Every requested league was read and all eligible events were saved. |
| `SUCCEEDED` | `PARTIAL` | Events were saved, but one or more league requests or events failed validation. |
| `SUCCEEDED` | `NO_RESULTS` | The scoreboard completed cleanly with no matching events. |
| `FAILED` | `FAILED` | A fatal error occurred before any usable event was saved. |

Example `OUTPUT` from the saved run:

```json
{
  "source": "ESPN public scoreboard API",
  "status": "SUCCEEDED",
  "runStatus": "SUCCEEDED",
  "dataStatus": "COMPLETE",
  "requestedItemCount": 5,
  "itemCount": 5,
  "datasetItems": 5,
  "diagnosticItems": 0,
  "uniqueEventIds": 5,
  "diagnosticCount": 0,
  "duplicateCount": 0,
  "attemptedFeeds": 1,
  "invalidEventCount": 0,
  "leagues": ["mlb"],
  "statusFilter": "all",
  "fixtureMode": false,
  "finishedAt": "2026-10-25T20:50:45.161Z"
}
```

### Coverage and limitations

The Actor reads public ESPN scoreboard responses for the 16 supported league slugs. It does not log in, use credentials or a proxy, request arbitrary URLs, or bypass access controls. When `dateFrom` and `dateTo` are supplied, the range is inclusive and cannot exceed 31 days. With no date range, the saved run requested the `202610` scoreboard window and returned completed MLB postseason games.

Scores, clocks, statuses, odds, weather, attendance, and broadcasts are point-in-time values and change during live events. Odds and weather are often absent, especially after a game or for leagues that do not publish them. Postponed or canceled games may omit scores or clocks. `statusState` is ESPN's `pre`, `in`, or `post` state and should be used with `completed` rather than inferred from the clock. Events missing required identity fields are counted in `invalidEventCount` and are never written as placeholder rows. `fixtureMode: true` summaries come from offline QA fixtures and are not live ESPN results.

### Usage and support

Cost depends on Apify compute, the number of leagues, the date range, and scoreboard response size. Start with one league, no date range, and `maxItems` around 10 to validate the event shape; then add leagues or a narrow date range. `requestDelayMs` spaces league calls, and `maxItems` caps saved games. See the Actor's Pricing tab for current account rates.

Use the [Actor Issues page](https://apify.com/w3crawler/espn-scores-schedules-scraper/issues) to report a problem. Include the run ID, the input used, and the run summary; do not include tokens, cookies, or private data. This Actor is not affiliated with, endorsed by, or sponsored by ESPN. Use it only for public data and in accordance with ESPN's terms, robots guidance, and applicable law. Public event data can include athlete and venue information; use the output only for lawful purposes.

# Actor input Schema

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

One or more supported ESPN league slugs.

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

Optional inclusive start date in YYYY-MM-DD.

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

Optional inclusive end date, at most 31 days after start.

## `status` (type: `string`):

Return all, live, upcoming, or final events.

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

Maximum unique games saved.

## `requestDelayMs` (type: `integer`):

Pause between league API calls.

## Actor input object example

```json
{
  "leagues": [
    "mlb",
    "wnba"
  ],
  "status": "all",
  "maxItems": 50,
  "requestDelayMs": 250
}
```

# Actor output Schema

## `dataset` (type: `string`):

Dataset containing source-backed public ESPN event rows only.

## `output` (type: `string`):

JSON summary for the run, including data availability and diagnostics.

## `runSummary` (type: `string`):

Run status and counters stored by the Actor.

# 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": [
        "mlb",
        "wnba"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("w3crawler/espn-scores-schedules-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": [
        "mlb",
        "wnba",
    ] }

# Run the Actor and wait for it to finish
run = client.actor("w3crawler/espn-scores-schedules-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 '{
  "leagues": [
    "mlb",
    "wnba"
  ]
}' |
apify call w3crawler/espn-scores-schedules-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,w3crawler/espn-scores-schedules-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/YglQBMfCYp8qq2oun/builds/I3jfjaRq7HDs7yvcr/openapi.json
