# ESPN Scores Scraper (`scrapewise/espn-scraper`) Actor

Scrape ESPN scores and schedules by league and date: NBA, WNBA, NFL, MLB, NHL, college, and soccer leagues. Teams, scores, status, venue, broadcasts and game links. Optional league standings. No odds. Error rows are free.

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

## Pricing

from $0.76 / 1,000 row delivereds

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 Scores Scraper: game scores, schedules, teams, venues, broadcasts and standings by league and date

ESPN Scores Scraper collects **scores and schedules from ESPN's sports coverage** for the main North American leagues
(NBA, WNBA, NFL, MLB, NHL and the college versions) and for the soccer leagues ESPN covers (Premier League, LaLiga,
Bundesliga, Serie A, MLS, Champions League and more). Pick a league and a date, and each game comes back as one clean
row: status (scheduled, live or final), the clock and period, both teams with their scores and records, the venue,
the broadcasters, and the link to the game page. Optionally it also returns each league's standings, one row per team.

No account, no cookies and no browser are needed. The Actor reads only public sports data, and it does not deliver
gambling data of any kind: no betting lines, no prices from bookmakers and no win probabilities. Those fields are
never read, so they never reach your dataset.

It is used for sports dashboards and widgets, daily score digests, fantasy and league tools, schedule calendars,
media and content research, and sports datasets for analytics and AI agents.

### At a glance

| What | Price |
|---|---|
| Row delivered (one game or one standings row) | **US$ 1.00 per 1,000 rows** (US$ 0.001 each) |
| Run start | US$ 0.005 per run |

- One NBA night (about 12 games) = **US$ 0.017** with the run start.
- A full week of Premier League fixtures (about 10 games) = **US$ 0.015**.
- A standings table of 30 teams = **US$ 0.035**, and the 12 games of the same night add **US$ 0.012**.
- Error rows and duplicates are never charged. `maxItems` is a hard cap, and a spending limit set on the run stops it
  cleanly with everything delivered so far.

### Quick start

Scores for one NBA day:

```json
{
  "leagues": ["nba"],
  "dates": "20261028",
  "maxItems": 50
}
```

Leave `dates` empty to get the day ESPN shows by default. Add `includeStandings` to also get each league's table:

```json
{
  "leagues": ["eng.1", "esp.1"],
  "dates": "20261025-20261027",
  "includeStandings": true,
  "maxItems": 200
}
```

### Input

| Field | Type | Default | What it does |
|---|---|---|---|
| `leagues` | list of text | `["nba"]` | Leagues to read. Short codes: `nba`, `wnba`, `ncaam`, `nfl`, `ncaaf`, `mlb`, `nhl`. Soccer uses the ESPN league code: `eng.1`, `esp.1`, `ger.1`, `ita.1`, `fra.1`, `usa.1`, `uefa.champions` and others. |
| `dates` | text | empty | Empty = the day ESPN shows by default. One day as `20261028` (`2026-10-28` also works), or a range such as `20261025-20261028` (up to 31 days, one read per day). |
| `includeStandings` | boolean | `false` | On: also delivers each league's standings table, one row per team. Off: only games. |
| `maxItems` | integer | `50` | Hard cap for the whole run, games and standings rows together. `0` = no cap. |
| `proxyConfiguration` | object | default | Connection used for every read. Keep the default unless a run returns `BLOCKED`. |

### Output fields

**Game rows** (`type: "game"`)

| Field | Meaning |
|---|---|
| `league`, `leagueName`, `sport` | League code you asked for, its name and the sport |
| `eventId`, `name` | ESPN game id and the short matchup, for example `WSH @ CLE` |
| `startTime` | Scheduled start in UTC |
| `status` | `scheduled`, `live`, `final`, `postponed`, `canceled`, `suspended` or `delayed` |
| `statusDetail`, `period`, `clock` | Text status such as `Final`, the period and the clock |
| `homeTeamId`, `homeTeam`, `homeAbbr`, `homeScore`, `homeRecord`, `homeWinner` | Home team (same pattern for `away*`) |
| `venue`, `venueCity`, `neutralSite`, `attendance` | Stadium or arena, city, neutral-site flag and crowd |
| `broadcasts` | Names of the broadcasters listed for the game |
| `gameUrl` | Link to the game summary page |

**Standings rows** (`type: "standing"`, only with `includeStandings`)

| Field | Meaning |
|---|---|
| `group` | Conference, division or the table name |
| `season` | Season label, for example `2026-27` |
| `rank`, `teamId`, `team`, `teamAbbr` | Position and team |
| `gamesPlayed`, `wins`, `losses`, `draws`, `winPercent`, `gamesBehind`, `streak`, `playoffSeed` | Record, when the league publishes it |
| `pointDifferential`, `points` | Point differential; `points` only for soccer and hockey, where it is the table points |

Every row also has `scrapedAt`, `errorCode` and `error`, which are empty on a good row.

### Example output

A final NBA game from a real run (abridged):

