# ESPN Sports Scraper — Scores, Teams & Standings (`haketa/espn-sports-scraper`) Actor

Scrape ESPN for live and scheduled scores with betting odds, team lists and standings across NFL, NBA, MLB, NHL, soccer (Premier League, La Liga, Champions League) and college. Pick leagues and a data type. Keyless, no anti-bot, fast.

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

## Pricing

from $2.00 / 1,000 results

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

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

## What's an Apify Actor?

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

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

## How to integrate an Actor?

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

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

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

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

# README

## ESPN Sports Scraper — Scores, Teams & Standings

Pull **live and scheduled scores (with betting odds), team lists, and standings** from ESPN — across **NFL, NBA, MLB, NHL, soccer leagues and college** — as clean JSON/CSV/Excel. Pick your leagues and a data type; get structured sports data in seconds.

**Keyless**, no anti-bot — built for fantasy tools, odds/betting models, sports media and data analysis.

***

### What this Actor does

Choose one or more leagues (in `sport/league` form) and a **data type**:

- **Scoreboard** — every game for a league: teams, live/final scores, status and clock, venue, TV broadcast, **betting line/odds**, and each team's record. Filter by date or date range.
- **Teams** — the full team list for a league: name, abbreviation, location, colors and **logo**.
- **Standings** — the standings table: conference/division, rank, wins, losses, win %, games behind and streak.

It runs on ESPN's public site API, so it's fast, keyless and reliable — one tidy row per game, team or standings entry.

***

### Why use it

- **Live scores + odds in one call.** Scoreboard rows carry the score, game status *and* the betting line — perfect for odds models, alerting and dashboards.
- **Many leagues, one Actor.** NFL, NBA, MLB, NHL, soccer (Premier League, La Liga, Champions League…), college football & basketball — just change the league code.
- **Fantasy & analytics ready.** Clean, structured records for building fantasy tools, projections, trackers and data pipelines.
- **Keyless and free of anti-bot.** No API key, no scraping headaches — public endpoints, with proxy rotation on by default.
- **Schedule it.** Run every few minutes during game day to keep a live score/odds feed; run daily for standings.

***

### Who it's for

- **Fantasy & betting tool builders** needing scores, odds and standings feeds.
- **Sports media & content teams** auto-populating scoreboards, recaps and widgets.
- **Data analysts & modelers** building datasets across seasons and leagues.
- **App & dashboard developers** who want a clean sports API without the official-API friction.

***

### Quick start

#### Run it in the console (no code)

1. In **Leagues**, add one per line:

   ```
   football/nfl
   basketball/nba
   soccer/eng.1
   ```

2. Pick a **Data type**: *Scoreboard*, *Teams* or *Standings*.

3. *(Scoreboard only, optional)* set **Dates** like `20261009` or `20261001-20261031`.

4. Click **Start**, then export as **JSON, CSV, Excel or HTML**.

Leave leagues empty to run a **demo** (NFL + NBA scoreboard).

#### Run it via API (Python)

```python
from apify_client import ApifyClient

client = ApifyClient("YOUR_APIFY_TOKEN")

run_input = {
    "leagues": ["football/nfl", "basketball/nba", "soccer/eng.1"],
    "dataType": "scoreboard",
}

run = client.actor("YOUR_USERNAME/espn-sports-scraper").call(run_input=run_input)

for g in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(f"{g['awayTeam']} @ {g['homeTeam']} — {g['awayScore']}-{g['homeScore']} ({g['statusDetail']}) {g['odds']}")
```

#### Run it via API (JavaScript)

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

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

const run = await client.actor('YOUR_USERNAME/espn-sports-scraper').call({
    leagues: ['football/nfl'],
    dataType: 'standings',
});

