# ESPN Scraper - Scores, Schedules, Betting Odds & Standings (`pink_comic/espn-scraper`) Actor

Get ESPN scores, schedules, betting odds (spread, total, moneyline, open lines) and standings for NFL, NBA, MLB, NHL, college and 20+ soccer leagues.

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

## Pricing

from $1.00 / 1,000 game or standings 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 - Scores, Schedules, Betting Odds & Standings

Get **live scores, schedules, results, betting odds and standings from ESPN** for the NFL, NBA, MLB, NHL, WNBA, college football and basketball, and 20+ soccer leagues (Premier League, La Liga, Bundesliga, Serie A, Ligue 1, MLS, Champions League...). One clean row per game with teams, scores, records, venue, TV, and **DraftKings lines: spread, total, moneyline - with opening lines**.

### Why this ESPN scraper

- **Odds included, not extra.** Spread and prices, over/under and prices, home/away/draw moneylines, plus opening spread, total and moneylines - flat price per game.
- **All major leagues in one run.** Friendly names (`nfl`, `premier-league`, `champions-league`) or any ESPN league code (`eng.2`, `soccer/usa.1`, `football/cfl`).
- **Any date range.** Upcoming schedule, live games or historical results (up to 400 days per run), filter by status or only games with odds.
- **Standings mode.** Conference/division/league tables with wins, losses, win %, games behind, points, streak and every stat ESPN has.
- **Full college coverage.** All FBS football and Division I basketball games, not just the Top 25.
- **Fair pricing.** $0.001 per row + $0.002 per run.

### Use cases

- **Sports betting models**: line movement (open vs current), results and scores for backtesting.
- **Fantasy and sports apps**: schedules, live scores and standings feeds.
- **Media and newsletters**: daily slates and results.
- **Data science**: historical results across seasons and leagues.
- **AI agents**: answer "who plays tonight and what's the line" with real data.

### Input examples

Yesterday to 3 days ahead for NFL, NBA and NHL (default):

```json
{ "leagues": ["nfl", "nba", "nhl"], "maxResults": 100 }
```

Upcoming games with betting lines only:

```json
{ "leagues": ["nfl", "college-football"], "status": "scheduled", "onlyGamesWithOdds": true, "maxResults": 300 }
```

A season of Premier League results:

```json
{ "leagues": ["premier-league"], "dateFrom": "2025-08-15", "dateTo": "2026-05-25", "status": "final", "maxResults": 400 }
```

Standings:

```json
{ "leagues": ["nba", "premier-league"], "mode": "standings" }
```

### Sample output

```json
{
  "league": "nfl",
  "name": "Indianapolis Colts at Houston Texans",
  "date": "2026-11-20T01:15Z",
  "status": "Scheduled",
  "statusDetail": "Thu, November 19th at 8:15 PM EST",
  "homeTeam": "Houston Texans",
  "homeRecord": "3-6",
  "awayTeam": "Indianapolis Colts",
  "awayRecord": "3-7",
  "oddsProvider": "DraftKings",
  "oddsDetails": "HOU -10.5",
  "favorite": "Houston Texans",
  "homeSpread": -10.5,
  "homeSpreadOdds": -108,
  "homeSpreadOpen": -5.5,
  "overUnder": 44.5,
  "overUnderOpen": 45.5,
  "overOdds": -105,
  "underOdds": -115,
  "homeMoneyline": -535,
  "awayMoneyline": 400,
  "homeMoneylineOpen": -238,
  "awayMoneylineOpen": 195,
  "venue": "Reliant Stadium",
  "venueCity": "Houston",
  "broadcasts": "Prime Video",
  "week": 11,
  "url": "https://www.espn.com/nfl/game/_/gameId/401873066/colts-texans"
}
```

### FAQ

**When do odds appear?** ESPN shows lines a few days before games; finished games keep the closing line where ESPN provides it. Use `onlyGamesWithOdds` to skip games without a line.

**Which dates are used?** Dates are US Eastern game days. Empty dates = yesterday through 3 days from now.

**Can I get live scores?** Yes - set status to "Live now" and schedule the actor every few minutes.

**How much does it cost?** $0.001 per row + $0.002 per run. A full NFL week with odds is about $0.02.

# Actor input Schema

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

nfl, nba, mlb, nhl, wnba, college-football, mens-college-basketball, womens-college-basketball, premier-league, la-liga, bundesliga, serie-a, ligue-1, mls, liga-mx, champions-league, europa-league... or any ESPN code like eng.2, soccer/usa.1, football/cfl.

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

Games (one row per game) or standings (one row per team).

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

YYYY-MM-DD (US Eastern). Empty = yesterday.

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

YYYY-MM-DD. Empty = 3 days from today (or 4 days after From date). Max range 400 days.

## `status` (type: `string`):

Optional filter (used when no search URL is given).

## `onlyGamesWithOdds` (type: `boolean`):

Skip games without a betting line (lines appear a few days before kick-off).

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

Maximum rows. Default 100 = about $0.10.

## Actor input object example

```json
{
  "leagues": [
    "nfl",
    "nba",
    "nhl"
  ],
  "mode": "games",
  "status": "any",
  "onlyGamesWithOdds": false,
  "maxResults": 100
}
```

# Actor output Schema

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

All records from this run in the default dataset, shown with the Overview 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": [
        "nfl",
        "nba",
        "nhl"
    ],
    "maxResults": 100
};

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

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

```

## MCP server setup

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