# ESPN Sports Scraper | $3.99 / 1k | (`glasswing/sports-scores-scraper`) Actor

Scrape ESPN scores, fixtures, teams and standings for the NFL, NBA, MLB, NHL and top soccer leagues. No API key needed. Export to CSV, JSON or Excel.

- **URL**: https://apify.com/glasswing/sports-scores-scraper.md
- **Developed by:** [Raffy](https://apify.com/glasswing) (community)
- **Categories:** Sports, News, Developer tools
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $3.99 / 1,000 results

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?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
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.
Actors are written with capital "A".

## 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.
The best way to integrate Actors is as follows.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).

# README

Get live scores, fixtures, team lists and league standings for the NFL, NBA, MLB, NHL and the major soccer leagues as clean structured rows — no API key, no browser, no scraper to maintain. It is the quickest way to put an NFL scores API behind your app, a full NBA standings feed into a dashboard, or a season of Premier League results into a model.

This Actor reads the same public JSON endpoints that espn.com's own web app calls and turns them into one flat row per game, team or standings entry. Pick a league and a resource, press start, and the rows land in a dataset you can download as JSON, CSV or Excel, or pull straight from the Apify API. Fifteen leagues share one schema, and every row carries a stable `teamId`, so scores, teams and standings join without fuzzy name matching.

**HTTP only.** No headless browser, so runs finish in seconds and cost very little platform time — the default run does 24 requests in about 7 seconds.

### What does this ESPN sports scraper do?

Each row is one **event** (a game or fixture), one **team**, or one **standings entry**. The `resource` field says which, so a dataset that mixes them stays readable.

- **Five sports, fifteen leagues, one schema.** NFL, NBA, MLB, NHL, WNBA, NCAA football and basketball, plus the Premier League, LaLiga, Serie A, Bundesliga, Ligue 1, Champions League, Europa League and MLS. Any other ESPN league works too — paste its endpoint into the URL list.
- **Scores and fixtures.** A scoreboard call returns a whole day, a date range or an entire calendar year in one request, with status, live or final scores, venue, broadcaster and attendance.
- **Standings data.** Wins, losses, ties, win percentage, table points, points for and against, games behind, rank and playoff seed for each team in the table.
- **Enriched team rows.** Each team is followed up with one extra call, so you get its division, current record and home venue, not just its name.
- **Honest rows.** Every row says whether it is real data (`ok`), a request ESPN had nothing for (`not_found`) or a request that failed (`error`). You are only billed for `ok`.

#### Result status (tri-state output)

| `status` | Meaning | Billed |
|---|---|---|
| `ok` | Data was extracted. | Yes |
| `not_found` | ESPN answered, but there is nothing to report — a day with no games, a season with no table. | No |
| `error` | The endpoint could not be read after retries (network error, HTTP error, unexpected format), or an input entry was not an ESPN URL. `error` says why. | No |

### Use cases for ESPN scores and standings data

- **Sports apps and score widgets.** A developer schedules a scoreboard run every 10-15 minutes and renders `homeTeam`, `awayTeam`, `homeScore`, `awayScore` and `eventStatus` as a live scoreboard, without paying for a commercial feed or maintaining a scraper.
- **Fantasy league tools.** A fantasy platform pulls the weekly fixture list with `week` and `startDate`, joins it to team rows on `teamId`, and locks rosters against the real kick-off times instead of a hand-maintained calendar.
- **Betting and forecasting models.** A quant pulls a whole season of `resource: events` history plus standings (`wins`, `losses`, `pointsFor`, `pointsAgainst`, `streak`) to build the features a win-probability or totals model needs.
- **Media and newsroom dashboards.** A sports desk keeps a live table of every league it covers, so an editor sees the current `rank` and `record` of any team without opening fifteen browser tabs.
- **Analytics and BI reporting.** An analyst loads standings and results into BigQuery or a spreadsheet each morning to track a club's form, attendance and home-away splits over a season.
- **AI agents and chatbots.** An assistant answering "who won last night?" calls the Actor for one date, gets flat JSON with an explicit `status`, and can tell "no games today" apart from "the request failed" without guessing.

