# Yahoo Sports API Scraper (`rl1987/yahoo-sports-api-scraper`) Actor

Scrape public Yahoo Sports data (scores, schedules, standings, teams, players and game box scores) by league via the app's public mrest API. No account needed.

- **URL**: https://apify.com/rl1987/yahoo-sports-api-scraper.md
- **Developed by:** [R.L.](https://apify.com/rl1987) (community)
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.50 / 1,000 scores/schedule rows

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

## Yahoo Sports API Scraper

Scrape public Yahoo Sports data — scores & schedules, standings, teams, players and game box
scores — by league. No account or API key is required: the actor talks directly to the public
`mrest.sports.yahoo.com` API used by the Yahoo Sports Android app.

### What it extracts

| Mode | Endpoint (all `GET`, no auth) | Record |
|------|-------------------------------|--------|
| `scores` | `/sport/{league}/gamesWrapped?date=&tz=` (or `?week=`) | Games: home/away teams, scores, status, start time, odds, venue |
| `standings` | `/sport/{league}/standingsTable` | Standings rows: team, W/L/T, Pct, GB, PF/PA, division/conference, streak |
| `teams` | `/sport/{league}/teams` | Team list: id, name, abbreviation, colors, conference/division |
| `team` | `/team/{id}` + `/team/{id}/seasonStatRanks` | Team detail + current record/rank + stat rankings |
| `player` | `/athlete/{id}` | Player bio: height/weight, DOB, college, draft info |
| `game` | `/game/{id}/details` | Box score: per-period scores, stat leaders, team stat comparisons |

### Input

- **league** (required) — a Yahoo sport symbol (NFL, NBA, MLB, NHL, Premier League, etc.).
- **mode** (required) — `scores`, `standings`, `teams`, `team`, `player`, or `game`.
- **date** — for `scores` (YYYY-MM-DD or relative like `2 days`); defaults to today.
- **week** — week number for week-based leagues (NFL/NCAAF/CFL).
- **season** — optional season year for standings/team (best-effort passthrough).
- **team** — team id or name for `team` mode (e.g. `nfl.t.2`, `Buffalo Bills`, `BUF`).
- **player** / **game** — ids for the corresponding modes.
- **maxItems** — max records (0 = unlimited).

Example inputs:

```json
{ "league": "nfl", "mode": "scores", "date": "2026-09-13" }
{ "league": "nfl", "mode": "standings" }
{ "league": "soccer.l.fbgb", "mode": "teams" }
{ "league": "nfl", "mode": "team", "team": "Buffalo Bills" }
{ "league": "nfl", "mode": "game", "game": "nfl.g.20260913019" }
{ "league": "nfl", "mode": "player", "player": "nfl.p.29369" }
```

### Output

Flat records with a `type` field (`score`, `standings`, `team`, `player`, `game`) in a single
dataset. Pay-per-result pricing: each pushed record is charged per its type.

### Notes

- The underlying API is the app's own public endpoint, so no authentication or TLS bypass is
  needed. Residential proxy is the default (Apify Proxy) for reliability/scale.
- Data is served from Yahoo's CDN with `cache-control` of 5–15 minutes; a re-run within that
  window returns the same cached result.
- Leagues that are out of season (e.g. NBA in September) legitimately return empty `Games[]`.

### Terms of service

This actor scrapes publicly available sports data. Ensure your use complies with Yahoo's
terms of service and applicable law.

# Actor input Schema

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

The sports league to scrape (Yahoo sport symbol). Common leagues are listed; you can also type any other symbol such as soccer.l.fbes.

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

What to scrape: games/scores, standings, the team list, a single team, a single player, or a single game box score.

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

Date for scores/schedule mode (YYYY-MM-DD, or a relative value like '2 days'). Defaults to today when empty.

## `week` (type: `integer`):

Week number for week-based leagues (NFL/NCAAF/CFL) in scores mode. Overrides `date` when set.

## `season` (type: `string`):

Optional season year (e.g. 2026) for standings/team modes. The public API returns the current season by default; this is a best-effort passthrough.

## `team` (type: `string`):

Team id or name for `team` mode (e.g. 'nfl.t.2', 'Buffalo Bills' or 'BUF'). Resolved via the league's team list.

## `player` (type: `string`):

Player id for `player` mode (e.g. 'nfl.p.29369'). Ids are returned in score/team/game records.

## `game` (type: `string`):

Game id for `game` mode (e.g. 'nfl.g.20260913019'). Ids are returned in scores records.

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

Maximum number of records to return. 0 = unlimited.

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

Proxy settings. Residential proxy is used by default.

## Actor input object example

```json
{
  "league": "nfl",
  "mode": "scores",
  "maxItems": 100,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}
```

# Actor output Schema

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

Dataset of scraped records.

# 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 = {
    "date": "",
    "season": "",
    "team": "",
    "player": "",
    "game": ""
};

// Run the Actor and wait for it to finish
const run = await client.actor("rl1987/yahoo-sports-api-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 = {
    "date": "",
    "season": "",
    "team": "",
    "player": "",
    "game": "",
}

# Run the Actor and wait for it to finish
run = client.actor("rl1987/yahoo-sports-api-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 '{
  "date": "",
  "season": "",
  "team": "",
  "player": "",
  "game": ""
}' |
apify call rl1987/yahoo-sports-api-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,rl1987/yahoo-sports-api-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/UIp4EgVuv5KzLeuci/builds/C8XHDLlrsL2hgslgH/openapi.json