```json
{
  "type": "game",
  "league": "nba",
  "leagueName": "National Basketball Association",
  "sport": "basketball",
  "eventId": "401909882",
  "name": "WSH @ CLE",
  "startTime": "2026-10-28T23:00Z",
  "status": "final",
  "statusDetail": "Final",
  "period": 4,
  "clock": "12:00",
  "homeTeam": "Cleveland Cavaliers",
  "homeAbbr": "CLE",
  "homeScore": 121,
  "homeRecord": "3-1",
  "homeWinner": true,
  "awayTeam": "Washington Wizards",
  "awayAbbr": "WSH",
  "awayScore": 111,
  "awayRecord": "2-3",
  "awayWinner": false,
  "venue": "Rocket Arena",
  "venueCity": "Cleveland",
  "neutralSite": false,
  "attendance": 19432,
  "broadcasts": ["MNMT", "NBA League Pass", "DAZN CLE"],
  "gameUrl": "https://www.espn.com/nba/game/_/gameId/401909882/wizards-cavaliers",
  "errorCode": null,
  "error": null
}
```

### Errors

Error rows are free and never stop the rest of the run. They have `type: "error"`, an `errorCode` and a message:

| Code | Meaning |
|---|---|
| `INVALID_INPUT` | `dates` is not a day or a range in `AAAAMMDD` form, or a range is longer than 31 days |
| `UNKNOWN_LEAGUE` | The league code is not one of the short codes or a soccer code the source knows |
| `BLOCKED` | The source did not return data after several tries. Run again in a few minutes |
| `UNEXPECTED` | An unexpected problem. The run ends with what was already delivered, and nothing more is charged |

A run where nothing could be read ends with a status message saying so, and nothing is charged.

### Integrations, scheduling and AI agents

- **Schedules:** run it every morning with yesterday's date to keep a daily score log, or every hour during a live
  window to track a league's games.
- **Export:** download as JSON, CSV, Excel or HTML from the dataset tab, or pull it through the Apify API.
- **Automation tools:** Make, n8n and Zapier can start the Actor and read the rows.
- **AI agents:** the Apify MCP server exposes the Actor as a tool, so an agent can answer "what were last night's
  scores in the Premier League?" with fresh rows.

### FAQ

**Which leagues can I read?** The short codes listed above, plus any soccer league code ESPN publishes in the same
format, such as `eng.1` or `ger.1`. An unknown code returns an `UNKNOWN_LEAGUE` row and costs nothing.

**What does an empty `dates` return?** The day ESPN itself shows as current, which can differ from your local day
around midnight. Set a date to be exact.

**Does it include player stats, lineups or play-by-play?** No. Version 0.1 keeps to games, teams, status, venues,
broadcasts and standings. Player-level data is not in this version.

**Are the times in my time zone?** No. `startTime` is UTC. Convert it in your tool.

**Is a game counted twice in a date range?** No. Each game is delivered once per run, even if it shows on two days.

**What if I hit `maxItems` in the middle of a league?** The run stops there, with the rows already delivered. Raise
`maxItems` or narrow the dates and run again.

### Limitations

- Scores and schedules are as ESPN publishes them. A game that is postponed or changed shows the status ESPN gives.
- Standings depend on what ESPN publishes for the league. Some leagues have no table, and then no standings rows come
  back for them.
- Ranges are read one day at a time, so a 31-day range over several leagues costs more time, not more rows.
- Live games show the score at the moment of the read. Run again to refresh it.

### Changelog

- **0.1 (29 Oct 2026):** first version. Games by league and date, optional standings, output rows for teams, status,
  venues and broadcasts.

# Actor input Schema

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

Leagues to read, one per line. Short codes: nba, wnba, ncaam, nfl, ncaaf, mlb, nhl. Soccer uses the ESPN league code, for example eng.1 (Premier League), esp.1 (LaLiga), ger.1, ita.1, usa.1 (MLS), uefa.champions.

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

Leave empty for the day ESPN shows by default. Or one day as 20261028 (YYYY-MM-DD also works), or a range such as 20261025-20261028 (up to 31 days, one read per day).

## `includeStandings` (type: `boolean`):

On: also delivers the standings table of each league (one row per team, with wins, losses, points, win percent and games behind when the league has them). Off: only games.

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

Hard cap for the whole run, games and standings rows together. 0 = no cap. Error rows are not counted.

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

Connection used for every read. Keep the default unless a run returns BLOCKED.

## Actor input object example

```json
{
  "leagues": [
    "nba"
  ],
  "dates": "20261028",
  "includeStandings": false,
  "maxItems": 50,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

# Actor output Schema

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

No description

## `resultsCsv` (type: `string`):

No description

# 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"
    ],
    "dates": "20261028",
    "maxItems": 50,
    "proxyConfiguration": {
        "useApifyProxy": true
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("scrapewise/espn-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"],
    "dates": "20261028",
    "maxItems": 50,
    "proxyConfiguration": { "useApifyProxy": True },
}

# Run the Actor and wait for it to finish
run = client.actor("scrapewise/espn-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": [
    "nba"
  ],
  "dates": "20261028",
  "maxItems": 50,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}' |
apify call scrapewise/espn-scraper --silent --output-dataset

```

## MCP server setup

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