# ESPN Scraper - Scores, Odds, Standings & Tennis (`rjmacarthy/espn-scraper`) Actor

ESPN live scores, schedules, betting odds, standings, team lists, news, injuries and rankings for NFL, NBA, MLB, NHL, college, soccer, F1, golf, UFC - plus ATP/WTA tennis matches with set scores. Only-changed mode for live polling. No API key.

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

## Pricing

from $1.50 / 1,000 sports data rows

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?

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 Scraper - Live Scores, Schedules, Standings, Odds & Tennis

Get **live scores, results, schedules, betting odds, standings, teams, news, injuries and rankings** for every major league on ESPN - NFL, NBA, WNBA, MLB, NHL, college football and basketball, Premier League, La Liga, Bundesliga, Serie A, Ligue 1, MLS, Champions League, F1, PGA golf and UFC - plus **ATP and WTA tennis matches with set-by-set scores**. One Actor replaces a separate scores scraper, odds scraper and tennis scraper. It reads ESPN's public JSON API (no API key, no browser, no login), so runs are fast and cheap, and an **only-changed mode** makes it a live-score and odds feed when you schedule it every few minutes.

### What data can you get?

| Mode | One row per | Main fields |
|---|---|---|
| `scoreboard` (team sports) | game | date, status (`scheduled`/`in`/`final`) + detail (`Q3 4:12`, `Final/OT`), home/away team, score, record, winner, linescores, venue, city, attendance, TV, **odds** (provider, spread, over/under, moneylines), recap headline, ESPN link |
| `scoreboard` (tennis, UFC) | match / bout | tournament, draw (Men's Singles...), round, court, players with country and seed, **set scores with tiebreaks**, score text (`6-4 7-6(5)`), winner, result |
| `scoreboard` (golf, F1) | event / session | event, session (FP1, Race...), status, leaderboard (position, name, country, score) |
| `schedule` | game | a team's full season schedule and results |
| `standings` | team in a table | group (conference/division), rank, W/L/T, win %, games behind, points, goals/points for and against, streak, every ESPN column |
| `teams` | team | name, abbreviation, ESPN id, colours, logo, current record |
| `news` | article | headline, description, published date, byline, categories, image, URL |
| `injuries` | injured player | team, player, position, status (Out, Questionable...), injury, expected return, note |
| `rankings` | ranked team/player | poll (AP Top 25, CFP, Coaches, ATP, WTA), rank, previous rank, points, record |

Add **`includeSummary`** to get each game's box score: team stats, statistical leaders, betting lines and scoring plays.

### Use cases

- **Sports betting and odds tracking** - DraftKings spreads, totals and moneylines for every NFL/NBA/NHL/MLB/college game, polled with only-changed mode.
- **Live-score widgets, bots and apps** - schedule every 1-5 minutes and push only games whose score or status changed to Slack, Discord or your database.
- **Fantasy sports** - injury reports, box scores and leaders.
- **Tennis analytics** - every ATP/WTA match of a day or a tournament with seeds and set scores.
- **Sports data journalism and research** - historical results by date range, season schedules, standings snapshots, polls.

### How to use

1. Pick a **mode** and one or more **leagues**.
2. For `scoreboard`, set **dates**: `today`, `yesterday`, `tomorrow`, `20250115` or a range `20250101-20250107`.
3. Run. Results appear in the dataset; pick the *Games*, *Tennis & MMA matches*, *Standings*... view.

Last night's NBA and tennis results:

```json
{ "mode": "scoreboard", "leagues": ["nba", "atp", "wta"], "dates": "yesterday" }
```

This week's NFL odds:

```json
{ "mode": "scoreboard", "leagues": ["nfl"], "dates": "20261108-20261110" }
```

Live-score polling (schedule every 2 minutes; only new or changed games are output and charged):

```json
{ "mode": "scoreboard", "leagues": ["nba", "nhl"], "dates": "today", "onlyChanged": true, "stateKey": "live-nba-nhl" }
```

Box scores for a day of Premier League games:

```json
{ "mode": "scoreboard", "leagues": ["epl"], "dates": "20250115", "includeSummary": true }
```

A team's season schedule, standings, injuries, rankings:

```json
{ "mode": "schedule", "leagues": ["nba"], "teams": ["lal", "bos"], "season": 2025 }
{ "mode": "standings", "leagues": ["epl", "laliga"] }
{ "mode": "injuries", "leagues": ["nfl"] }
{ "mode": "rankings", "leagues": ["ncaaf", "atp", "wta"] }
```

**Leagues:** `nfl`, `ncaaf`, `nba`, `wnba`, `ncaab`, `ncaaw`, `mlb`, `nhl`, `mls`, `epl`, `laliga`, `bundesliga`, `seriea`, `ligue1`, `ucl`, `uel`, `atp`, `wta`, `f1`, `pga`, `lpga`, `ufc`. Any other ESPN league works as a raw `sport/league` path, e.g. `soccer/ned.1` (Eredivisie), `soccer/bra.1`, `soccer/mex.1`, `baseball/college-baseball`.

### Output example

A game (real output, NBA, 15 January 2025):

```json
{
  "type": "game",
  "id": "game:401705127",
  "gameId": "401705127",
  "league": "nba",
  "sport": "basketball",
  "name": "New York Knicks at Philadelphia 76ers",
  "date": "2025-01-16T00:00:00.000Z",
  "status": "final",
  "statusDetail": "Final/OT",
  "completed": true,
  "venue": "Xfinity Mobile Arena",
  "city": "Philadelphia",
  "attendance": 20088,
  "broadcast": "ESPN",
  "home": { "id": "20", "team": "Philadelphia 76ers", "abbreviation": "PHI", "score": 119, "record": "15-24", "winner": false, "rank": null, "linescores": [21, 26, 38, 24, 10] },
  "away": { "id": "18", "team": "New York Knicks", "abbreviation": "NY", "score": 125, "record": "27-15", "winner": true, "rank": null, "linescores": [30, 30, 25, 24, 16] },
  "odds": null,
  "headline": "Brunson scores 16 of his 38 points in 4th quarter and OT as Knicks beat 76ers 125-119",
  "url": "https://www.espn.com/nba/game/_/gameId/401705127/knicks-76ers",
  "summary": null,
  "scrapedAt": "2026-11-06T12:27:41.889Z"
}
```

Odds on an upcoming game (`spread` is the home team's line):

```json
"odds": { "provider": "DraftKings", "details": "KC -10", "spread": -10, "overUnder": 47.5, "homeMoneyline": -575, "awayMoneyline": 425 }
```

A tennis match:

```json
{
  "type": "match",
  "id": "match:153127",
  "league": "atp",
  "tournament": "Australian Open",
  "matchType": "Men's Singles",
  "round": "Round 2",
  "date": "2025-01-15T00:40:00.000Z",
  "status": "final",
  "court": "1573 Arena",
  "player1": { "id": "2952", "name": "Reilly Opelka", "country": "USA", "seed": null, "winner": false, "sets": [6, 6, 7, 6, 4] },
  "player2": { "id": "3811", "name": "Tomas Machac", "country": "Czechia", "seed": 26, "winner": true, "sets": [3, 7, 6, 7, 6] },
  "setScores": [{ "set": 1, "player1": 6, "player2": 3, "tiebreak": null }, { "set": 2, "player1": 6, "player2": 7, "tiebreak": 1 }, "..."],
  "score": "3-6 7-6(1) 6-7(5) 7-6(4) 6-4",
  "winner": "Tomas Machac",
  "result": "(26) Tomas Machac (CZE) bt Reilly Opelka (USA) 3-6 7-6 (7-1) 6-7 (5-7) 7-6 (7-4) 6-4",
  "url": "https://www.espn.com/tennis/scoreboard/tournament/_/eventId/154-2025/competitionType/1"
}
```

Every row has `type`, `id`, `league`, `sport`, `url` and `scrapedAt`. Missing values are `null`, never left out. A run summary (per-league status, request count, warnings) is saved as `RUN_SUMMARY` in the key-value store.

### Pricing

Pay per event - you pay only for rows you get:

| Event | Price | When |
|---|---|---|
| `record` | $0.0015 | each row (game, match, event, standing, team, article, injury, ranking) |
| `game-summary` | $0.003 | each game whose box-score summary was fetched (only with `includeSummary`) |

Examples: a full NBA night (10 games) ≈ **$0.015**; 1,000 rows ≈ **$1.50**; 100 games with box scores ≈ **$0.45**. In only-changed mode unchanged games cost nothing, so polling a slate of 15 games every few minutes costs only for the games that changed. Set **Maximum cost per run** in the run options: the Actor stops cleanly at your budget and never charges past it.

### Tips and limits

- **Max rows counts across all leagues**, in the order you list them. With `maxItems: 20` and `["nba", "atp"]`, NBA games come first and tennis fills the rest.
- **Dates are ESPN's US Eastern day** for `today`/`yesterday`/`tomorrow`. Ranges are fetched one day at a time (max 93 days); a 7-day range is 7 requests per league.
- **Tennis:** ESPN returns whole tournaments, so matches are filtered to the requested dates using their UTC start time. Grand Slam matches appear in both the ATP and WTA feeds; each match is output (and charged) once, under the first league you list.
- **Odds** appear only when ESPN shows a line - usually for upcoming games in US leagues and college sports. Past games and many soccer leagues have `odds: null`.
- **College scoreboards** (`ncaaf`, `ncaab`, `ncaaw`) include all Division I / FBS games, not just the Top 25.
- **Injuries** exist for NFL, NBA, WNBA, MLB and NHL; **rankings** for college football/basketball and ATP/WTA. Other leagues return no rows and the run says so.
- **Box scores** (`includeSummary`) are for team-sport games; tennis, golf and racing rows have no summary.
- `onlyChanged` compares the whole row (score, status, clock, odds...) with the last run that used the same `stateKey`. The first run outputs everything. `onlyNew` outputs only rows never seen before (useful for news and injuries).
- ESPN's API is unofficial and undocumented. If ESPN changes it, open an issue and it will be fixed quickly.

### FAQ

**Is it legal to scrape ESPN?**
The Actor reads only public data that ESPN's own website and apps load without login: scores, schedules, standings, odds and headlines. It collects no personal data beyond the public professional-athlete information ESPN publishes (names, positions, injury status). You are responsible for complying with ESPN's terms of use and the laws that apply to you, especially before redistributing data commercially.

**Do I need an API key?**
No. ESPN's site API is public; no key, account or cookies are used.

**Do I need a proxy?**
Usually not - ESPN's API answers Apify's datacenter IPs. If ESPN returns HTTP 403 or 429, enable Apify Proxy (datacenter). **Residential proxies are not supported:** if you select the RESIDENTIAL group, the Actor logs a warning and uses Apify datacenter proxy instead.

**How "live" are live scores?**
As live as ESPN's own scoreboard (seconds to a minute behind). Schedule the Actor every 1-5 minutes with `onlyChanged: true` to get a feed of score changes.

**Which sportsbook are the odds from?**
Whatever ESPN shows for that game, currently DraftKings for most US games (`odds.provider`).

**Why are scores null?**
The game has not started yet (ESPN reports 0-0; the Actor outputs `null` so you don't mistake it for a result).

**How do I find a team abbreviation?**
Run mode `teams` for the league; use `abbreviation` (e.g. `lal`, `kc`) or `teamId`.

### Integrations

- **API.** Start runs and fetch results with the [Apify API](https://docs.apify.com/api/v2), or the JavaScript and Python clients:

  ```bash
  curl -X POST "https://api.apify.com/v2/acts/rjmacarthy~espn-scraper/run-sync-get-dataset-items?token=YOUR_TOKEN" \
    -H "Content-Type: application/json" \
    -d '{"mode":"scoreboard","leagues":["nfl"],"dates":"today"}'
  ```

- **Schedules + webhooks.** Poll live scores every few minutes with `onlyChanged` and trigger your pipeline on each run.

- **Zapier, Make, n8n.** Send final scores or odds moves to Google Sheets, Slack, Discord or e-mail with no code.

- **Google Sheets, Airbyte, Keboola and more** through Apify integrations.

- **AI agents.** Use the Actor as a tool through the Apify MCP server ("what were last night's NBA scores?").

### Changelog

- **0.1** (November 2026) - First release: scoreboards with odds for 20+ leagues, tennis matches with set scores, golf/F1 leaderboards, UFC bouts, team schedules, standings, teams, news, injuries, rankings, box-score summaries, only-new / only-changed polling.

### Ready-to-run examples

- [NBA games today with betting odds: spreads and totals](https://apify.com/rjmacarthy/espn-scraper/examples/nba-games-today-betting-odds-espn)
- [Australian Open 2025 tennis results with set scores](https://apify.com/rjmacarthy/espn-scraper/examples/australian-open-2025-tennis-results)

### More scrapers by the same developer

- [Apple App Store Scraper: Apps, Search & Reviews](https://apify.com/rjmacarthy/app-store-scraper)
- [Google News Scraper: Articles, Publisher URLs & Full Text](https://apify.com/rjmacarthy/google-news-scraper)
- [Google Play Scraper: Apps, Search & Reviews](https://apify.com/rjmacarthy/google-play-scraper)
- [PDF to Markdown & Text Converter for LLMs and RAG](https://apify.com/rjmacarthy/pdf-to-markdown)
- [Roblox Games Scraper - Players, Visits, Charts & Stats](https://apify.com/rjmacarthy/roblox-games-scraper)
- [Substack Scraper](https://apify.com/rjmacarthy/substack-scraper)

Browse all my Actors on [my Apify Store profile](https://apify.com/rjmacarthy).

### Support

Missing a league, a field or a sport? Open an issue on the **Issues** tab with your input. Fixes are usually quick.

# Actor input Schema

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

scoreboard = games/matches on the chosen dates (scores, status, odds, tennis set scores). schedule = a team's season schedule. standings, teams, news, injuries (NFL/NBA/WNBA/MLB/NHL) and rankings (college polls, ATP/WTA) work per league.

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

League keys: nfl, nba, wnba, mlb, nhl, ncaaf, ncaab, ncaaw, mls, epl, laliga, bundesliga, seriea, ligue1, ucl, uel, atp, wta, f1, pga, lpga, ufc. Any other ESPN league works as a raw "sport/league" path, e.g. "soccer/ned.1" or "soccer/bra.1".

## `dates` (type: `string`):

today, yesterday, tomorrow (US Eastern time, like ESPN), a date like 20250115 or 2025-01-15, or a range like 20250101-20250107 (max 93 days; ESPN is queried once per day and league). Tennis tournaments are filtered to matches whose start time (UTC) falls on these dates.

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

For mode schedule: ESPN team abbreviations or ids, e.g. "lal", "kc", "bos". With several leagues selected, prefix the league: "nba:lal", "nfl:kc".

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

Season year for schedule, standings, teams and rankings, e.g. 2025. Empty = current season. ESPN names seasons by the year they end in for NBA/NHL/college basketball (2025-26 = 2026).

## `includeSummary` (type: `boolean`):

Fetch ESPN's game summary for every game row: team box-score stats, leaders, betting lines and scoring plays. One extra request per game and one extra 'game-summary' charge per game that has a summary.

## `onlyChanged` (type: `boolean`):

For scheduled runs: output only rows that are new or whose content changed since the last run with the same state key (score, status, odds...). Ideal for live-score and odds polling. Unchanged rows are not output or charged.

## `onlyNew` (type: `boolean`):

For scheduled runs: output only rows never output before with the same state key (e.g. new news articles or new injuries). Ignored when 'Only new or changed rows' is on.

## `stateKey` (type: `string`):

Name of the saved state used by 'only new / changed'. Use a different key for each schedule (letters, digits, - \_ .).

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

Maximum rows output in total across all leagues/teams (0 = no limit). Leagues are processed in the order given.

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

Usually not needed: ESPN's API answers datacenter IPs. If ESPN returns HTTP 403/429, enable Apify Proxy (datacenter). Residential proxies are not supported: if you pick the RESIDENTIAL group the Actor uses Apify datacenter proxy instead.

## Actor input object example

```json
{
  "mode": "scoreboard",
  "leagues": [
    "nba",
    "atp"
  ],
  "dates": "20250115",
  "includeSummary": false,
  "onlyChanged": false,
  "onlyNew": false,
  "stateKey": "default",
  "maxItems": 20,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

# Actor output Schema

## `games` (type: `string`):

Team-sport games: teams, scores, status, venue, broadcast and odds.

## `tennis` (type: `string`):

One row per match: players, seeds, set scores, winner.

## `standings` (type: `string`):

League tables per conference/division.

## `rankings` (type: `string`):

College polls and ATP/WTA rankings.

## `allFields` (type: `string`):

Every field of every row, including game summaries and golf/racing leaderboards.

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

Per-league status, counts, request statistics and warnings.

# 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 = {
    "mode": "scoreboard",
    "leagues": [
        "nba",
        "atp"
    ],
    "dates": "20250115",
    "maxItems": 20,
    "proxyConfiguration": {
        "useApifyProxy": false
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("rjmacarthy/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 = {
    "mode": "scoreboard",
    "leagues": [
        "nba",
        "atp",
    ],
    "dates": "20250115",
    "maxItems": 20,
    "proxyConfiguration": { "useApifyProxy": False },
}

# Run the Actor and wait for it to finish
run = client.actor("rjmacarthy/espn-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 '{
  "mode": "scoreboard",
  "leagues": [
    "nba",
    "atp"
  ],
  "dates": "20250115",
  "maxItems": 20,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}' |
apify call rjmacarthy/espn-scraper --silent --output-dataset

```

## MCP server setup

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