### What data you get from every row

Fields that do not apply to a row are simply absent — never filled with a placeholder or a zero.

#### Every row

| Field | Type | Description |
|---|---|---|
| `url` | string | Link to the ESPN page for this row: the game page for an event, the team page for a team or standings row. |
| `status` | string | `ok`, `not_found` or `error` — see the table above. |
| `error` | string | Why a `not_found` or `error` row looks the way it does. Absent on `ok` rows. |
| `scrapedAt` | string | ISO 8601 timestamp of extraction. |
| `resource` | string | `events`, `teams` or `standings`. |
| `league` | string | League slug as ESPN uses it: `nfl`, `nba`, `mlb`, `nhl`, `eng.1`, `uefa.champions`, ... |
| `leagueName` | string | Human-readable league name, e.g. `National Football League`. |
| `season` | integer | Season year as ESPN labels it. A 2025-26 European season is season `2025`. |

#### Scores and fixtures (`resource: events`)

| Field | Type | Description |
|---|---|---|
| `eventId` | string | ESPN event (game) id. |
| `eventName` | string | Full event name, e.g. `New Orleans Saints at Atlanta Falcons`. |
| `shortName` | string | Short event name, e.g. `NO @ ATL`. |
| `week` | integer | Week number (NFL, college football) or matchday, when the league publishes one. |
| `startDate` | string | Kick-off / first pitch, ISO 8601 UTC. |
| `eventStatus` | string | `scheduled`, `in progress`, `final`, `postponed`, `canceled`, `delayed` or `other`. |
| `statusDetail` | string | ESPN's own wording, e.g. `Final`, `Full Time`, `9/9 - 8:20 PM EDT`. |
| `homeTeam` | string | Home team display name. |
| `homeTeamId` | string | ESPN id of the home team — the join key to team and standings rows. |
| `homeAbbreviation` | string | Home team abbreviation, e.g. `ATL`. |
| `homeScore` | number | Home score. Absent while the event is still `scheduled`, so an unplayed game is never reported as 0-0. |
| `awayTeam` | string | Away team display name. |
| `awayTeamId` | string | ESPN id of the away team. |
| `awayAbbreviation` | string | Away team abbreviation, e.g. `NO`. |
| `awayScore` | number | Away score. Absent while the event is still `scheduled`. |
| `broadcast` | string | Broadcaster(s) ESPN lists for the event, comma separated. |
| `attendance` | integer | Reported attendance, when published. |

#### Teams (`resource: teams`)

| Field | Type | Description |
|---|---|---|
| `teamId` | string | ESPN team id; the same id links events, teams and standings rows. |
| `name` | string | Team display name, e.g. `Atlanta Falcons`. |
| `abbreviation` | string | Team abbreviation, e.g. `ATL`. |
| `location` | string | Team location or market, e.g. `Atlanta`. |
| `logoUrl` | string | Team logo (PNG) URL. |
| `conference` | string | Conference or top-level standings group, e.g. `American Football Conference`. |
| `division` | string | Division or standings group, e.g. `NFC South`, `League Phase`. |
| `record` | string | Win-loss record as ESPN prints it, e.g. `14-3` or `26-7-5`. |
| `detailError` | string | Present only when the optional per-team detail call failed; the row is kept without those extra fields. |

#### Venue (events, and the home venue on team rows)

| Field | Type | Description |
|---|---|---|
| `venue` | string | Venue name: the stadium of the event, or the team's home ground. |
| `city` | string | Venue city. |
| `state` | string | Venue state or region, where ESPN publishes one. |
| `country` | string | Venue country. |

#### Standings (`resource: standings`)

Standings rows also carry `teamId`, `name`, `abbreviation`, `location`, `logoUrl`, `conference`, `division` and `record` from the table above.

