# ESPN Standings Scraper - NBA, NFL, MLB, NHL & Soccer Tables (`neverempty/espn-standings-scraper`) Actor

League tables for NBA, NFL, MLB, NHL, WNBA, college football and basketball, MLS and 16 soccer leagues: position, wins, losses, win %, games behind, points, goal or point difference, streak, home and road record, playoff seed. Current or past seasons, by league, conference or division.

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

## Pricing

from $1.06 / 1,000 standing row returneds

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?

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 Standings Scraper - NBA, NFL, MLB, NHL & Soccer Tables

**Get league standings as flat rows, one row per team: position, wins, losses, ties or draws, win %, games behind, points, playoff seed, points or goals for and against, streak, home and road record, for the NBA, NFL, MLB, NHL, WNBA, college football and basketball, MLS and 16 soccer leagues.** Pick the current season or a past one, and split the table by conference, by division or as one whole league.

Standings are the base of every power ranking, playoff-picture graphic, fantasy dashboard and betting model. This Actor puts the table for any of those leagues into a spreadsheet, database or bot in seconds, already in table order, so you do not have to copy it by hand or sort it yourself.

### What you get

- **The table, in order** - `position` inside each group (conference, division or league), ordered the way the standings are read: playoff seed in US leagues, rank in soccer, points in hockey.
- **The numbers people use** - `wins`, `losses`, `ties` (draws in soccer), `otLosses` (hockey), `winPercent`, `gamesBehind`, `points` (hockey and soccer), `playoffSeed`, `pointsFor`, `pointsAgainst`, `pointDifferential`, `streak`.
- **Records as text** - overall `record`, `home`, `road` and `lastTen` exactly as shown on the standings page ("12-3", "9-2-1").
- **Clinch codes and notes** - `clincher` (for example playoff spot or division clinched) and the standings `note` where the league shows one.
- **Every column, if you want it** - `allStats` carries every standings column for that league: conference and division records, average points for and against, games ahead, regulation and shootout wins in hockey, and more.
- **Team identity** - `team`, `abbreviation`, `teamId` and `teamLogo`, so rows join cleanly with scores, injuries or odds data.

### Leagues

| Sport | Short names |
|---|---|
| US and college | `nfl`, `nba`, `mlb`, `nhl`, `wnba`, `ncaaf`, `ncaab`, `mls` |
| Soccer | `epl`, `championship`, `laliga`, `bundesliga`, `seriea`, `ligue1`, `eredivisie`, `primeira`, `scotland`, `superlig`, `ligamx`, `brasileirao`, `argentina`, `jleague`, `aleague`, `ucl` |

Common names work as well: "Premier League", "La Liga", "Serie A", "college football", "Champions League".

### Why this Actor

- **Already sorted.** The raw standings feed does not list teams in table order (the NBA comes worst-first, MLB and MLS come mixed). Every row here has its real `position`, so the first row of each group is the leader.
- **Past seasons, safely.** Ask for `season: 2024` and you get the 2024 table. If a season does not exist yet, the source quietly sends the current one instead; this Actor notices and tells you in a free row rather than handing you the wrong year's table.
- **Conference, division or whole league** with one setting (`groupBy`).
- **Only the teams you follow.** `teams` takes names, nicknames, cities or abbreviations, and you pay only for the teams returned.
- **Every empty result explains itself** in a free row: an unknown league, a season that is not available, a team name that matched nothing, a refused or unreadable page.

### Input

| Field | What it does |
|---|---|
| `leagues` | One or more short names from the table above. |
| `season` | Empty = current season. NBA, NHL and college basketball name a season by the year it ends (2025 = 2024-25). NFL, MLB, WNBA, MLS and soccer use the year it starts (2025 = the 2025 season, or 2025-26 in European soccer). |
| `groupBy` | `conference` (default), `division` or `league`. Soccer leagues always come as the league splits them (one table, or the two MLS conferences). |
| `teams` | Only these teams. Empty = all. |
| `includeAllStats` | On (default) = add the `allStats` object with every standings column. |
| `maxRows` | Stop after this many team rows. |

Example:

```json
{
    "leagues": ["nba", "nfl", "epl"],
    "groupBy": "conference"
}
```

### Output

One row per team:

```json
{
    "league": "nba",
    "leagueName": "NBA",
    "season": 2027,
    "seasonName": "2026-27",
    "group": "Eastern Conference",
    "position": 1,
    "team": "Philadelphia 76ers",
    "abbreviation": "PHI",
    "wins": 12,
    "losses": 3,
    "winPercent": 0.8,
    "gamesBehind": null,
    "playoffSeed": 1,
    "pointsFor": 1711,
    "pointsAgainst": 1669,
    "pointDifferential": 42,
    "streak": "W3",
    "record": "12-3",
    "home": "6-2",
    "road": "6-1",
    "lastTen": "8-2",
    "status": "ok"
}
```