const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((r) => console.log(`${r.group}: ${r.teamName} ${r.wins}-${r.losses} (${r.winPercent})`));
```

***

### League codes

Use `sport/league`:

| League | Code |
|---|---|
| NFL | `football/nfl` |
| College Football | `football/college-football` |
| NBA | `basketball/nba` |
| WNBA | `basketball/wnba` |
| Men's College Basketball | `basketball/mens-college-basketball` |
| MLB | `baseball/mlb` |
| NHL | `hockey/nhl` |
| Premier League | `soccer/eng.1` |
| La Liga | `soccer/esp.1` |
| Serie A | `soccer/ita.1` |
| Bundesliga | `soccer/ger.1` |
| MLS | `soccer/usa.1` |
| Champions League | `soccer/uefa.champions` |

…and most other leagues ESPN covers — the same `sport/league` pattern applies.

***

### Input

| Field | Type | Description |
|---|---|---|
| **Leagues** | array | One `sport/league` per line. Empty = demo (NFL + NBA). |
| **Data type** | select | `scoreboard` (games, scores & odds), `teams`, or `standings`. |
| **Dates (scoreboard only)** | string | `YYYYMMDD` or `YYYYMMDD-YYYYMMDD`. Empty = today / current slate. |
| **Speed (parallel leagues)** | integer | How many leagues at once. Default 5. |
| **Proxy configuration** | object | Apify Proxy. On by default. |

***

### Output

**Scoreboard** record:

```json
{
  "dataType": "scoreboard",
  "league": "football/nfl",
  "name": "Tampa Bay Buccaneers at Dallas Cowboys",
  "date": "2026-10-09T00:15Z",
  "statusState": "pre",
  "statusDetail": "Thu, October 8th at 8:15 PM EDT",
  "homeTeam": "Dallas Cowboys", "homeScore": "0", "homeRecord": "2-2",
  "awayTeam": "Tampa Bay Buccaneers", "awayScore": "0", "awayRecord": "0-4",
  "venue": "AT&T Stadium", "city": "Arlington",
  "odds": "DAL -8.5",
  "broadcast": "Prime Video",
  "scrapedAt": "2026-10-08T14:00:00.000Z"
}
```

**Teams** record: `teamId`, `teamName`, `abbreviation`, `location`, `color`, `logo`, `record`, `standingSummary`.

**Standings** record: `group` (conference/division), `teamName`, `rank`, `wins`, `losses`, `ties`, `winPercent`, `gamesBehind`, `pointsFor`, `pointsAgainst`, `streak`.

Every record also carries `dataType`, `league` and `scrapedAt`, so mixed exports stay tidy.

***

### Tips & notes

- **Live game day.** Schedule the scoreboard every few minutes — `statusState` flips `pre` → `in` → `post`, and scores/clock update live.
- **Odds.** The `odds` field carries the current line when ESPN publishes it (e.g. `DAL -8.5`). It can be empty for leagues/games without a posted line.
- **Date ranges.** Use `dates` to pull a past day, a whole month, or a future slate for scheduling.
- **Mix leagues.** Add several leagues in one run — each row is labeled with its `league`.
- **Standings timing.** Records and standings populate once a season is underway; preseason/offseason may return empty records.

***

### Frequently asked questions

**Do I need an API key?**
No. The Actor uses ESPN's public site API — no key, no account.

**Which leagues are supported?**
Most leagues ESPN covers: NFL, NBA, WNBA, MLB, NHL, college football & basketball, and many soccer leagues (Premier League, La Liga, Serie A, Bundesliga, MLS, Champions League, and more). Use the `sport/league` code.

**Does it include betting odds?**
Yes — the scoreboard includes the posted line in the `odds` field when ESPN provides one.

**Can I get live scores?**
Yes. Run the scoreboard during games; `statusState`/`statusDetail` and scores reflect the live state. Schedule it to keep a feed fresh.

**Can I pull a specific date?**
Yes — set `dates` (scoreboard) to a day or range in `YYYYMMDD` form.

**Is it good for fantasy / modeling?**
Absolutely — clean, structured scores, standings and team data across leagues are ideal for fantasy tools and predictive models.

***

### Export & integrate

Results are available as **JSON, CSV, Excel, HTML** and via the **Apify API**. Push to **Google Sheets**, a **webhook**, **Make**, **Zapier**, Slack or your database — and **schedule** runs for live score/odds feeds or daily standings.

# Actor input Schema

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

One league per line in `sport/league` form. Examples: `football/nfl`, `basketball/nba`, `baseball/mlb`, `hockey/nhl`, `soccer/eng.1` (Premier League), `soccer/esp.1` (La Liga), `soccer/uefa.champions`, `football/college-football`, `basketball/mens-college-basketball`. Leave empty for a demo.

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

What to pull for each league: live & scheduled games (scoreboard), the team list, or the standings table.

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

Optional. Limit the scoreboard to a date or range in YYYYMMDD form — e.g. `20261009` for one day, or `20261001-20261031` for a month. Empty = today / current slate.

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

How many leagues to fetch at once.

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

Apify Proxy. On by default — the API is public, but rotation keeps large runs smooth.

## Actor input object example

```json
{
  "leagues": [
    "football/nfl",
    "basketball/nba",
    "soccer/eng.1"
  ],
  "dataType": "scoreboard",
  "dates": "",
  "maxConcurrency": 5,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

# Actor output Schema

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

scoreboard / teams / standings

## `league` (type: `string`):

sport/league

## `name` (type: `string`):

Game name

## `date` (type: `string`):

Game date/time

## `statusState` (type: `string`):

pre / in / post

## `statusDetail` (type: `string`):

Clock / date detail

## `homeTeam` (type: `string`):

Home team

## `homeScore` (type: `string`):

Home score

## `homeRecord` (type: `string`):

Home record

## `awayTeam` (type: `string`):

Away team

## `awayScore` (type: `string`):

Away score

## `awayRecord` (type: `string`):

Away record

## `venue` (type: `string`):

Venue

## `city` (type: `string`):

City

## `odds` (type: `string`):

Betting line

## `broadcast` (type: `string`):

TV/stream

## `teamId` (type: `string`):

Team ID

## `teamName` (type: `string`):

Team name

## `abbreviation` (type: `string`):

Abbreviation

## `location` (type: `string`):

Location

## `logo` (type: `string`):

Logo URL

## `record` (type: `string`):

Team record

## `group` (type: `string`):

Conference/division

## `rank` (type: `string`):

Standings rank/seed

## `wins` (type: `string`):

Wins

## `losses` (type: `string`):

Losses

## `winPercent` (type: `string`):

Win percentage

## `gamesBehind` (type: `string`):

Games behind

## `streak` (type: `string`):

Streak

## `scrapedAt` (type: `string`):

Timestamp

# 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": [
        "football/nfl",
        "basketball/nba",
        "soccer/eng.1"
    ],
    "maxConcurrency": 5
};

// Run the Actor and wait for it to finish
const run = await client.actor("haketa/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": [
        "football/nfl",
        "basketball/nba",
        "soccer/eng.1",
    ],
    "maxConcurrency": 5,
}

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

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

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

```

## CLI example

```bash
echo '{
  "leagues": [
    "football/nfl",
    "basketball/nba",
    "soccer/eng.1"
  ],
  "maxConcurrency": 5
}' |
apify call haketa/espn-sports-scraper --silent --output-dataset

```

## MCP server setup

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

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

## OpenAPI specification

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