# ESPN Group-Aware Standings Scraper (`w3crawler/espn-standings-scraper`) Actor

Extract public ESPN standings with official group identity, source-backed rank provenance, requested-season context, and fail-closed diagnostics.

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

## Pricing

from $2.99 / 1,000 standings

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.

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 Group-Aware Standings Scraper

Collect public ESPN standings rows for 16 football, basketball, baseball, hockey, and soccer league codes. Each saved row is one team standing inside an ESPN group, with group and conference identity, source-backed rank or seed, win-loss totals, scoring and home/road splits, and the exact ESPN endpoint used. Rank is never inferred from feed order.

### Get started

1. Open the [Actor Store page](https://apify.com/w3crawler/espn-standings) and select **Try for free**, or open the **Input** tab.
2. Choose one or more `leagues` and set the `season` you need.
3. Keep `maxItems` small for the first run; it limits unique teams across all selected leagues.
4. Start the Actor, open the dataset, and export the records as JSON, CSV, or Excel. Open **Run summary** (`OUTPUT`) to check rank coverage and counts.

### Input

`leagues` is required and is prefilled with the default list. The other fields are optional. Unsupported fields and out-of-range values are rejected before requests start.

| Field | Type | Required? | Default | Meaning |
| --- | --- | --- | --- | --- |
| `leagues` | string array | Required | `["nfl","nba","mlb","nhl","wnba","mls","epl","laliga"]` | ESPN league codes to query in sequence. Allowed: `nfl`, `nba`, `mlb`, `nhl`, `wnba`, `ncaaf`, `ncaam`, `ncaaw`, `mls`, `epl`, `laliga`, `ucl`, `bundesliga`, `seriea`, `ligue1`, `ligamx`. |
| `season` | integer | Optional | `2026` | ESPN season year to query through the public Core routes, 2000–2035. |
| `maxItems` | integer | Optional | `200` | Maximum unique team standings rows saved across all selected leagues, 1–1,000. |
| `requestDelayMs` | integer | Optional | `250` | Polite delay between sequential public ESPN requests, 0–5,000 ms. |

Default input:

```json
{
  "leagues": ["nfl", "nba", "mlb", "nhl", "wnba", "mls", "epl", "laliga"],
  "season": 2026,
  "maxItems": 200,
  "requestDelayMs": 250
}
```

The Actor reads ESPN Core standings, group metadata, and public team feeds. It accepts only the league codes above; arbitrary URLs, credentials, and proxy settings are not part of the input.

### Output

The dataset contains one row per unique team standing. A team that appears in more than one named group is emitted once per group, because rank is scoped to that group. Fields ESPN does not publish are omitted rather than inferred.

| Field | Type | Availability | Meaning |
| --- | --- | --- | --- |
| `recordType` | string | Always | Record type; always `espn-standing`. |
| `sourceName` | string | Always | Source label; `ESPN public standings API` in the saved run. |
| `sourceKind` | string | Always | `public-espn-api` for live collection. |
| `sourceUrl` | string | Always | Exact ESPN standings endpoint that supplied the row. |
| `league` | string | Always | ESPN league code, such as `nfl`. |
| `sport` | string | Always | ESPN sport path, such as `football`. |
| `season` | integer | Always | Season year used for the standings request. |
| `requestedSeason` | integer | Always | Season year supplied by the input. |
| `groupId` | string | Always | ESPN group identifier. |
| `groupName` | string | Always | Official group name, such as `National Football Conference`. |
| `groupLevel` | string | Always | `conference`, `division`, or `league`. |
| `conferenceName` | string | Always | Conference name when the group belongs to one. |
| `divisionName` | string | When published | Division name when ESPN metadata provides it; absent in the saved run. |
| `groupIdentitySource` | string | Always | `espn-group-metadata` or `standings-payload`. |
| `rank` | number | Always | Source-backed rank copied from an official rank, seed, or playoff-seed stat. |
| `rankSource` | string | Always | `official_standings_rank`, `official_standings_seed`, `official_standings_rank_stat`, or `playoff_seed`. |
| `rankScope` | string | Always | Rank scope; always `named_group`. |
| `teamId` | string | Always | ESPN team identifier. |
| `teamName` | string | Always | Team display name. |
| `teamLocation` | string | Always | Team location or market. |
| `teamAbbreviation` | string | Always | Team abbreviation, such as `MIN`. |
| `teamSlug` | string | Always | Team slug used in ESPN URLs. |
| `teamLogoUrl` | string | Always | Public team logo URL. |
| `overallSummary` | string | Always | Overall record, such as `6-0`. |
| `overallWinPercent` | number | Always | Overall win percentage from 0 to 1. |
| `wins` | number | Always | Wins reported by ESPN. |
| `losses` | number | Always | Losses reported by ESPN. |
| `ties` | number | Always | Ties reported by ESPN. |
| `gamesPlayed` | number | Always | Games played. |
| `pointsFor` | number | Always | Points scored. |
| `pointsAgainst` | number | Always | Points allowed. |
| `pointDifferential` | number | Always | Points for minus points against. |
| `homeSummary` | string | Always | Home record. |
| `roadSummary` | string | Always | Road record. |
| `conferenceSummary` | string | Always | Conference record. |
| `divisionSummary` | string | Always | Division record. |
| `statValues` | object | Always | Additional ESPN stat key/value pairs, stored as strings. |
| `scrapedAt` | string | Always | Time the row was saved, in ISO UTC. |

The example below is a real saved row from the 2026-10-25 run. `statValues` is shortened to ten entries for readability.

```json
{
  "recordType": "espn-standing",
  "sourceName": "ESPN public standings API",
  "sourceKind": "public-espn-api",
  "sourceUrl": "https://sports.core.api.espn.com/v2/sports/football/leagues/nfl/seasons/2026/types/2/groups/7/standings/0?lang=en&region=us",
  "league": "nfl",
  "sport": "football",
  "season": 2026,
  "requestedSeason": 2026,
  "groupId": "7",
  "groupName": "National Football Conference",
  "groupLevel": "conference",
  "conferenceName": "National Football Conference",
  "groupIdentitySource": "espn-group-metadata",
  "rank": 1,
  "rankSource": "playoff_seed",
  "rankScope": "named_group",
  "teamId": "16",
  "teamName": "Minnesota Vikings",
  "teamLocation": "Minnesota",
  "teamAbbreviation": "MIN",
  "teamSlug": "minnesota-vikings",
  "teamLogoUrl": "https://a.espncdn.com/i/teamlogos/nfl/500/min.png",
  "overallSummary": "6-0",
  "overallWinPercent": 1,
  "wins": 6,
  "losses": 0,
  "ties": 0,
  "gamesPlayed": 6,
  "pointsFor": 125,
  "pointsAgainst": 74,
  "pointDifferential": 51,
  "homeSummary": "3-0",
  "roadSummary": "3-0",
  "conferenceSummary": "4-0",
  "divisionSummary": "2-0",
  "statValues": {
    "playoffSeed": "1",
    "winPercent": "1.000",
    "pointDifferential": "+51",
    "streak": "W6",
    "avgPointsFor": "20.8",
    "avgPointsAgainst": "12.3",
    "divisionRecord": "2-0",
    "leagueWinPercent": "1.000",
    "points": "3.0",
    "OTWins": "0"
  },
  "scrapedAt": "2026-10-25T20:51:13.581Z"
}
```

### Run summary

**Run summary** is stored separately from the dataset in the run's key-value store under `OUTPUT` and `OUTPUT_SUMMARY`.

| Field | Meaning |
| --- | --- |
| `source` | Source label used by the run. |
| `status` | Actor outcome: `SUCCEEDED` or `FAILED`. |
| `runStatus` | Canonical run status; matches `status`. |
| `dataStatus` | Completeness of saved rows: `COMPLETE`, `PARTIAL`, `NO_RESULTS`, or `FAILED`. |
| `requestedItemCount` | Requested row limit. |
| `itemCount` | Unique standings rows saved. |
| `datasetItems` | Dataset item count reported by the Actor. |
| `diagnosticItems` | Diagnostic dataset rows; always `0`. |
| `uniqueTeamIds` | Unique team identifiers saved. |
| `diagnosticCount` | Operational issues recorded for the run. |
| `duplicateCount` | Duplicate standings rows removed. |
| `attemptedEndpoints` | Public ESPN endpoints attempted. |
| `leagues` | League codes queried, in input order, without duplicates. |
| `season` | Season year used for the request. |
| `requestedSeason` | Season year supplied by the input. |
| `seasonConvention` | Explanation of how `season` and `requestedSeason` relate. |
| `groupIdentityPolicy` | How group and conference names were sourced. |
| `rankPolicy` | Rule used to copy or omit rank. |
| `rankSourceCounts` | Counts by `rankSource`. |
| `rankUnavailableCount` | Rows for which ESPN supplied no official rank or seed. |
| `rankOrderValidated` | Whether the rank sequence passed the named-group validation. |
| `fixtureMode` | Whether bundled fixtures were used instead of live endpoints. |
| `finishedAt` | Time the summary was written, in ISO UTC. |

| Status | Data status | Meaning |
| --- | --- | --- |
| `SUCCEEDED` | `COMPLETE` | Eligible standings rows were saved without an extraction problem. |
| `SUCCEEDED` | `PARTIAL` | Some rows were saved, but a later group or league request failed. Saved rows remain available. |
| `SUCCEEDED` | `NO_RESULTS` | Requests completed cleanly but no standings rows were returned. |
| `FAILED` | `FAILED` | A fatal error occurred before any usable row was saved. |

Example `OUTPUT` from the saved 2026-10-25 run:

```json
{
  "source": "ESPN public standings API",
  "status": "SUCCEEDED",
  "runStatus": "SUCCEEDED",
  "dataStatus": "COMPLETE",
  "requestedItemCount": 5,
  "itemCount": 5,
  "datasetItems": 5,
  "diagnosticItems": 0,
  "uniqueTeamIds": 5,
  "diagnosticCount": 0,
  "duplicateCount": 0,
  "attemptedEndpoints": 3,
  "leagues": ["nfl"],
  "season": 2026,
  "requestedSeason": 2026,
  "seasonConvention": "For standings snapshots, season and requestedSeason both identify the ESPN season requested by the input.",
  "groupIdentityPolicy": "groupName, groupLevel, conferenceName, and divisionName are populated from official ESPN group metadata when available; generic standings payload identity is labeled as league scope.",
  "rankPolicy": "rank is copied only from an official standings rank, official seed, or playoffSeed stat within the named group; API iteration order is never used as rank.",
  "rankSourceCounts": {
    "playoff_seed": 5
  },
  "rankUnavailableCount": 0,
  "rankOrderValidated": true,
  "fixtureMode": false,
  "finishedAt": "2026-10-25T20:51:13.588Z"
}
```

### Coverage and limitations

The saved run requested the 2026 NFL season with `maxItems: 5`. It returned five teams from the NFC conference group, all ranked from ESPN's `playoffSeed` stat. The Actor preserves the official group boundary because a team can have a different rank in a division, conference, or league view.

League coverage depends on whether ESPN publishes a Core standings route for that code and season. NCAA and soccer competitions may use different group levels, and some groups have no official rank or seed, in which case `rank` is omitted and counted in `rankUnavailableCount`. The Actor does not label array order as rank, compute tiebreakers, or scrape arbitrary ESPN pages. Blocked, empty, or partial group responses are reported in the run summary instead of becoming rows; if earlier groups were saved, the run remains `SUCCEEDED` with `dataStatus: "PARTIAL"`.

### Usage and support

Apify compute and storage charges apply according to your account and run size. Each selected league can require multiple standings, group, and team requests, so start with one league and a small `maxItems`, inspect `OUTPUT`, then scale. See the Actor's Pricing tab for current rates.

Use the [Actor Issues page](https://apify.com/w3crawler/espn-standings/issues) to report a problem. Include the run ID, input, and run summary; do not include tokens, cookies, or private data. This Actor is not affiliated with, sponsored by, or endorsed by ESPN. Use it only for public data and in accordance with ESPN's terms, robots guidance, and applicable law.

# Changelog

This Actor's version history is a separate document: https://apify.com/w3crawler/espn-standings-scraper/changelog.md

# Actor input Schema

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

Supported ESPN league codes to query in sequence.

## `season` (type: `integer`):

Season year to query in ESPN Core.

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

Maximum number of unique team standings rows to save across all selected leagues.

## `requestDelayMs` (type: `integer`):

Polite delay between sequential public ESPN requests; bounded to 0-5000 milliseconds.

## Actor input object example

```json
{
  "leagues": [
    "nfl",
    "nba",
    "mlb",
    "nhl",
    "wnba",
    "mls",
    "epl",
    "laliga"
  ],
  "season": 2026,
  "maxItems": 200,
  "requestDelayMs": 250
}
```

# Actor output Schema

## `dataset` (type: `string`):

Dataset containing source-backed public ESPN standings rows only.

## `output` (type: `string`):

JSON summary for the run, including item counts and data availability.

## `runSummary` (type: `string`):

Run status and counters stored by the Actor.

# 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": [
        "nfl",
        "nba",
        "mlb",
        "nhl",
        "wnba",
        "mls",
        "epl",
        "laliga"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("w3crawler/espn-standings-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": [
        "nfl",
        "nba",
        "mlb",
        "nhl",
        "wnba",
        "mls",
        "epl",
        "laliga",
    ] }

# Run the Actor and wait for it to finish
run = client.actor("w3crawler/espn-standings-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": [
    "nfl",
    "nba",
    "mlb",
    "nhl",
    "wnba",
    "mls",
    "epl",
    "laliga"
  ]
}' |
apify call w3crawler/espn-standings-scraper --silent --output-dataset

```

## MCP server setup

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