| Field | Type | Description |
|---|---|---|
| `rank` | integer | Position inside the standings group, 1 = top of that table. |
| `playoffSeed` | integer | Playoff seed, for the leagues that publish one. |
| `wins` | number | Wins in the standings row. |
| `losses` | number | Losses in the standings row. |
| `ties` | number | Ties or draws in the standings row. |
| `winPercent` | number | Win percentage as ESPN publishes it (0-1). |
| `points` | number | Table points, for soccer and hockey standings. |
| `pointsFor` | number | Points, goals or runs scored. |
| `pointsAgainst` | number | Points, goals or runs conceded. |
| `gamesBehind` | number | Games behind the group leader. |
| `gamesPlayed` | number | Games played. |
| `streak` | number | Current streak as a signed number: `3` = three wins, `-2` = two losses. |

### How to scrape ESPN scores, teams and standings

1. Click **Try for free** (or open the Actor from your Apify console).
2. Choose a **Resource** (`scoreboard`, `teams` or `standings`) and a **League**. That is enough for most runs.
3. Optionally paste **ESPN API URLs** instead — the URL list wins over the Resource/League fields when it is not empty.
4. Set **Maximum results** to cap both the dataset size and your spend.
5. Click **Start**. The default input finishes in about 7 seconds; a season-wide scoreboard with 500 rows takes well under a minute.
6. Download the dataset as JSON, CSV, Excel or XML, or read it from the Apify API. You can also schedule the Actor to run every hour or every morning.

#### What you can paste into "ESPN API URLs"

| You paste | The Actor fetches |
|---|---|
| `https://site.web.api.espn.com/apis/site/v2/sports/football/nfl/scoreboard?dates=20260104` | that endpoint, unchanged |
| `https://site.api.espn.com/...` | the same path on `site.web.api.espn.com`, which answers every client |
| `https://www.espn.com/nba/standings` | the NBA standings endpoint |
| `https://www.espn.com/soccer/table/_/league/esp.1` | the LaLiga standings endpoint |
| `nfl`, `epl`, `champions-league` | that league, for the resource you selected |
| anything that is not an ESPN URL | nothing — one free `error` row explains it was skipped |

### Input

| Field | Type | Default | When to change it |
|---|---|---|---|
| `startUrls` | array of strings | one NFL teams URL: `https://site.web.api.espn.com/apis/site/v2/sports/football/nfl/teams?limit=1000` | Paste ESPN endpoints, espn.com pages or bare league slugs when you want an exact endpoint or a league that is not in the dropdown. Clear the list to let `resource` + `league` build the URL for you. |
| `resource` | select | `scoreboard` | Switch to `teams` for a league's team list, or `standings` for the league table. Used only when the URL list is empty. |
| `league` | select | `nfl` | Pick the league you want: `nfl`, `nba`, `mlb`, `nhl`, `wnba`, `college-football`, `mens-college-basketball`, `eng.1`, `esp.1`, `ita.1`, `ger.1`, `fra.1`, `uefa.champions`, `uefa.europa`, `usa.1`. |
| `date` | string | empty | Scoreboard only. Set `YYYYMMDD` for one day's scores, `YYYYMMDD-YYYYMMDD` for a range, or `YYYY` for a whole year of fixtures. Empty means the current calendar year, which always contains games. |
| `season` | integer | empty | Set it to pull a past season, e.g. `2025`. Standings read it as ESPN's season year; the scoreboard uses it as the calendar year when no `date` is given. |
| `maxItems` | integer | `20` | Raise it for a full league or a season history — this is also your spending cap, since each `ok` row is one billable result. |
| `proxyConfiguration` | object | off | Leave off; these endpoints answer datacenter IPs directly. Enable Apify Proxy (datacenter group) only if your runs start getting blocked. |

```json
{
    "startUrls": [],
    "resource": "standings",
    "league": "eng.1",
    "season": 2025,
    "maxItems": 20,
    "proxyConfiguration": { "useApifyProxy": false }
}
```

#### Why the default input is a team list, not today's scoreboard

