# ESPN Scores & Schedules — NFL, NBA, MLB, NHL, Soccer (`axery/espn-scoreboard-scraper`) Actor

Get live scores, schedules, team records and venue info from ESPN's official public API - NFL, NBA, MLB, NHL, college and international soccer. Scores and stats only - no odds, spreads or betting data.

- **URL**: https://apify.com/axery/espn-scoreboard-scraper.md
- **Developed by:** [Axery](https://apify.com/axery) (community)
- **Categories:** Developer tools, Videos, News
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.70 / 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?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
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.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — 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 Scores & Schedules

Gets scores, schedules, team records and venue data from **ESPN's own official public API** over plain HTTP — no login, no key. One URL pattern covers NFL, NBA, MLB, NHL, college football/basketball, and international soccer leagues.

### Scope: scores and stats only, by design

This Actor requests only ESPN's public scoreboard endpoint and its schema has **no field for odds, spreads or betting lines** — this is a deliberate boundary, not an oversight or a missing feature. If you need odds data, this is not the Actor for it, and it will not be added.

### What you get per game

Teams (name, abbreviation, color, logo), numeric score, win/loss, home/road/overall records, game status (scheduled/in-progress/final with period and clock), venue (name, city, indoor/outdoor), attendance, and TV broadcast names.

### Input

| Field | Type | Notes |
|---|---|---|
| `sport` | enum | `football`, `basketball`, `baseball`, `hockey`, `soccer`. |
| `league` | string | ESPN's league code, e.g. `nfl`, `college-football`, `nba`, `mlb`, `nhl`, `eng.1` (Premier League), `esp.1` (La Liga). |
| `date` | string | `YYYYMMDD` to restrict to one day. Leave blank for ESPN's current slate. |
| `maxItems` | integer | `0` returns the whole scoreboard for the request. |
| `proxyConfiguration` | object | Not needed — public, unauthenticated API. |

### Known limits

- **One scoreboard call per run.** For multiple days or leagues, run the Actor multiple times (e.g. via a task or scheduled runs) rather than expecting a single call to sweep a whole season.
- **League codes are ESPN's own**, not always obvious — check ESPN's own website URLs (e.g. espn.com/soccer/league/\_/name/eng.1) to find a code for a league not listed above.

### Local development

```bash
pip install -r requirements.txt
python test_local.py --sport baseball --league mlb --out sample_output.json
python test_local.py --sport football --league nfl --date 20260907
```

`sample_output.json` in this folder is real output from a live run, kept so the schema can be reviewed without running anything.

# Actor input Schema

## `sport` (type: `string`):

ESPN's sport category.

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

ESPN's league code for the chosen sport, e.g. `nfl`, `college-football`, `nba`, `mens-college-basketball`, `mlb`, `nhl`, `eng.1` (Premier League), `esp.1` (La Liga).

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

Restrict to one day, format YYYYMMDD. Leave blank for ESPN's current/relevant slate.

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

Cap on games returned. `0` returns the whole scoreboard for the requested date/league.

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

Apify Proxy settings. ESPN scoreboard API is a genuinely public endpoint, but Apify's own container IP range can still be rate-limited or blocked by services that treat cloud IPs as suspicious regardless of any WAF - defaults to Residential as a precaution.

## Actor input object example

```json
{
  "sport": "football",
  "league": "nfl",
  "date": "20260907",
  "maxItems": 0,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}
```

# Actor output Schema

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

One row per game.

# 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 = {
    "league": "nfl"
};

// Run the Actor and wait for it to finish
const run = await client.actor("axery/espn-scoreboard-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 = { "league": "nfl" }

# Run the Actor and wait for it to finish
run = client.actor("axery/espn-scoreboard-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 '{
  "league": "nfl"
}' |
apify call axery/espn-scoreboard-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,axery/espn-scoreboard-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/sQdzZc7cxphdIVe0z/builds/15ZQnh874JuwLFpfW/openapi.json
