# ESPN Scores Scraper: NBA, NFL, Soccer, Tennis ($2/1K) (`tamnt67/espn-scores-scraper`) Actor

ESPN scores scraper for live scores, results and schedules: teams, scores, period scores, status, venue, broadcasts and betting lines. Takes leagues (NBA, NFL, MLB, NHL, Premier League, Champions League, ATP, WTA and more) and dates. Use it to feed sports scores into apps or models.

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

## Pricing

from $1.40 / 1,000 games

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: NBA, NFL, Soccer, Tennis

Export live scores, final results, schedules and betting lines from ESPN for any league ESPN covers, with no login and no API key, for $2 per 1,000 games on the Free plan, down to $1.40 on higher plans.

The Actor reads the public JSON scoreboard that powers espn.com. It works for NBA, WNBA, NFL, MLB, NHL, college basketball and football, Premier League, LaLiga, Bundesliga, Serie A, Ligue 1, Champions League, MLS, ATP and WTA tennis, UFC and any other league that has an ESPN scoreboard. Each game or match is one record with teams or players, scores, period or set scores, status, venue, broadcasts and, when ESPN shows them, betting lines.

### What you can do with it

- **Power a sports dashboard.** Schedule the Actor every few minutes during game days and show live scores, periods and clocks.
- **Build a results archive.** Export final scores for a date range and keep them in a database or spreadsheet.
- **Feed betting and prediction models.** Combine final scores, period scores and team records with ESPN's spread, over/under and moneyline.
- **Run fantasy and pick'em tools.** Pull schedules for tomorrow or next week and settle picks with `winnerName` after the games.
- **Send match alerts.** Push games that turn `live` or `final` to Slack, Discord or a webhook.
- **Track tennis draws.** Get every match of an ATP or WTA tournament with round, players, countries and set scores.

### Output fields

Each game or match is one record in the dataset. Example values below come from a real NBA run.

