# ESPN Scraper - $0.80 / 1000 Results (`scrapeunblocker/espn-scraper`) Actor

ESPN scores, schedules and betting lines as JSON for NBA, NFL, MLB, NHL, soccer, college sports, tennis, golf and MMA, plus game summaries with box scores, leaders, odds and win probability. $0.80 per 1000 games, $2 per 1000 game summaries.

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

## Pricing

from $0.80 / 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

Scrape **ESPN** scores as clean JSON. Get a league's **games, scores, schedules and betting lines**, or a **game summary** with box score, leaders, odds and win probability, for the NBA, NFL, MLB, NHL, soccer, college sports, tennis, golf and MMA.

### Features

- **Scoreboards** - start time, status, venue, broadcasts, teams, score, records, line scores, leaders and probable pitchers or goalies for each game of a day or date range.
- **Betting lines** - provider, spread, over/under, moneyline, point spread and total, with opening and latest American prices as numbers, where ESPN carries them.
- **Game summaries** - team statistics, per-player box score, leaders, odds, win probability series, scoring plays, soccer key events and lineups, and injuries.
- **Team and field sports** - tennis matches come with draw and round, fight cards with each bout, golf and racing with the whole field.

### Use cases

- **Live score feeds** - keep scores and schedules current on a schedule.
- **Sports betting research** - track spreads and totals from open to close.
- **Sports analytics** - collect player box scores and win probability across a season.
- **Fantasy and media** - follow leaders, injuries and results per day.

### Input

| Field | Type | Default | Description |
|-------|------|---------|-------------|
| `mode` | string | `scoreboard` | `scoreboard` (one result per game) or `summary` (one result per game summary). |
| `leagues` | array | NBA, NHL, NFL, Premier League, PGA | Sport and league paths as `sport/league`, such as `basketball/nba` or `soccer/esp.1`. |
| `games` | array | - | For `summary`: games as `sport/league/gameId`. Leave empty to use each league's started games on the chosen date. |
| `date` | string | today | A day as `YYYY-MM-DD` or `YYYYMMDD`, or a range as `YYYYMMDD-YYYYMMDD`. |
| `group` | string | - | ESPN's group id for college leagues, such as `80` for all FBS football or `50` for all Division I men's basketball. |
| `maxGames` | integer | `20` | Games per league (1-500). |
| `proxyCountry` | string | - | Optional two-letter country code the requests are sent from. |

### Output

In `scoreboard` mode each result is one game:

```json
{
  "id": "401873051",
  "sport": "football",
  "league": { "name": "National Football League", "abbreviation": "NFL" },
  "name": "Buffalo Bills at Minnesota Vikings",
  "startTime": "2026-11-10T01:15:00Z",
  "status": { "state": "pre", "description": "Scheduled" },
  "home": { "name": "Minnesota Vikings", "record": "6-1" },
  "away": { "name": "Buffalo Bills" },
  "odds": [{ "provider": "Draft Kings", "details": "BUF -3", "overUnder": 44.5 }]
}
```

In `summary` mode a result has `event`, `boxscore`, `leaders`, `odds`, `predictor`, `winProbability`, `scoringPlays`, `keyEvents`, `lineups` and `injuries`, as far as ESPN holds them for the game.

### Good to know

- ESPN groups games by US Eastern day.
- A day without games returns no results and is not charged.
- Inputs that fail are listed in the `ERRORS` key-value record and are not charged. A game reached twice is charged once.

### Pricing

$0.80 per 1000 games and $2 per 1000 game summaries. Start fee $0.00005.

# Actor input Schema

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

Scoreboards: one result per game of each league. Game summaries: one result per game, taken from Games below, or when that is empty from each league's started games on the chosen date.

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

ESPN sport and league paths as sport/league, such as basketball/nba, football/college-football, baseball/mlb, soccer/esp.1, tennis/atp, mma/ufc or racing/f1.

## `games` (type: `array`):

For game summaries: games as sport/league/gameId, such as basketball/nba/401909945. Leave empty to use each league's started games on the chosen date.

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

A day as YYYY-MM-DD or YYYYMMDD, or a range as YYYYMMDD-YYYYMMDD. Leave empty for today. ESPN groups games by US Eastern day.

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

ESPN's group id for college leagues, such as 80 for all FBS football or 50 for all Division I men's basketball.

## `maxGames` (type: `integer`):

How many games to take from each league.

## `proxyCountry` (type: `string`):

Optional two-letter country code the requests are sent from, such as US or GB. Leave empty to let the scraper choose.

## Actor input object example

```json
{
  "mode": "scoreboard",
  "leagues": [
    "basketball/nba",
    "hockey/nhl",
    "football/nfl",
    "soccer/eng.1",
    "golf/pga"
  ],
  "maxGames": 20
}
```

# Actor output Schema

## `items` (type: `string`):

Collected results

# 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": [
        "basketball/nba",
        "hockey/nhl",
        "football/nfl",
        "soccer/eng.1",
        "golf/pga"
    ],
    "maxGames": 20
};

// Run the Actor and wait for it to finish
const run = await client.actor("scrapeunblocker/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": [
        "basketball/nba",
        "hockey/nhl",
        "football/nfl",
        "soccer/eng.1",
        "golf/pga",
    ],
    "maxGames": 20,
}

# Run the Actor and wait for it to finish
run = client.actor("scrapeunblocker/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": [
    "basketball/nba",
    "hockey/nhl",
    "football/nfl",
    "soccer/eng.1",
    "golf/pga"
  ],
  "maxGames": 20
}' |
apify call scrapeunblocker/espn-scraper --silent --output-dataset

```

## MCP server setup

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