# ESPN Sports Scraper - Scores & Teams (`ninhothedev/espn-sports-scraper`) Actor

Scrape live scores, game results and team lists from ESPN across NFL, NBA, MLB, NHL, soccer and more. Clean JSON, no API key, fast.

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

## Pricing

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

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 Sports Scraper — Scores, Games & Teams (NFL, NBA, MLB, NHL, Soccer)

Scrape **live scores, game results and full team directories from ESPN** across the NFL, NBA, MLB, NHL, college sports and soccer leagues worldwide — as clean, structured JSON. **No API key. No login. No browser.** Just fast, datacenter-friendly requests against ESPN's public data endpoints.

Perfect for sports apps, betting/odds data pipelines, stats dashboards and fan sites.

***

### What it does

Two modes, one simple input:

| Mode | Returns |
|------|---------|
| `scoreboard` | Every game for a sport/league today, with home/away teams, live or final scores, status and kickoff date |
| `teams` | The full team directory for a league (name, abbreviation, location, logo) |

Point it at any ESPN sport + league combo and get back a flat, ready-to-use JSON array.

***

### Example input

```json
{
  "mode": "scoreboard",
  "sport": "football",
  "league": "nfl",
  "maxItems": 100
}
```

Get all NFL teams instead:

```json
{
  "mode": "teams",
  "sport": "football",
  "league": "nfl"
}
```

***

### Common sport / league combos

| Sport | League slug | Competition |
|-------|-------------|-------------|
| `football` | `nfl` | NFL |
| `football` | `college-football` | NCAA Football |
| `basketball` | `nba` | NBA |
| `basketball` | `wnba` | WNBA |
| `basketball` | `mens-college-basketball` | NCAA Basketball |
| `baseball` | `mlb` | MLB |
| `hockey` | `nhl` | NHL |
| `soccer` | `eng.1` | Premier League |
| `soccer` | `esp.1` | La Liga |
| `soccer` | `ita.1` | Serie A |
| `soccer` | `ger.1` | Bundesliga |
| `soccer` | `uefa.champions` | Champions League |

> Off-season? A league with no games scheduled that day returns an empty scoreboard — the actor tells you clearly and suggests trying another league (e.g. `basketball/nba`).

***

### Example output — `scoreboard`

```json
{
  "type": "game",
  "id": "401872656",
  "name": "New England Patriots at Seattle Seahawks",
  "date": "2026-09-10T00:20Z",
  "state": "post",
  "status_detail": "Final",
  "completed": true,
  "home_team": "Seattle Seahawks",
  "home_score": 24,
  "away_team": "New England Patriots",
  "away_score": 17,
  "league": "nfl",
  "scraped_at": "2026-07-04T12:00:00+00:00"
}
```

### Example output — `teams`

```json
{
  "type": "team",
  "id": "22",
  "name": "Arizona Cardinals",
  "abbreviation": "ARI",
  "location": "Arizona",
  "logo": "https://a.espncdn.com/i/teamlogos/nfl/500/ari.png",
  "league": "nfl",
  "scraped_at": "2026-07-04T12:00:00+00:00"
}
```

***

### Use cases

- **Sports apps** — power a live-scores screen or push notifications with fresh game data.
- **Betting & odds data** — a reliable base feed of fixtures, states and final scores for models and settlement.
- **Stats & analytics** — build historical datasets of results across multiple leagues.
- **Fan sites & content** — auto-update scoreboards, standings widgets and team pages.

***

### Pricing & cost

Roughly **$1 per 1,000 items** (games or teams) on top of Apify platform usage — plus a small per-run cost for input/output JSON. A single NFL scoreboard run (~16 games) or a teams run (32 teams) costs a fraction of a cent in items. Runs are fast and lightweight (512 MB).

***

### Why this actor?

- **No API key, no rate-limit paperwork** — uses ESPN's public JSON endpoints.
- **Datacenter-proxy friendly** — no residential proxy required, keeping costs low.
- **Clean, flat JSON** — every field typed and nullable; no nested spelunking.
- **Multi-sport in one actor** — NFL, NBA, MLB, NHL, college, soccer and more, just by changing two fields.

#### Comparison

| | This actor | Official ESPN API | Generic HTML scrapers |
|---|---|---|---|
| API key required | No | Deprecated / gated | No |
| Structured JSON | Yes | Partial | No (fragile HTML) |
| Multi-league | Yes | Varies | Rarely |
| Proxy cost | Low (datacenter) | — | High (residential) |

***

### Related actors

- [F1 Scraper](https://apify.com/ninhothedev/f1-scraper)
- [Sports Scraper](https://apify.com/ninhothedev/sports-scraper)
- [TVmaze TV Scraper](https://apify.com/ninhothedev/tvmaze-tv-scraper)
- [Deezer Music Scraper](https://apify.com/ninhothedev/deezer-music-scraper)

***

### Support

Questions, a league combo that isn't working, or a field you'd like added? Open an issue on the actor's Apify page and we'll respond quickly.

***

**Keywords:** espn scraper, sports scores api, nfl scores scraper, nba scores, mlb scores, nhl scores, soccer scores scraper, live sports data, sports betting data, team stats scraper, sports schedule api, football basketball baseball hockey data.

# Actor input Schema

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

What to scrape. 'scoreboard' returns games with live/final scores for the chosen sport & league. 'teams' returns the full team directory for that league.

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

ESPN sport slug. Common values: 'football' (NFL/college), 'basketball' (NBA/WNBA/college), 'baseball' (MLB), 'hockey' (NHL), 'soccer'. This is the first path segment of the ESPN API.

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

ESPN league slug (second path segment). Common combos -> football/nfl, football/college-football, basketball/nba, basketball/wnba, basketball/mens-college-basketball, baseball/mlb, hockey/nhl, soccer/eng.1 (Premier League), soccer/esp.1 (La Liga), soccer/uefa.champions.

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

Maximum number of games or teams to return. Default 100, hard cap 500.

## Actor input object example

```json
{
  "mode": "scoreboard",
  "sport": "football",
  "league": "nfl",
  "maxItems": 100
}
```

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

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

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

```

## MCP server setup

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