# ESPN Scraper (`aurenic/espn-scraper`) Actor

Extract live scores, standings, teams, news, and game summaries from ESPN's public API. 17 sports, 139 leagues. No API key, no login, no proxy, no browser.

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

## Pricing

from $1.20 / 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.

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 Scraper

Extract live scores, standings, teams, news, and game summaries from ESPN's public API. 17 sports, 139 leagues. No API key, no login, no proxy, no browser.

### What does ESPN Scraper do?

Scrape ESPN's undocumented public API — the same JSON endpoints that power espn.com — in five modes:

- **Scoreboard** — live and final scores with venue, broadcast, attendance, records, and winner flags for every game on a date.
- **Standings** — division and conference standings with full stat lines (W-L, PCT, GB, PF, PA, and sport-specific stats).
- **Teams** — every team in a league with name, abbreviation, colors, logo, and location.
- **News** — latest articles with headline, description, byline, categories, images, and direct links.
- **Game summary** — full box score, scoring plays, and statistical leaders for a specific event.

Covers all major sports: NFL, NBA, MLB, NHL, MLS, Premier League, La Liga, Bundesliga, Serie A, Ligue 1, F1, UFC, PGA Golf, ATP Tennis, WNBA, NCAA Football, NCAA Basketball, and more.

### Output fields

#### Event (scoreboard)

| Field | Description |
|---|---|
| eventId | ESPN event ID |
| name / shortName | Game name |
| date | ISO 8601 game date |
| status | Live / Final / Scheduled |
| venue / venueCity / venueState | Location |
| broadcast | TV networks |
| attendance | Attendance count |
| homeTeam / awayTeam | Team objects with ID, name, logo, colors |
| homeScore / awayScore | Scores |
| homeWinner / awayWinner | Winner flags |
| homeRecord / awayRecord | Season records |
| links | ESPN game page URLs |

#### Standing

| Field | Description |
|---|---|
| group | Division / conference |
| teamId / teamName / abbreviation / logo | Team identity |
| wins / losses / winPercent / gamesBehind | Core standings |
| pointsFor / pointsAgainst / streak | Sport-specific stats |

#### Team

| Field | Description |
|---|---|
| teamId | ESPN team ID |
| displayName / nickname / location | Name fields |
| abbreviation | Short code |
| color / alternateColor | Brand colors |
| logo | Logo URL |

#### News article

| Field | Description |
|---|---|
| headline / description | Article summary |
| published / lastModified | Timestamps |
| byline | Author |
| categories | Tags |
| imageUrl | Hero image |
| link | Direct article URL |

### Who is it for?

- **Sports betting and DFS platforms** powering live odds and matchup data
- **Fantasy sports apps** pulling real-time scores, standings, and player data
- **Sports media and blogs** building automated news and results pipelines
- **Data journalists** analyzing team performance across seasons
- **Sports analytics teams** building historical game datasets
- **Fan apps and newsletters** pushing live score updates

### Pricing

**$1.20 per 1,000 results.** No subscription.

| Results | Cost |
|---|---|
| 100 | $0.12 |
| 1,000 | $1.20 |
| 10,000 | $12.00 |

### How to use it

1. Pick a **Mode**.
2. Set **Sports** and **Leagues** (parallel arrays — sport\[0] pairs with league\[0]).
3. Optionally add **Dates** (scoreboard) or **Event IDs** (summary).
4. Set **Max Items** (default 500).
5. Click **Start**.

### Output example

