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

Get game scores, schedules and standings from ESPN for the NFL, NBA, WNBA, MLB, NHL, college football and basketball, MLS and top European soccer leagues: teams, scores, line scores, records, venue, broadcasts and odds when listed. Any date range.

- **URL**: https://apify.com/dariandanciu/espn-scores-standings-scraper.md
- **Developed by:** [Darian Danciu](https://apify.com/dariandanciu) (community)
- **Categories:** Automation, Developer tools, News
- **Security:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.50 / 1,000 result rows

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

Get **game scores, schedules and standings from ESPN** for the **NFL, NBA, WNBA, MLB, NHL**, college football and basketball, **MLS, Premier League, LaLiga, Bundesliga, Serie A, Ligue 1 and the Champions League**: teams, scores, line scores, records, venue, broadcasts and odds when ESPN lists them.

### Why this one

- **15 leagues, one format.** Mix NFL and Premier League in one run.
- **Any date range.** Past days give results; future days give the schedule.
- **Standings** with wins, losses, streaks, points for and against, and every stat ESPN shows.
- **Cheap and fast.** Uses ESPN's own scoreboard feeds. No browser.
- **You only pay for rows.** Failed leagues are listed in `RUN_SUMMARY` and cost nothing.

### Input

| Field | Example |
|---|---|
| Leagues | `nba`, `nfl`, `epl` |
| Data | Games or standings |
| Date from / to | `2026-11-01` / `2026-11-07` |

Every field is optional except **Leagues**.

### Output

One row per row. Example:

```json
{
    "source": "espn",
    "id": "nba:401909903",
    "league": "NBA",
    "gameId": "401909903",
    "name": "Boston Celtics at Orlando Magic",
    "shortName": "BOS @ ORL",
    "date": "2026-11-01T20:30:00.000Z",
    "status": "Final",
    "completed": true,
    "season": 2027,
    "seasonType": "regular-season",
    "week": null,
    "homeTeam": "Orlando Magic",
    "homeAbbr": "ORL",
    "homeScore": 97,
    "homeRecord": "2-4",
    "awayTeam": "Boston Celtics",
    "awayAbbr": "BOS",
    "awayScore": 108,
    "awayRecord": "5-1",
    "winner": "Boston Celtics",
    "homePeriods": [
        23,
        27,
        24,
        23
    ],
    "awayPeriods": [
        24,
        31,
        22,
        31
    ],
    "venue": "Kia Center",
    "city": "Orlando",
    "state": "FL",
    "attendance": 18236,
    "broadcasts": [
        "NBA League Pass"
    ],
    "odds": null,
    "overUnder": null,
    "oddsProvider": null,
    "url": "https://www.espn.com/nba/game/_/gameId/401909903/celtics-magic",
    "searchQuery": "nba"
}
```

Each row also has `searchQuery`: the search that found it. A summary of the run (rows per search, the site's total
for each search, and any searches that failed) is saved as `RUN_SUMMARY` in the key-value store.

Export to JSON, CSV, Excel or HTML from the Output tab, or use the API.

### Use cases

- **Sports apps and dashboards:** daily results and schedules.
- **Fantasy and analytics:** scores, line scores and standings over a season.
- **Content and newsletters:** this week's results for your league.

### Pricing

Pay per row. See the Pricing tab. Searches that fail are free.

### Good to know

- ESPN labels seasons by the year they end in some sports (the 2026-27 NBA season is `2027`).
- Odds appear only when ESPN shows them for a game, usually before it starts.
- Injury reports are not included: they are health details about named players.
- This Actor reads public scoreboards and standings only. It does not collect personal data.

### Feedback

Missing a field or a filter? Open an issue on the Issues tab.

### Related Actors

More sports and markets scrapers by the same developer, with the same pay-per-result pricing:

| Actor | What it gets |
|---|---|
| [Tennis Results & Odds Scraper](https://apify.com/dariandanciu/tennis-results-scraper) | ATP, WTA, Challenger and ITF results with set scores and odds |
| [Prediction Markets Scraper](https://apify.com/dariandanciu/prediction-markets-scraper) | Polymarket and Kalshi odds, volume and liquidity |

# Actor input Schema

## `searches` (type: `array`):

League codes, one per line: nfl, ncaaf, nba, wnba, ncaab, ncaaw, mlb, nhl, mls, epl, laliga, bundesliga, seriea, ligue1, ucl.

## `maxResultsPerSearch` (type: `integer`):

Stop each league after this many rows.

## `dataType` (type: `string`):

Games (scores and schedules) or standings.

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

First day of games (YYYY-MM-DD). Empty = 6 days ago. Future dates give the schedule.

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

Last day of games (YYYY-MM-DD). Empty = today (or the same day as "Date from").

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

Apify Proxy is recommended. If the site starts blocking, requests switch to residential proxies automatically.

## Actor input object example

```json
{
  "searches": [
    "nba",
    "nfl"
  ],
  "maxResultsPerSearch": 1000,
  "dataType": "games",
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

# Actor output Schema

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

One row per row.

## `summary` (type: `string`):

Rows per search, and any searches that failed (not charged).

# 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 = {
    "searches": [
        "nba",
        "nfl"
    ]
};

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

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

```

## MCP server setup

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