| Field | Example |
|-------|---------|
| `sport` / `league` / `leagueName` | basketball / nba / National Basketball Association |
| `tournament` / `round` | null / null (filled for tennis: tournament and draw name, and round) |
| `eventId` | 401909966 |
| `name` / `shortName` | Washington Wizards at Indiana Pacers / WSH @ IND |
| `date` | 2026-11-12T00:00:00.000Z |
| `status` / `statusDetail` | final / Final (status is scheduled, live, final, or ESPN's own status name) |
| `period` / `clock` | 4 / 12:00 |
| `homeName` / `homeScore` | Indiana Pacers / 114 |
| `awayName` / `awayScore` | Washington Wizards / 101 |
| `winnerName` | Indiana Pacers |
| `competitors` | each team or player with abbreviation, id, home or away, score, winner, record, country and period or set scores |
| `venue` / `city` | Gainbridge Fieldhouse / Indianapolis, IN |
| `broadcasts` | \["MNMT", "DAZN IND"] |
| `oddsProvider` / `oddsDetails` / `overUnder` / `spread` / `homeMoneyline` / `awayMoneyline` | null in this example; filled when ESPN shows a betting line, mostly for upcoming games. `spread` is the home team's point spread (for example -1.5) |
| `url` | https://www.espn.com/nba/game/\_/gameId/401909966/wizards-pacers |
| `scrapedAt` | 2026-11-12T05:17:44.151Z |

The odds fields are left out when **Include betting lines** is off. For tennis, `competitors` lists the players, with partners and countries joined by " / " for doubles, and tie-break points shown in brackets in the set scores.

Download results as JSON, CSV, Excel or XML, or read them through the Apify API.

### Example output

One real record from an NBA run:

```json
{
  "sport": "basketball",
  "league": "nba",
  "leagueName": "National Basketball Association",
  "tournament": null,
  "round": null,
  "eventId": "401909967",
  "name": "Cleveland Cavaliers at New York Knicks",
  "shortName": "CLE @ NY",
  "date": "2026-11-12T00:00:00.000Z",
  "status": "final",
  "statusDetail": "Final",
  "period": 4,
  "clock": "12:00",
  "homeName": "New York Knicks",
  "homeScore": 107,
  "awayName": "Cleveland Cavaliers",
  "awayScore": 115,
  "winnerName": "Cleveland Cavaliers",
  "competitors": [
    {
      "name": "New York Knicks",
      "abbreviation": "NY",
      "id": "18",
      "homeAway": "home",
      "score": 107,
      "winner": false,
      "record": "6-5",
      "country": null,
      "linescores": [23, 30, 23, 31]
    },
    {
      "name": "Cleveland Cavaliers",
      "abbreviation": "CLE",
      "id": "5",
      "homeAway": "away",
      "score": 115,
      "winner": true,
      "record": "6-6",
      "country": null,
      "linescores": [33, 26, 23, 33]
    }
  ],
  "venue": "Madison Square Garden",
  "city": "New York, NY",
  "broadcasts": ["ESPN"],
  "oddsProvider": null,
  "oddsDetails": null,
  "overUnder": null,
  "spread": null,
  "homeMoneyline": null,
  "awayMoneyline": null,
  "url": "https://www.espn.com/nba/game/_/gameId/401909967/cavaliers-knicks",
  "scrapedAt": "2026-11-12T05:17:44.151Z"
}
```

### How to use

1. Add **Leagues** as `sport/league` codes (for example `basketball/nba`, `football/nfl`, `soccer/eng.1`, `soccer/esp.1`, `tennis/atp`) or short names: `nba`, `wnba`, `ncaab`, `nfl`, `ncaaf`, `mlb`, `nhl`, `mls`, `epl`, `laliga`, `bundesliga`, `serie a`, `ligue1`, `ucl`, `atp`, `wta`, `ufc`.
2. Set **Dates**: leave empty for the current scoreboard, or use `20261112`, `yesterday`, `tomorrow` or a range like `20261101-20261107`. Optionally set **Maximum games per league** and turn **Include betting lines** off.
3. Click **Start**. Each league's games are saved as soon as its scoreboard is read. Export them or read them through the API, or schedule the Actor every few minutes for live scores.

#### Example input

```json
{
  "leagues": ["nba", "soccer/eng.1", "tennis/atp"],
  "dates": "20261101-20261107",
  "maxGamesPerLeague": 500,
  "includeOdds": true,
  "proxyConfiguration": { "useApifyProxy": true }
}
```

Tips:

- A league code ESPN does not know is skipped with a warning in the log, so check the log if a league returns nothing.
- `yesterday` and `tomorrow` are calculated in UTC.
- The default datacenter proxy works.

### Pricing and cost examples

You pay per game or match saved to the dataset ("Game" event). Platform usage and proxy traffic are included in the per-game price.

| Apify plan | Price per 1,000 games |
|------------|-----------------------|
| Free (default price) | $2.00 |
| Bronze | $1.80 |
| Silver | $1.60 |
| Gold, Platinum, Diamond | $1.40 |

Cost examples on the Free plan:

- 100 games ≈ $0.20
- 1,000 games ≈ $2.00
- 10,000 games ≈ $20.00 (≈ $14.00 on Gold and higher plans)

The Apify Free plan includes $5 of platform credit every month. If you spend it only on this Actor, that covers about 2,500 games per month.

You are charged only for games pushed to the dataset. Nothing is charged for a league code that ESPN does not recognise, for a league whose scoreboard still fails after 4 attempts, for a day with no games, or for scoreboard entries without any team or player. A run with an invalid **Dates** value stops at the start and saves nothing. Repeated leagues in the input are read once. To set a hard cap, enter a maximum total charge per run in the run options. The Actor stops after the league where that limit is reached.

### Use it via API, on a schedule, or from an AI agent

**JavaScript** (`npm install apify-client`):

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

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

const run = await client.actor('tamnt67/espn-scores-scraper').call({
    leagues: ['nba', 'soccer/eng.1'],
    dates: 'yesterday',
});

const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(items);
```

**Python** (`pip install apify-client`):

```python
from apify_client import ApifyClient

client = ApifyClient("YOUR_API_TOKEN")

run = client.actor("tamnt67/espn-scores-scraper").call(run_input={
    "leagues": ["nba", "soccer/eng.1"],
    "dates": "yesterday",
})

items = client.dataset(run["defaultDatasetId"]).list_items().items
print(items)
```

**cURL** (runs the Actor and returns the games in one call):

```bash
curl -X POST "https://api.apify.com/v2/acts/tamnt67~espn-scores-scraper/run-sync-get-dataset-items?token=YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"leagues": ["nba", "soccer/eng.1"], "dates": "yesterday"}'
```

The sync endpoint waits for the run to finish, so use it for small runs and the client libraries for large ones.

**Schedules:** create an Apify Schedule for this Actor or a saved task to read the scoreboard every few minutes for live scores, or once a day for yesterday's results.

**AI agents:** the Apify MCP server at https://mcp.apify.com lets AI assistants such as Claude or Cursor run this Actor and read its results.

### FAQ

#### How much does ESPN Scores Scraper cost?

ESPN Scores Scraper costs $2 per 1,000 games on the Free plan and $1.80, $1.60 or $1.40 per 1,000 on higher Apify plans. 100 games cost about $0.20 on the Free plan. The Free plan's $5 monthly credit covers about 2,500 games.

#### How many games do I get per run?

ESPN Scores Scraper returns every game ESPN lists on the scoreboard for each league and date, up to `maxGamesPerLeague` (default 500, maximum 10,000). Days without games return nothing for that league.

#### How can I get more results?

Add more leagues, use a date range such as `20261101-20261107`, or raise `maxGamesPerLeague`. ESPN Scores Scraper reads one scoreboard page of up to 1,000 events per league, so for a long season split the range into several runs.

#### Can I run it on a schedule or through the API?

Yes. ESPN Scores Scraper works with Apify Schedules, from every few minutes for live scores to once a day for results, and with the Apify API through the JavaScript and Python clients or a single cURL call. See the API section above for working examples.

#### How fresh is the data?

ESPN Scores Scraper reads ESPN's scoreboard live at the time of each run, so live games show the score, period and clock at that moment. Nothing is cached, and every record has a `scrapedAt` timestamp.

#### Is it legal to scrape ESPN?

ESPN Scores Scraper collects only publicly visible scoreboard data from ESPN's public JSON feed, without logging in. You are responsible for how you use the data, including complying with ESPN's terms of service and with data protection laws such as GDPR. This is not legal advice. If you are unsure, ask a lawyer.

### Limitations

- ESPN decides what the "current" scoreboard is: today for daily sports, the current week for NFL and some soccer leagues.
- Betting lines appear only for some games, mostly upcoming US games; otherwise the odds fields are empty.
- Golf, racing and other sports without head-to-head games may return few or no records.
- Player box scores and play-by-play are not included.
- Each league is read with one scoreboard request of up to 1,000 events, so `maxGamesPerLeague` above that, or a very long date range, may not return more games.
- Only the date formats above are accepted. Any other value in **Dates** stops the run.
- `homeName` and `awayName` fall back to the first and second competitor when ESPN does not mark home and away, for example in tennis.
- This is an unofficial tool and is not affiliated with ESPN.

### Changelog

- 1.0 update (2026-11-19): `spread` is now filled for soccer and other games where ESPN gives the line only in its newer point-spread format (it was always empty there).
- 1.0 (2026-11-19): First stable release.

### Integrations

Works with every Apify integration: API, webhooks, Zapier, Make, Google Sheets, Slack, n8n, LangChain and the Apify MCP server.

### Support

Found a problem or missing field? Report it in the Issues tab of this Actor.

# Actor input Schema

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

ESPN sport/league codes such as basketball/nba, football/nfl, soccer/eng.1, tennis/atp, or short names: nba, nfl, mlb, nhl, epl, laliga, ucl, mls, atp, wta, ufc.

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

Empty for the current scoreboard, or a date (20261112), yesterday, tomorrow, or a range (20261101-20261107).

## `maxGamesPerLeague` (type: `integer`):

Stop after this many games or matches for each league.

## `includeOdds` (type: `boolean`):

Add the betting line fields (spread, over/under, moneyline) when ESPN shows them.

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

Proxy used for the requests. The default datacenter proxy works.

## Actor input object example

```json
{
  "leagues": [
    "basketball/nba",
    "soccer/eng.1",
    "hockey/nhl",
    "tennis/atp"
  ],
  "dates": "",
  "maxGamesPerLeague": 500,
  "includeOdds": true,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

# Actor output Schema

## `games` (type: `string`):

Dataset with one record per result.

## `gamesCsv` (type: `string`):

The same dataset exported as CSV.

# 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 = {
    "maxGamesPerLeague": 500,
    "proxyConfiguration": {
        "useApifyProxy": true
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("tamnt67/espn-scores-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 = {
    "maxGamesPerLeague": 500,
    "proxyConfiguration": { "useApifyProxy": True },
}

# Run the Actor and wait for it to finish
run = client.actor("tamnt67/espn-scores-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 '{
  "maxGamesPerLeague": 500,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}' |
apify call tamnt67/espn-scores-scraper --silent --output-dataset

```

## MCP server setup

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