```json
{
  "recordType": "event",
  "sport": "basketball",
  "league": "nba",
  "eventId": "401584793",
  "name": "Boston Celtics at Denver Nuggets",
  "shortName": "BOS @ DEN",
  "date": "2026-09-22T23:00:00Z",
  "status": "Final",
  "statusState": "post",
  "completed": true,
  "venue": "Ball Arena",
  "venueCity": "Denver",
  "venueState": "CO",
  "broadcast": "ESPN",
  "attendance": 19423,
  "homeTeam": { "teamId": "7", "displayName": "Denver Nuggets", "abbreviation": "DEN" },
  "homeScore": "112",
  "homeWinner": true,
  "homeRecord": "3-1",
  "awayTeam": { "teamId": "2", "displayName": "Boston Celtics", "abbreviation": "BOS" },
  "awayScore": "108",
  "awayWinner": false,
  "awayRecord": "4-2",
  "scrapedAt": "2026-09-23T12:00:00.000Z"
}
```

### Technical details

- **ESPN's public API** — `site.api.espn.com/apis/site/v2/sports/{sport}/{league}/...`. Fully unauthenticated. No key, no token, no rate limit warnings \[reference:4].
- **Five modes in one actor** — scoreboard, standings, teams, news, summary.
- **139+ leagues** across 17 sports \[reference:5].
- **No proxy, no browser, no login** — pure JSON REST.
- **Self-throttled** at 300ms between requests by default.
- **No API key registration** — unlike TheSportsDB (30 req/min with shared key) and Regulations.gov (requires free key).

### Known limits

- **Undocumented API** — ESPN doesn't publish API docs. Endpoint structure is stable but could change without notice.
- **Rate limits are informal.** ESPN doesn't publish a hard limit; 300ms throttle keeps runs safe. For very large runs, increase `requestDelayMs`.
- **Standings structure varies by sport.** Football and basketball use nested division/conference groups; soccer uses table-based standings. The actor flattens both to one row per team.
- **Game summary is one record per event.** Box score and leaders are nested in that single record.
- **News is capped by ESPN** at ~25 articles per league feed. For historical news, use a different source.

### FAQ

**Do I need an API key?** No. ESPN's public API is free and unauthenticated.

**Do I need a proxy?** No. Datacenter IPs are accepted.

**What sports are supported?** Football (NFL, NCAA), basketball (NBA, WNBA, NCAA), baseball (MLB), hockey (NHL), soccer (MLS, Premier League, La Liga, Bundesliga, Serie A, Ligue 1), racing (F1, NASCAR), MMA (UFC), golf (PGA), tennis (ATP, WTA), and more.

**How do I find event IDs?** Run scoreboard mode first — each event's `eventId` is in the output. Pass those to summary mode for full box scores.

**How do I export data?** After a run, go to Storage → Export as JSON, CSV, Excel.

### Support

Open an issue on the Actor's page for bugs or feature requests.

# Actor input Schema

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

What to fetch from ESPN.

## `sports` (type: `array`):

Sport keys — parallel array with leagues. Examples: football, basketball, baseball, hockey, soccer, racing, mma, golf, tennis.

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

League keys — parallel array with sports. Examples: nba, nfl, mlb, nhl, mls, eng.1 (Premier League), esp.1 (La Liga), f1, ufc, pga, atp.

## `dates` (type: `array`):

Optional date filters in YYYYMMDD format (e.g. 20260915). Used only in scoreboard mode.

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

ESPN event IDs to fetch game summaries for. Used only in summary mode.

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

Hard cap on records per run.

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

Delay between ESPN API requests. Default 300ms is safe.

## Actor input object example

```json
{
  "mode": "scoreboard",
  "sports": [
    "basketball",
    "football"
  ],
  "leagues": [
    "nba",
    "nfl"
  ],
  "dates": [],
  "eventIds": [],
  "maxItems": 500,
  "requestDelayMs": 300
}
```

# Actor output Schema

## `results` (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 = {
    "sports": [
        "basketball",
        "football"
    ],
    "leagues": [
        "nba",
        "nfl"
    ]
};

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

# Run the Actor and wait for it to finish
run = client.actor("aurenic/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 '{
  "sports": [
    "basketball",
    "football"
  ],
  "leagues": [
    "nba",
    "nfl"
  ]
}' |
apify call aurenic/espn-scraper --silent --output-dataset

```

## MCP server setup

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