# ESPN Video Metadata and Renditions Scraper (`w3crawler/espn-video-metadata-scraper`) Actor

Collect public ESPN game video metadata and deduplicated source-backed media renditions; quality labels, dimensions, and bitrate are emitted only when explicitly provided by ESPN.

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

## Pricing

from $2.99 / 1,000 video metadata

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.

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 Video Metadata and Renditions Scraper

Collect public ESPN game-video metadata from official scoreboard and game-summary responses. Each saved row represents one video attached to an ESPN game and includes video identity, headline, description, duration, official page and media URLs, deduplicated renditions, game context, teams, venue, and geo/device restrictions when ESPN publishes them. The Actor collects metadata and links only, not media bytes.

### Get started

1. Open the [Actor Store page](https://apify.com/w3crawler/espn-video-metadata-scraper) and select **Try for free**, or open the **Input** tab.
2. Choose a `league` and, optionally, a single date or date range in `dates`.
3. Keep `maxGames`, `maxVideosPerGame`, and `maxItems` small for the first run.
4. Start the Actor, open the dataset, and export the records as JSON, CSV, or Excel. Open **Run summary** (`OUTPUT`) to check counts and media policy.

### Input

All fields are optional; the defaults below are ready to use. Unsupported field names and out-of-range values are rejected before requests start.

| Field | Type | Required? | Default | Meaning |
| --- | --- | --- | --- | --- |
| `league` | string enum | Optional | `nba` | ESPN league code. Allowed: `nba`, `nfl`, `nhl`, `mlb`, `nba-g-league`, `ncaaf`, `ncaab`, `mls`, `epl`, `laliga`, `bundesliga`, `seriea`, `ligue1`. |
| `dates` | string | Optional | Not supplied | One date or an inclusive range in `YYYYMMDD` or `YYYYMMDD-YYYYMMDD` form; ranges are capped at 31 days. |
| `maxGames` | integer | Optional | `10` | Maximum scoreboard games whose public summaries are inspected, 1–50. |
| `maxVideosPerGame` | integer | Optional | `5` | Maximum videos read from each game summary, 1–20. |
| `maxItems` | integer | Optional | `50` | Maximum source-backed video records saved; operational issues do not consume this limit, 1–500. |

Default input:

```json
{
  "league": "nba",
  "maxGames": 10,
  "maxVideosPerGame": 5,
  "maxItems": 50
}
```

The Actor reads the public ESPN scoreboard and game-summary routes for the selected league. It does not sign in, use a proxy, follow arbitrary URLs, or download video files.

### Output

The dataset contains one row per unique public video. Values are taken from the selected game summary and its named media sources. Missing values are omitted rather than inferred, and no diagnostic rows are written.

| Field | Type | Availability | Meaning |
| --- | --- | --- | --- |
| `recordType` | string | Always | Record type; always `espn-video`. |
| `sourceName` | string | Always | Source label; `ESPN public video API` in the saved run. |
| `sourceKind` | string | Always | Provenance marker; `public-espn-video-api` for live collection. |
| `sourceUrl` | string | Always | Exact ESPN game-summary endpoint that supplied the video. |
| `videoId` | string | Always | ESPN video identifier. |
| `cerebroId` | string | Always | ESPN media identifier used to build rendition URLs. |
| `headline` | string | Always | Video headline. |
| `description` | string | Always | Video description as published. |
| `durationSeconds` | number | Always | Published duration in seconds. |
| `videoPageUrl` | string | Always | Public ESPN video page. |
| `videoSeoUrl` | string | When published | SEO video URL when ESPN supplies a distinct one; absent in the saved run. |
| `preferredMediaUrl` | string | Always | Primary public playback URL selected from the named sources. |
| `renditions` | object array | Always | Deduplicated public renditions with `url`, `format`, and `sourceKeys`. |
| `thumbnailUrl` | string | Always | Public thumbnail URL. |
| `gameId` | string | Always | ESPN game identifier. |
| `gameUid` | string | Always | ESPN global game UID. |
| `gameName` | string | Always | Full game name. |
| `gameShortName` | string | Always | Short matchup name. |
| `gameDate` | string | Always | Game date and time in ISO UTC. |
| `gameStatus` | string | Always | ESPN status code, such as `STATUS_FINAL`. |
| `gameStatusDetail` | string | Always | Human-readable game status. |
| `gameCompleted` | boolean | Always | Whether ESPN reports the game as completed. |
| `seasonYear` | number | Always | ESPN season year. |
| `seasonType` | string | Always | ESPN season type number as a string. |
| `seasonSlug` | string | Always | Season label, such as `regular-season`. |
| `sport` | string | Always | ESPN sport path, such as `basketball`. |
| `league` | string | Always | ESPN league code used for the request. |
| `leaguePath` | string | Always | Sport/league path used in ESPN URLs. |
| `homeTeamId` | string | Always | ESPN home-team identifier. |
| `homeTeam` | string | Always | Home team display name. |
| `homeTeamAbbreviation` | string | Always | Home team abbreviation. |
| `homeTeamScore` | string | Always | Home score as published, stored as a string. |
| `homeTeamLogo` | string | Always | Public home-team logo URL. |
| `awayTeamId` | string | Always | ESPN away-team identifier. |
| `awayTeam` | string | Always | Away team display name. |
| `awayTeamAbbreviation` | string | Always | Away team abbreviation. |
| `awayTeamScore` | string | Always | Away score as published, stored as a string. |
| `awayTeamLogo` | string | Always | Public away-team logo URL. |
| `venue` | string | Always | Venue name. |
| `venueCity` | string | Always | Venue city. |
| `venueState` | string | Always | Venue state or region. |
| `neutralSite` | boolean | Always | Whether ESPN marks the site as neutral. |
| `geoRestrictionType` | string | Always | Geo-restriction mode reported by ESPN, such as `whitelist`. |
| `geoRestrictions` | array | Always | Country or region codes named by the restriction. |
| `deviceRestrictionType` | string | Always | Device-restriction mode reported by ESPN. |
| `deviceRestrictions` | array | Always | Device classes named by the restriction. |
| `videoSource` | string | Always | ESPN media source label, such as `espn`. |
| `originalPublishDate` | string | Always | Original publish time in ISO UTC. |
| `lastModified` | string | Always | Last media modification time in ISO UTC. |
| `embargoDate` | string | Always | Embargo time in ISO UTC when published. |
| `expirationDate` | string | Always | Media expiration time in ISO UTC. |
| `scrapedAt` | string | Always | Time the row was saved, in ISO UTC. |

The example below is a real saved row from the 2026-10-25 run. `renditions` is shortened to three entries; each entry contains only the fields shown.

```json
{
  "recordType": "espn-video",
  "sourceName": "ESPN public video API",
  "sourceKind": "public-espn-video-api",
  "sourceUrl": "https://site.api.espn.com/apis/site/v2/sports/basketball/nba/summary?event=401909853",
  "videoId": "50270835",
  "cerebroId": "6add34466170402baba48616",
  "headline": "Bobby Portis with the and-1 bucket",
  "description": "Bobby Portis with the and-1 bucket",
  "durationSeconds": 27,
  "videoPageUrl": "https://www.espn.com/video/clip/_/id/50270835/bobby-portis-1-bucket",
  "preferredMediaUrl": "https://espnmedia-cdn.akamaized.net/espn/media/16x9/wsc/2026/1024/41d0349a-4b1f-4fe6-bb29-99a3d9bc4d74/41d0349a-4b1f-4fe6-bb29-99a3d9bc4d74.mp4",
  "renditions": [
    {
      "url": "https://espnmedia-cdn.akamaized.net/espn/media/16x9/wsc/2026/1024/41d0349a-4b1f-4fe6-bb29-99a3d9bc4d74/41d0349a-4b1f-4fe6-bb29-99a3d9bc4d74.mp4",
      "format": "mp4",
      "sourceKeys": ["source.href", "source.HD", "source.full"]
    },
    {
      "url": "https://cmp-espn.media.dssott.com/opp/hls/espn/wsc/2026/1024/41d0349a-4b1f-4fe6-bb29-99a3d9bc4d74/41d0349a-4b1f-4fe6-bb29-99a3d9bc4d74/playlist.m3u8",
      "format": "hls",
      "sourceKeys": ["source.HLS", "source.HLS.href", "source.HLS.HD"]
    },
    {
      "url": "https://cmp-espn.media.dssott.com/opp/cmaf/espn/wsc/2026/1024/41d0349a-4b1f-4fe6-bb29-99a3d9bc4d74/41d0349a-4b1f-4fe6-bb29-99a3d9bc4d74/playlist.m3u8",
      "format": "hls",
      "sourceKeys": ["source.HLS.cmaf"]
    }
  ],
  "thumbnailUrl": "https://espnmedia-cdn.akamaized.net/espn/media/common/wsc/2026/1024/41d0349a-4b1f-4fe6-bb29-99a3d9bc4d74/41d0349a-4b1f-4fe6-bb29-99a3d9bc4d74.jpg",
  "gameId": "401909853",
  "gameUid": "s:40~l:46~e:401909853",
  "gameName": "Miami Heat at Charlotte Hornets",
  "gameShortName": "MIA @ CHA",
  "gameDate": "2026-10-24T22:00:00.000Z",
  "gameStatus": "STATUS_FINAL",
  "gameStatusDetail": "Final",
  "gameCompleted": true,
  "seasonYear": 2027,
  "seasonType": "2",
  "seasonSlug": "regular-season",
  "sport": "basketball",
  "league": "nba",
  "leaguePath": "basketball/nba",
  "homeTeamId": "30",
  "homeTeam": "Charlotte Hornets",
  "homeTeamAbbreviation": "CHA",
  "homeTeamScore": "115",
  "homeTeamLogo": "https://a.espncdn.com/i/teamlogos/nba/500/scoreboard/cha.png",
  "awayTeamId": "14",
  "awayTeam": "Miami Heat",
  "awayTeamAbbreviation": "MIA",
  "awayTeamScore": "110",
  "awayTeamLogo": "https://a.espncdn.com/i/teamlogos/nba/500/scoreboard/mia.png",
  "venue": "Spectrum Center",
  "venueCity": "Charlotte",
  "venueState": "NC",
  "neutralSite": false,
  "geoRestrictionType": "whitelist",
  "geoRestrictions": ["PR", "HN", "PY"],
  "deviceRestrictionType": "whitelist",
  "deviceRestrictions": ["settop", "tablet", "handset"],
  "videoSource": "espn",
  "originalPublishDate": "2026-10-24T22:42:15.000Z",
  "lastModified": "2026-10-24T22:42:22.000Z",
  "embargoDate": "2026-10-24T22:42:08.000Z",
  "expirationDate": "2027-07-31T04:00:00.000Z",
  "scrapedAt": "2026-10-25T20:51:31.340Z"
}
```

`renditions` entries contain `url`, `format`, and `sourceKeys`. The `preferredMediaUrl` is one of those rendition URLs, not a separately synthesized link.

### Run summary

**Run summary** is stored separately from the dataset in the run's key-value store under `OUTPUT` and `OUTPUT_SUMMARY`.

| Field | Meaning |
| --- | --- |
| `source` | Source label used by the run. |
| `status` | Actor outcome: `SUCCEEDED` or `FAILED`. |
| `runStatus` | Canonical run status; matches `status`. |
| `dataStatus` | Completeness of saved rows: `COMPLETE`, `PARTIAL`, `NO_RESULTS`, or `FAILED`. |
| `requestedItemCount` | Requested video-record limit. |
| `itemCount` | Video records saved. |
| `datasetItems` | Dataset item count reported by the Actor. |
| `diagnosticItems` | Diagnostic dataset rows; always `0`. |
| `uniqueVideoIds` | Unique video identifiers saved. |
| `diagnosticCount` | Operational issues recorded for the run. |
| `duplicateCount` | Duplicate videos removed. |
| `attemptedRequests` | Public scoreboard and game-summary requests attempted. |
| `mediaPolicy` | Rule used to deduplicate renditions and avoid inferred quality labels. |
| `league` | League code used for the run. |
| `fixtureMode` | Whether bundled fixtures were used instead of live endpoints. |
| `finishedAt` | Time the summary was written, in ISO UTC. |

| Status | Data status | Meaning |
| --- | --- | --- |
| `SUCCEEDED` | `COMPLETE` | Eligible videos were saved without an extraction problem. |
| `SUCCEEDED` | `PARTIAL` | Videos were saved, but a later game or summary request failed. Saved rows remain available. |
| `SUCCEEDED` | `NO_RESULTS` | Requests completed cleanly but no videos were found. |
| `FAILED` | `FAILED` | A fatal error occurred before any usable video was saved. |

Example `OUTPUT` from the saved 2026-10-25 run:

```json
{
  "source": "ESPN public video API",
  "status": "SUCCEEDED",
  "runStatus": "SUCCEEDED",
  "dataStatus": "COMPLETE",
  "requestedItemCount": 5,
  "itemCount": 5,
  "datasetItems": 5,
  "diagnosticItems": 0,
  "uniqueVideoIds": 5,
  "diagnosticCount": 0,
  "duplicateCount": 0,
  "attemptedRequests": 3,
  "mediaPolicy": "renditions are deduplicated by public URL; quality, dimensions, and bitrate are never inferred from a generic link key.",
  "league": "nba",
  "fixtureMode": false,
  "finishedAt": "2026-10-25T20:51:31.730Z"
}
```

### Coverage and limitations

The saved run inspected two NBA games with three videos per game and `maxItems: 5`, returning three videos from the first game summary and two from the second. The scoreboard determines which games are inspected, so a date with no events, a completed season, or a league without video modules can produce no rows. `dates` is limited to a 31-day range to keep requests bounded.

Renditions are keyed by their published URLs and named source keys. The Actor does not probe media files, measure bitrate or resolution, choose a "best" quality, or download the video. Geo- and device-restriction fields describe ESPN's metadata and do not mean the media is accessible from your location or device. Requests blocked by access controls, rate limits, or timeouts are recorded in the run summary rather than written as fake video rows.

### Usage and support

Cost is based on Apify compute plus one scoreboard request and up to one summary request per inspected game. Lower `maxGames` and `maxVideosPerGame` first; `maxItems` only caps saved videos after summaries are read. See the Actor's Pricing tab for current rates.

Use the [Actor Issues page](https://apify.com/w3crawler/espn-video-metadata-scraper/issues) to report a problem. Include the run ID, input, and run summary; do not include tokens, cookies, or private data. This Actor is not affiliated with, sponsored by, or endorsed by ESPN. Use it only for public metadata and in accordance with ESPN's terms, robots guidance, and applicable law.

# Changelog

This Actor's version history is a separate document: https://apify.com/w3crawler/espn-video-metadata-scraper/changelog.md

# Actor input Schema

## `league` (type: `string`):

ESPN league code queried through the public site API.

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

Optional date or inclusive date range in YYYYMMDD or YYYYMMDD-YYYYMMDD format; ranges are capped at 31 days.

## `maxGames` (type: `integer`):

Maximum scoreboard events whose public video summaries are inspected.

## `maxVideosPerGame` (type: `integer`):

Maximum videos read from each public game summary.

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

Maximum source-backed video records written to the dataset; operational issues do not consume the limit.

## Actor input object example

```json
{
  "league": "nba",
  "dates": "20260907",
  "maxGames": 10,
  "maxVideosPerGame": 5,
  "maxItems": 50
}
```

# Actor output Schema

## `dataset` (type: `string`):

Dataset containing source-backed video records with preferred media URLs and renditions only.

## `runSummary` (type: `string`):

OUTPUT key-value record written as an alias of OUTPUT_SUMMARY.

## `primaryRunSummary` (type: `string`):

OUTPUT_SUMMARY key-value record with the authoritative run status and counters.

## `sourceMetadata` (type: `string`):

SOURCE_METADATA key-value record describing the official public ESPN API source and transport.

# 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 = {};

// Run the Actor and wait for it to finish
const run = await client.actor("w3crawler/espn-video-metadata-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 = {}

# Run the Actor and wait for it to finish
run = client.actor("w3crawler/espn-video-metadata-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 '{}' |
apify call w3crawler/espn-video-metadata-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,w3crawler/espn-video-metadata-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/18pgIFtUHM5f8W7UO/builds/9UShSgRLhZWdeORMJ/openapi.json