A scoreboard for one specific day returns nothing when nobody plays that day — off days, off seasons, international breaks. A default like that would produce an empty dataset on a random Tuesday. The prefilled default therefore asks for the **NFL team list**, which is date-independent and returns 32 teams every day of the year. When you do run a scoreboard without a `date`, the Actor asks for the whole current calendar year for the same reason, so you always get fixtures back.

### Output

One row per event, team or standings entry. Real rows from runs of this Actor:

```json
[
    {
        "url": "https://www.espn.com/nfl/team/_/name/atl/atlanta-falcons",
        "status": "ok",
        "scrapedAt": "2026-09-08T12:57:56.180Z",
        "resource": "teams",
        "league": "nfl",
        "leagueName": "National Football League",
        "season": 2026,
        "teamId": "1",
        "name": "Atlanta Falcons",
        "abbreviation": "ATL",
        "location": "Atlanta",
        "logoUrl": "https://a.espncdn.com/i/teamlogos/nfl/500/atl.png",
        "division": "NFC South",
        "record": "0-0",
        "venue": "Mercedes-Benz Stadium",
        "city": "Atlanta",
        "state": "GA",
        "country": "USA"
    },
    {
        "url": "https://www.espn.com/soccer/match/_/gameId/740780/fulham-crystal-palace",
        "status": "ok",
        "scrapedAt": "2026-09-08T12:58:18.415Z",
        "resource": "events",
        "league": "eng.1",
        "leagueName": "English Premier League",
        "season": 2025,
        "eventId": "740780",
        "eventName": "Fulham at Crystal Palace",
        "shortName": "FUL @ CRY",
        "startDate": "2026-01-01T17:30:00.000Z",
        "eventStatus": "final",
        "statusDetail": "FT",
        "homeTeam": "Crystal Palace",
        "homeTeamId": "384",
        "homeAbbreviation": "CRY",
        "homeScore": 1,
        "awayTeam": "Fulham",
        "awayTeamId": "370",
        "awayAbbreviation": "FUL",
        "awayScore": 1,
        "venue": "Selhurst Park",
        "city": "London",
        "country": "England",
        "broadcast": "Peacock",
        "attendance": 25111
    },
    {
        "url": "https://www.espn.com/nba/team/_/name/bos/boston-celtics",
        "status": "ok",
        "scrapedAt": "2026-09-08T13:05:26.529Z",
        "resource": "standings",
        "league": "nba",
        "leagueName": "National Basketball Association",
        "season": 2026,
        "teamId": "2",
        "name": "Boston Celtics",
        "abbreviation": "BOS",
        "conference": "Eastern Conference",
        "division": "Atlantic",
        "rank": 1,
        "playoffSeed": 2,
        "wins": 56,
        "losses": 26,
        "winPercent": 0.68292683,
        "pointsFor": 9418,
        "pointsAgainst": 8787,
        "gamesBehind": 0,
        "streak": 2
    },
    {
        "url": "https://site.web.api.espn.com/apis/site/v2/sports/hockey/nhl/scoreboard?dates=20260908",
        "status": "not_found",
        "error": "No results for this page",
        "scrapedAt": "2026-09-08T13:07:11.902Z"
    }
]
```

### How much does it cost to scrape ESPN data?

This Actor uses **pay per event** pricing. You pay for the run start and for each saved result; platform compute is included.

| Event | Price | Charged when |
|---|---|---|
| Actor start | $0.005 | Once per run (Apify charges one event per GB of memory, minimum one; the 1 GB default is one event). |
| Result | $0.00399 | Per record with `status: ok` saved to the dataset — one event, one team or one standings row. |

That is **$3.99 per 1,000 records** plus half a cent per run. Rows with `status` `not_found` or `error` are **never charged**: a scoreboard for a day with no games costs you nothing but the run start. The free Apify plan's $5 of monthly credit covers about 1,250 records in a single run. You can cap spending per run with **Maximum results** and with the run's **Max total charge** option.

### How it compares

This Actor is a fast, cheap, no-key way to get the sports data that ESPN already publishes: scores, fixtures, teams and league tables, across fifteen leagues in a single schema. Because it is HTTP-only and one scoreboard call can return an entire season, a large pull is a handful of requests rather than thousands, and you are billed per row you keep rather than per month.