`gamesBehind` is `null` for the leader (shown as "-" on the standings page). A number the league does not use (for example `otLosses` in the NBA) is `null`.

#### Free rows

Rows with a `status` other than `ok` explain an empty or shorter result and are never charged:

| status | Meaning |
|---|---|
| `no-such-league` | A league name was not recognised, or the input had no league, a wrong `groupBy` or a season that is not a year. |
| `season-not-available` | There is no table for the season you asked for (the row says which season was available). |
| `no-standings` | The league answered with an empty table. |
| `no-filter-match` | None of the teams, or one of the team names, you asked for was found. |
| `blocked` | The standings page refused the request after three attempts, or robots.txt did not allow it. |
| `unreadable` | The page did not answer with a readable table. |
| `row-limit-reached` | `maxRows` was reached; the rest were not returned and not charged. |
| `budget-reached` | The run hit the maximum total charge you set; the rest were not returned and not charged. |

### Pricing

You pay per team row returned (`standing-returned`). A full NBA table is 30 rows, a Premier League table 20. Free rows are not charged, and there is no start fee.

### Tips

- Schedule a daily run during the season to keep a standings table fresh in Google Sheets or your database.
- Combine `groupBy: "division"` with `teams` to watch one division race.
- Use `season` to build a multi-year history: one run per season.

### More sports and odds data from the same developer

- [Live Sports Scores Scraper - NBA, NFL, MLB, NHL, NCAAF, EPL](https://apify.com/neverempty/sports-scores-api) — live, finished and upcoming games in one row shape
- [ESPN Injury Report Scraper & Change Monitor](https://apify.com/neverempty/espn-injury-report-scraper) — every current injury report, with a change monitor
- [Sports Betting Odds Scraper - NFL, NBA, MLB, Soccer, Line Moves](https://apify.com/neverempty/sports-betting-odds-scraper) — odds with line moves
- [Action Network Scraper - Public Betting Splits Monitor](https://apify.com/neverempty/action-network-betting-splits) — public betting splits: tickets % and money % per game
- [UFC Stats Scraper: MMA Fights, Fighters, Events, Round-by-Round](https://apify.com/neverempty/ufc-stats-scraper) — fight, fighter and round-by-round stats

### Thanks for using this Actor

If this Actor saved you time, a short review helps other people find it. If something does not work as expected, open an issue on the Actor page and it will be looked at.

# Actor input Schema

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

Which league tables to read. Use a short name: nfl, nba, mlb, nhl, wnba, ncaaf, ncaab, mls, epl, championship, laliga, bundesliga, seriea, ligue1, eredivisie, primeira, scotland, superlig, ligamx, brasileirao, argentina, jleague, aleague, ucl. Common names also work (Premier League, La Liga, Serie A, college football). A name that is not recognised comes back as a free row that says so.

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

Empty = the current season. NBA, NHL and college basketball name a season by the year it ends (2025 = 2024-25). NFL, MLB, WNBA, MLS and soccer use the year it starts (2025 = the 2025 season, or 2025-26 in European soccer). A season that is not available comes back as a free row that says so.

## `groupBy` (type: `string`):

How the table is split. Soccer leagues always come as the league splits them (one table, or the two MLS conferences). Each row says its group and its position inside that group.

## `teams` (type: `array`):

Empty = every team. Otherwise team names, nicknames, cities or abbreviations (Lakers, LAL, Arsenal, Kansas City Chiefs). Only matching teams are returned and charged.

## `includeAllStats` (type: `boolean`):

On = each row also carries allStats: every standings column for that league (conference and division records, last ten games, average points, clinch codes and more).

## `maxRows` (type: `integer`):

The run stops returning rows after this many. Rows that were read but not returned are not charged.

## Actor input object example

```json
{
  "leagues": [
    "nba",
    "nfl",
    "epl"
  ],
  "groupBy": "conference",
  "includeAllStats": true,
  "maxRows": 5000
}
```

# Actor output Schema

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

One row per team: league, season, group (conference or division), position, wins, losses, ties or draws, overtime losses, win %, games behind, points, playoff seed, points or goals for and against, difference, streak, overall, home and road record, last ten, clinch code and, if asked, every standings column. Empty results come back as free rows that say why.

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

// Run the Actor and wait for it to finish
const run = await client.actor("neverempty/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": [
        "nba",
        "nfl",
        "epl",
    ] }

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

```

## MCP server setup

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