# ESPN Scraper - Scores, Fixtures & Teams (`goat255/espn-scraper`) Actor

Collect game results and fixtures across 18 leagues including the NBA, NFL, MLB, NHL and the major football leagues. One clean row per game with both sides' scores, records, venue, attendance and result.

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

## Pricing

$2.00 / 1,000 record scrapeds

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 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 Scraper

Game results and fixtures across 18 leagues. One clean row per game, with both sides' scores, records, venue and result. No login and no API key.

### What it does

- **18 leagues** including the NBA, NFL, MLB, NHL, WNBA, college basketball and football, the Premier League, La Liga, Bundesliga, Serie A, Ligue 1, MLS, the Champions League, ATP tennis, PGA golf, UFC and Formula 1.
- **Both sides flattened into columns** - home and away team, score, abbreviation, record and logo, so the output sorts and filters without unpacking anything.
- **Result worked out for you** - the winner and the margin, taken from the feed's own result rather than guessed from the scores.
- **Any date range** - walk day by day as far back as you want.
- **Venue, city, attendance** and whether it was a neutral site.
- **Broadcast channels** for each game.
- **Team list** on request, with venue and club colours.

Common uses: building a results dataset, sports analytics and modelling, tracking a team over a season, fixture monitoring, and adding results to a content site.

### Input

| Field | Type | Description |
|---|---|---|
| `leagues` | array | Which leagues to collect. |
| `dateFrom` | string | First day, `YYYY-MM-DD`. Defaults to seven days before the end date. |
| `dateTo` | string | Last day, `YYYY-MM-DD`. Defaults to today. |
| `completedOnly` | boolean | Only finished games with a final score. |
| `includeTeams` | boolean | Also return one row per team. |
| `maxResults` | integer | Total cap. Default 1000, up to 20000. |
| `proxyConfiguration` | object | Optional. Enable to spread requests across IPs. |

#### Example input

```json
{
  "leagues": ["basketball/nba", "soccer/eng.1"],
  "dateFrom": "2026-01-01",
  "dateTo": "2026-03-01",
  "completedOnly": true,
  "maxResults": 3000
}
```

### Output

Each item is one game.

```json
{
  "id": "400000001",
  "league": "basketball/nba",
  "type": "game",
  "name": "Example Visitors at Example Hosts",
  "shortName": "EXV @ EXH",
  "date": "2026-01-15T19:00:00Z",
  "status": "Final",
  "isCompleted": true,
  "statusDetail": "Final",
  "homeTeam": "Example Hosts",
  "homeAbbreviation": "EXH",
  "homeScore": 118,
  "homeRecord": "23-18",
  "homeLogo": "https://example.com/home.png",
  "awayTeam": "Example Visitors",
  "awayAbbreviation": "EXV",
  "awayScore": 110,
  "awayRecord": "20-21",
  "awayLogo": "https://example.com/away.png",
  "winner": "Example Hosts",
  "scoreDifference": 8,
  "venue": "Example Arena",
  "city": "Springfield",
  "state": "IL",
  "attendance": 13738,
  "isNeutralSite": false,
  "broadcast": ["Example Sports Network"],
  "season": 2026
}
```

Team rows use `type: "team"` with the club's name, abbreviation, location, venue, colour and logo.

### Notes

- No login and no API key. Pick a league and a date range and run.
- `winner` is only filled once a game is final, because that is when the feed reports it. Scheduled and in progress games return `null` rather than a guess.
- Games are deduplicated, so one that appears on two adjacent dates because of a timezone rollover is delivered once and charged once.
- Days with no fixtures are skipped rather than returned as empty rows.
- Different sports fill different fields. Attendance and records are common in team sports and often absent in individual ones.

### Privacy

To improve our actors we collect anonymized usage telemetry (run stats and input patterns). No personal account data is collected.

# Actor input Schema

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

Which leagues to collect. Each is walked separately across your date range.

## `dateFrom` (type: `string`):

First day to collect, format YYYY-MM-DD. Defaults to seven days before the end date.

## `dateTo` (type: `string`):

Last day to collect, format YYYY-MM-DD. Defaults to today.

## `completedOnly` (type: `boolean`):

Skip scheduled and in progress games, returning only finished ones with a final score.

## `includeTeams` (type: `boolean`):

Also return one row per team in each league, with venue and colours.

## `maxResults` (type: `integer`):

Total cap for the run.

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

Optional. Enable to spread requests across IP addresses.

## Actor input object example

```json
{
  "leagues": [
    "basketball/nba"
  ],
  "dateFrom": "2026-01-01",
  "dateTo": "2026-03-01",
  "completedOnly": false,
  "includeTeams": false,
  "maxResults": 1000
}
```

# Actor output Schema

## `records` (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 = {
    "leagues": [
        "basketball/nba"
    ]
};

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

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

```

## MCP server setup

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

```

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/Tw0lipC2qmktfbMMm/builds/GflYZYtFgTYFs3TS2/openapi.json
