# ESPN Scoreboard Scraper: NBA, NFL, MLB, NHL & Soccer Scores (`bright_oven/espn-scoreboards`) Actor

Live and historical game scores from ESPN scoreboards: NBA, NFL, MLB, NHL and 8 soccer leagues (Premier League, La Liga, Champions League, MLS...). One clean JSON record per game with teams, scores, status, venue and odds.

- **URL**: https://apify.com/bright\_oven/espn-scoreboards.md
- **Developed by:** [John Pork](https://apify.com/bright_oven) (community)
- **Categories:** News, Other, Social media
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, NaN bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.00 / 1,000 scores

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/platform/actors/running/actors-in-store#pay-per-event

## What's an Apify Actor?

Actors are a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
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.
Actors are written with capital "A".

## 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.
The best way to integrate Actors is as follows.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp.md).

If your project is in a different language, use the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).


# README

## ESPN Scoreboard Scraper — NBA, NFL, MLB, NHL & Soccer

Game scores from ESPN's public scoreboards as clean JSON — live games, final scores, and historical dates. Covers **NBA, NFL, MLB, NHL** plus **MLS, Premier League, La Liga, Bundesliga, Serie A, Ligue 1, Champions League, Danish Superliga**.

### What you get

One record per game:

```json
{
  "league": "nba",
  "gameId": "401705123",
  "name": "Boston Celtics at Oklahoma City Thunder",
  "date": "2026-06-11",
  "startTime": "2026-06-12T00:30:00Z",
  "state": "post",
  "completed": true,
  "home": {"team": "Oklahoma City Thunder", "abbrev": "OKC", "score": 112},
  "away": {"team": "Boston Celtics", "abbrev": "BOS", "score": 108},
  "venue": "Paycom Center",
  "odds": "OKC -3.5",
  "overUnder": 221.5
}
````

### Use cases

- **Sports models & betting research** — final scores and odds snapshots per game
- **Prediction market resolution** — settle "Will X win against Y?" style markets against the official scoreboard
- **AI agents** — structured scores straight into your agent via the Apify API or MCP
- **Dashboards / Discord bots** — schedule runs during game windows

### Input

```json
{
  "leagues": ["nba", "premier league"],
  "startDate": "2026-06-10",
  "endDate": "2026-06-12",
  "teamFilter": "celtics"
}
```

Date range is capped at 31 days per run. Omit dates to fetch today's slate (live games included, `state: "in"`).

### Run via API

```bash
curl -s "https://api.apify.com/v2/acts/<username>~espn-scoreboards/run-sync-get-dataset-items?token=$APIFY_TOKEN" \
  -X POST -H 'Content-Type: application/json' \
  -d '{"leagues": ["nba"], "startDate": "2026-06-11"}'
