# ESPN Sports Data: Scores, Box Scores, Odds & Standings (`tindacloud/espn-sports-data`) Actor

ESPN sports data for NFL, NBA, MLB, NHL, college sports, top soccer leagues and UFC: game scores and betting odds, player box scores, standings, rosters, injury reports and news.

- **URL**: https://apify.com/tindacloud/espn-sports-data.md
- **Developed by:** [Seungki Min](https://apify.com/tindacloud) (community)
- **Categories:** News, AI, Developer tools
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.00 / 1,000 records

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 Sports Data: Scores, Box Scores, Odds & Standings

Structured sports data from ESPN for the **NFL, NBA, MLB, NHL, WNBA, college football & basketball, the Premier League, LaLiga, Bundesliga, Serie A, Ligue 1, MLS, Liga MX, the Champions League and UFC**, all in one actor.

Choose leagues and data types, set a date range, and get clean rows ready for spreadsheets, databases, betting models, fantasy tools or AI agents.

### What you can collect

| Data type | One row per | Includes |
|---|---|---|
| **Games** | game | date, status, score by period, records, venue, attendance, TV, **betting odds** (spread, over/under, moneylines), stat leaders |
| **Box scores** | player per game | every stat column ESPN shows. Football groups are merged (`passing_YDS`, `rushing_TD`, …); soccer includes goals, assists, shots, saves, cards |
| **Standings** | team | wins, losses, ties, win %, games behind, points, seed + all standing stats |
| **Teams** | team | IDs, abbreviations, colors, logos, links |
| **Rosters** | player | position, jersey, age, date of birth, height, weight, birthplace, college, experience, status, injuries |
| **Injuries** | injury | status (Out/Questionable…), injury, body part, expected return, date, reporter comments |
| **News** | article | headline, summary, publish time, teams & athletes tagged, image, link |

**Games with future dates return the schedule with pre-game odds**, which is useful for pricing models and previews.

### Input example

```json
{
  "leagues": ["nfl", "nba", "eng.1"],
  "dataTypes": ["games", "boxScores", "injuries"],
  "startDate": "2026-09-13",
  "endDate": "2026-09-15",
  "teams": ["KC", "BUF", "Arsenal"],
  "maxResults": 5000
}
```

- **Dates:** `startDate` / `endDate` apply to games and box scores. Defaults are yesterday and today, and one run covers up to 400 days (e.g. a full season).
- **Teams:** `teams` accepts abbreviations or full names and is optional.
- **Season:** `season` selects a past season for standings.

### Output examples

**Finished game**

```json
{
  "recordType": "game",
  "league": "nba",
  "gameId": "401810723",
  "name": "San Antonio Spurs at New York Knicks",
  "date": "2026-03-01T18:00Z",
  "status": "Final",
  "home": {
    "name": "New York Knicks",
    "abbreviation": "NY",
    "score": 114,
    "winner": true,
    "record": "39-22",
    "linescores": [
      22,
      29,
      29,
      34
    ]
  },
  "away": {
    "name": "San Antonio Spurs",
    "abbreviation": "SA",
    "score": 89,
    "winner": false,
    "record": "43-17"
  },
  "venue": "Madison Square Garden",
  "attendance": 19812,
  "leaders": [
    {
      "team": "NY",
      "category": "Points",
      "player": "Mikal Bridges",
      "value": "25"
    },
    {
      "team": "NY",
      "category": "Rebounds",
      "player": "Karl-Anthony Towns",
      "value": "14"
    }
  ]
}
```

**Upcoming game with odds**

```json
{
  "recordType": "game",
  "league": "nfl",
  "gameId": "401872932",
  "name": "Detroit Lions at Buffalo Bills",
  "date": "2026-09-18T00:15Z",
  "status": "Scheduled",
  "odds": {
    "provider": "DraftKings",
    "details": "BUF -5.5",
    "spread": -5.5,
    "overUnder": 54.5,
    "overOdds": null,
    "underOdds": null,
    "homeMoneyline": -238,
    "awayMoneyline": 195,
    "homeFavorite": true
  }
}
```

**Player box score**

```json
{
  "recordType": "playerGameStats",
  "league": "nba",
  "gameId": "401810723",
  "date": "2026-03-01T18:00Z",
  "team": "SA",
  "opponent": "NY",
  "player": "Julian Champagnie",
  "position": "F",
  "starter": true,
  "stats": { "MIN": "24", "PTS": "3", "FG": "1-4", "3PT": "1-3", "REB": "4", "AST": "1", "+/-": "-20" }
}
```

ESPN removes pre-game odds from finished games, so collect upcoming dates if you need lines.

### Use cases

- **Sports betting & DFS models:** historical results, player stat lines and closing lines.
- **Fantasy tools:** box scores, injuries and rosters in one feed.
- **Media & newsletters:** daily scores, standings and headlines.
- **Analytics & research:** season-long datasets across many leagues.
- **AI agents & chatbots:** fresh, structured sports facts.

### Pricing

Pay per record (a game, a player's stat line, a standings row, …), plus a negligible start fee per run. Set **Max results** or a spending limit to cap cost.

### Notes

- Data comes from ESPN's public web endpoints. Availability of odds, leaders and stats varies by league and game.
- Very old seasons may have fewer fields.
- If something breaks after an ESPN change, open an issue and it will be fixed quickly.

# Actor input Schema

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

Leagues to collect.

## `dataTypes` (type: `array`):

What to collect. Games and box scores use the date range below; the others return current data.

## `startDate` (type: `string`):

First game day (YYYY-MM-DD). Default: yesterday. Upcoming dates return schedules with odds.

## `endDate` (type: `string`):

Last game day (YYYY-MM-DD). Default: today. Up to 400 days per run.

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

Limit to these teams by abbreviation or full name, e.g. “LAL”, “Boston Celtics”, “ARS”.

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

Season year for standings, e.g. 2025. Default: current season.

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

Stop after this many records. You are charged per record.

## `proxy` (type: `object`):

Apify datacenter proxy works for ESPN.

## Actor input object example

```json
{
  "leagues": [
    "nba"
  ],
  "dataTypes": [
    "games"
  ],
  "maxResults": 1000,
  "proxy": {
    "useApifyProxy": true
  }
}
```

# Actor output Schema

## `records` (type: `string`):

All collected records in a table view.

# 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"
    ],
    "dataTypes": [
        "games"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("tindacloud/espn-sports-data").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"],
    "dataTypes": ["games"],
}

# Run the Actor and wait for it to finish
run = client.actor("tindacloud/espn-sports-data").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"
  ],
  "dataTypes": [
    "games"
  ]
}' |
apify call tindacloud/espn-sports-data --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,tindacloud/espn-sports-data"
        }
    }
}
```

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/Bg7ocxm0rreooTjd0/builds/Zax61e5CI0smuWHXJ/openapi.json