It is not a replacement for a commercial sports data feed. There are no box scores, no play-by-play, no player statistics, no rosters, no injury reports and no odds. Latency is polling-based, so it suits a dashboard refreshed every few minutes rather than a live in-play betting screen. And the endpoints are unofficial, so a team that needs a contractual uptime guarantee should buy a licensed feed instead.

### Integrations, API and AI agents

Results export to **CSV, JSON, Excel and XML** from the Apify console, or flow straight into **Google Sheets, Airtable, Slack or a CRM** through Apify integrations and webhooks — including Make, Zapier and n8n. Schedule a run every 10-15 minutes for live scores, or every morning for standings.

The Actor can be called from the **Apify API**, from any Apify client library, from the **Apify MCP server**, or by any AI agent that can call an HTTP endpoint. Every row carries a `status` column, so an agent can tell "no games today" apart from "the request failed".

### Tips

- **One request, many rows.** A scoreboard call returns the whole day, range or year at once, so a 500-row season history costs one HTTP request, not 500.
- **Use `date` ranges.** `20260101-20260131` gives you a month of fixtures in a single call; `2026` gives the whole calendar year.
- **Join on `teamId`.** The same id appears on event rows (`homeTeamId`, `awayTeamId`), team rows and standings rows.
- **Schedule it.** For a live scoreboard, schedule a run every 10-15 minutes with `date` set to today and a small `maxItems`.
- **Watch `eventStatus`.** Only rows with `final` are settled results; `in progress` scores change between runs.

### Limitations

- These endpoints are **public but undocumented**. ESPN does not publish or support them and can change or remove a field at any time; when that happens rows come back as `error` and the Actor is updated (report it in the **Issues** tab with the run ID).
- **Coverage varies by league.** Divisions, table points, attendance, broadcast and week numbers only appear where ESPN publishes them — a soccer table has no `week`, an NBA table has no table `points`.
- **The scoreboard is date-dependent.** A day with no games returns one `not_found` row, and a run with no `ok` rows at all is marked failed on purpose so a scheduled job cannot fail silently. Use a date range, a whole year, or the `teams` / `standings` resources when you need a guaranteed result.
- **College leagues are large.** ESPN lists 700+ college football teams; raise `maxItems` accordingly, and expect one extra request per team row.
- **Team rows cost two requests each** (list plus a detail call for record, division and venue). Everything else is far cheaper than one request per row.
- **No box scores, play-by-play, odds or rosters** in this version — the Actor covers events, teams and standings. `sports.core.api.espn.com` reference-style URLs are not accepted.
- Results reflect what ESPN published at the time of the run.

### FAQ

**Is it legal to scrape ESPN data?** Scraping publicly available data is generally legal, but you are responsible for how you use the output. Read the legal notice below and ESPN's terms of service, and do not redistribute content in ways those terms forbid.

**Do I need an ESPN API key or an account?** No. The endpoints this Actor reads need no key and no login. You only pay Apify for the run.

**Which leagues and sports are supported?** The dropdown covers NFL, NBA, MLB, NHL, WNBA, NCAA football, NCAA men's basketball, the English Premier League, LaLiga, Serie A, Bundesliga, Ligue 1, the Champions League, the Europa League and MLS. Any other ESPN league works too — paste its endpoint into **ESPN API URLs**.

**Can I get live scores, or only finished games?** Both. A scoreboard run returns whatever ESPN shows at that moment: `eventStatus` is `scheduled`, `in progress` or `final`, and `homeScore` / `awayScore` update between runs until the game is settled. Schedule a run every 10-15 minutes for a near-live feed.

**Can I pull a whole past season?** Yes. Set `date` to a year (`2025`) or a range (`20250101-20250630`), or set `season` for standings. One call returns the whole span, so a season of fixtures is one request.