```

### FAQ

**Does it cover live games?** Yes — games in progress return `state: "in"` with current scores.

**Tournament/season winners?** This actor reports individual game results, not season futures.

# Actor input Schema

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

Leagues to fetch.

## `startDate` (type: `string`):

First date to fetch (YYYY-MM-DD). Defaults to today.

## `endDate` (type: `string`):

Last date to fetch inclusive (YYYY-MM-DD, max 31 days per run). Defaults to start date.

## `teamFilter` (type: `string`):

Only emit games where a team name contains this text (case-insensitive).

## Actor input object example

```json
{
  "leagues": [
    "nba",
    "mlb"
  ]
}
```

# Actor output Schema

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

Charged once per game record returned.

# 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",
        "mlb"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("bright_oven/espn-scoreboards").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",
        "mlb",
    ] }

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

# Fetch and print Actor results from the run's dataset (if there are any)
print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
for item in client.dataset(run["defaultDatasetId"]).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",
    "mlb"
  ]
}' |
apify call bright_oven/espn-scoreboards --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=bright_oven/espn-scoreboards",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "ESPN Scoreboard Scraper: NBA, NFL, MLB, NHL & Soccer Scores",
        "description": "Live and historical game scores from ESPN scoreboards: NBA, NFL, MLB, NHL and 8 soccer leagues (Premier League, La Liga, Champions League, MLS...). One clean JSON record per game with teams, scores, status, venue and odds.",
        "version": "0.1",
        "x-build-id": "GfyDORFr5cjI7pV6z"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/bright_oven~espn-scoreboards/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-bright_oven-espn-scoreboards",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/acts/bright_oven~espn-scoreboards/runs": {
            "post": {
                "operationId": "runs-sync-bright_oven-espn-scoreboards",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor and returns information about the initiated run in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/runsResponseSchema"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/acts/bright_oven~espn-scoreboards/run-sync": {
            "post": {
                "operationId": "run-sync-bright_oven-espn-scoreboards",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "required": [
                    "leagues"
                ],
                "properties": {
                    "leagues": {
                        "title": "Leagues",
                        "type": "array",
                        "description": "Leagues to fetch.",
                        "items": {
                            "type": "string",
                            "enum": [
                                "nba",
                                "nfl",
                                "mlb",
                                "nhl",
                                "mls",
                                "premier league",
                                "la liga",
                                "bundesliga",
                                "serie a",
                                "ligue 1",
                                "champions league",
                                "danish superliga"
                            ],
                            "enumTitles": [
                                "NBA",
                                "NFL",
                                "MLB",
                                "NHL",
                                "MLS",
                                "Premier League",
                                "La Liga",
                                "Bundesliga",
                                "Serie A",
                                "Ligue 1",
                                "UEFA Champions League",
                                "Danish Superliga"
                            ]
                        }
                    },
                    "startDate": {
                        "title": "Start date",
                        "type": "string",
                        "description": "First date to fetch (YYYY-MM-DD). Defaults to today."
                    },
                    "endDate": {
                        "title": "End date",
                        "type": "string",
                        "description": "Last date to fetch inclusive (YYYY-MM-DD, max 31 days per run). Defaults to start date."
                    },
                    "teamFilter": {
                        "title": "Team filter",
                        "type": "string",
                        "description": "Only emit games where a team name contains this text (case-insensitive)."
                    }
                }
            },
            "runsResponseSchema": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "actId": {
                                "type": "string"
                            },
                            "userId": {
                                "type": "string"
                            },
                            "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "finishedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "status": {
                                "type": "string",
                                "example": "READY"
                            },
                            "meta": {
                                "type": "object",
                                "properties": {
                                    "origin": {
                                        "type": "string",
                                        "example": "API"
                                    },
                                    "userAgent": {
                                        "type": "string"
                                    }
                                }
                            },
                            "stats": {
                                "type": "object",
                                "properties": {
                                    "inputBodyLen": {
                                        "type": "integer",
                                        "example": 2000
                                    },
                                    "rebootCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "restartCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "resurrectCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "computeUnits": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "options": {
                                "type": "object",
                                "properties": {
                                    "build": {
                                        "type": "string",
                                        "example": "latest"
                                    },
                                    "timeoutSecs": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "memoryMbytes": {
                                        "type": "integer",
                                        "example": 1024
                                    },
                                    "diskMbytes": {
                                        "type": "integer",
                                        "example": 2048
                                    }
                                }
                            },
                            "buildId": {
                                "type": "string"
                            },
                            "defaultKeyValueStoreId": {
                                "type": "string"
                            },
                            "defaultDatasetId": {
                                "type": "string"
                            },
                            "defaultRequestQueueId": {
                                "type": "string"
                            },
                            "buildNumber": {
                                "type": "string",
                                "example": "1.0.0"
                            },
                            "containerUrl": {
                                "type": "string"
                            },
                            "usage": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "usageTotalUsd": {
                                "type": "number",
                                "example": 0.00005
                            },
                            "usageUsd": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "number",
                                        "example": 0.00005
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