**Can I use this Actor from an AI agent or MCP client?** Yes. It is a standard Apify Actor, so it can be called from the Apify API, from the Apify MCP server, or from any agent framework that can call an HTTP API. Every row carries `status`, so an agent can tell "no games today" apart from "the request failed".

**Why did I get fewer rows than `maxItems`?** Either the league has fewer records than you asked for (a table has 20 teams, a matchday has 10 fixtures), or the run reached its charge limit. The run log's final line always reports how many rows were saved and why it stopped.

**What if a field is missing?** Optional fields are omitted when ESPN does not publish them for that row. If a field that should always be present is missing, open an issue in the **Issues** tab with the run ID.

### Legal and data-protection notice

This Actor reads only data that ESPN publishes publicly; it does not log in, does not use credentials, and does not attempt to defeat access controls. Athlete and team names in scores, fixtures and standings are public sports records, and the Actor extracts no contact details, no private user data and no precise location data. Your results could still contain personal data. Personal data is protected by the GDPR in the European Union and by other regulations around the world. You should not scrape personal data unless you have a legitimate reason to do so. If you are unsure whether your reason is legitimate, consult your lawyers. You are responsible for complying with ESPN's terms of service and applicable law when using the extracted data.

This Actor is an independent tool and is not affiliated with, endorsed by or sponsored by ESPN, its owners, or any league or club named here. All trademarks belong to their respective owners.

# Actor input Schema

## `startUrls` (type: `array`):

ESPN endpoints to read, one per line: scoreboard, teams or standings under site.web.api.espn.com (site.api.espn.com URLs are rewritten to it automatically). An espn.com page such as https://www.espn.com/nba/standings, or a bare league slug such as `nfl` or `epl`, is translated to the matching endpoint. When this list is empty, the Resource + League fields below build the URL instead. Non-ESPN URLs are skipped with an `error` row.

## `resource` (type: `string`):

What to fetch when no ESPN API URLs are given. `scoreboard` returns one row per game or fixture, `teams` one row per team, `standings` one row per team in the league table.

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

League to read when no ESPN API URLs are given. Any other ESPN league still works by pasting its endpoint into the URL list above.

## `date` (type: `string`):

Optional day as YYYYMMDD (20260104), a range as YYYYMMDD-YYYYMMDD (20260101-20260131), or a whole calendar year as YYYY (2026). Ignored for teams and standings. Left empty, the scoreboard asks for the current calendar year, which always contains games.

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

Optional season, e.g. 2025. Standings use it as ESPN's season year (a 2025-26 European season is season 2025). Scoreboard uses it as the calendar year of the fixtures when no Date is given.

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

Stop after this many records have been saved to the dataset. Each saved record with status `ok` is one billable result. Keep it small for test runs.

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

Optional and off by default. The Actor is HTTP-only and these endpoints answer datacenter IPs directly. Enable Apify Proxy (datacenter group) only if your runs start getting blocked; residential proxies are not needed.

## Actor input object example

```json
{
  "startUrls": [
    "https://site.web.api.espn.com/apis/site/v2/sports/football/nfl/teams?limit=1000"
  ],
  "resource": "scoreboard",
  "league": "nfl",
  "maxItems": 20,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

# Actor output Schema

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

No description

# 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 = {
    "startUrls": [
        "https://site.web.api.espn.com/apis/site/v2/sports/football/nfl/teams?limit=1000"
    ],
    "maxItems": 20,
    "proxyConfiguration": {
        "useApifyProxy": false
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("glasswing/sports-scores-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 = {
    "startUrls": ["https://site.web.api.espn.com/apis/site/v2/sports/football/nfl/teams?limit=1000"],
    "maxItems": 20,
    "proxyConfiguration": { "useApifyProxy": False },
}

# Run the Actor and wait for it to finish
run = client.actor("glasswing/sports-scores-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 '{
  "startUrls": [
    "https://site.web.api.espn.com/apis/site/v2/sports/football/nfl/teams?limit=1000"
  ],
  "maxItems": 20,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}' |
apify call glasswing/sports-scores-scraper --silent --output-dataset

```

## MCP server setup

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