# Sports Scores & Odds Scraper — NBA, NFL, MLB, NHL, Soccer +15 (`pixflor/sports-scores-scraper`) Actor

Scrape live scores, fixtures, historical results and betting odds across 19 leagues in one dataset: teams, scores, records, venue, status, moneyline, spread and over/under.

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

## Pricing

from $2.00 / 1,000 game scrapeds

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/platform/actors/running/actors-in-store#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

## Sports Scores & Odds Scraper — NBA, NFL, MLB, NHL, Soccer +15

Live scores, upcoming fixtures, historical results and betting odds — **19 leagues, one
schema, one run.**

No API key. No login. Pick your leagues, set a date range, export CSV or JSON.

***

### Leagues covered

**Basketball** NBA · WNBA · NCAA Men's
**Football** NFL · NCAA
**Baseball** MLB
**Hockey** NHL
**Soccer** Premier League · La Liga · Serie A · Bundesliga · Ligue 1 · Champions League · MLS
**Combat** UFC
**Tennis** ATP · WTA
**Motorsport** Formula 1
**Golf** PGA

Mix them freely — a single run can pull NBA, Premier League and F1 into the same table,
because every league returns identical columns.

***

### What you get

| Column | Example |
|---|---|
| `date` | `2026-03-15T23:00Z` |
| `league` / `sport` | `nba` · `basketball` |
| `awayTeam` / `awayScore` / `awayRecord` | Minnesota Timberwolves · `103` · `41-27` |
| `homeTeam` / `homeScore` / `homeRecord` | Oklahoma City Thunder · `116` · `53-15` |
| `homeWinner` / `awayWinner` | `true` / `false` |
| `status` / `statusDetail` / `completed` | `STATUS_FINAL` · Final · `true` |
| `venue` / `venueCity` / `attendance` | Paycom Center · Oklahoma City |
| `oddsDetails` / `spread` / `overUnder` | `OKC -6.5` · `-6.5` · `215.5` |
| `homeMoneyline` / `awayMoneyline` | `-280` / `+230` |
| `broadcasts` | `["ESPN"]` |

***

### Typical uses

- **Historical datasets.** Set a date range and pull a whole month of results in one run —
  a 5-day NBA range returns ~40 games.
- **Model training and backtesting.** Scores, records and closing odds in the same row.
- **Live dashboards.** Schedule it every few minutes with *Live now* selected.
- **Sports content and newsletters.** Yesterday's results, formatted, automatically.
- **Odds monitoring.** Filter to *Only games with betting odds* and track line movement.

***

### Example input

Yesterday's finished games across the big four:

```json
{
  "leagues": ["nba", "nfl", "mlb", "nhl"],
  "dateFrom": "2026-03-15",
  "dateTo": "2026-03-15",
  "statusFilter": "final"
}
```

A month of Premier League history:

```json
{
  "leagues": ["epl"],
  "dateFrom": "2026-03-01",
  "dateTo": "2026-03-31",
  "sortBy": "date",
  "maxItems": 500
}
```

One team, all season:

```json
{ "leagues": ["nba"], "team": "Celtics", "dateFrom": "2026-01-01", "dateTo": "2026-04-01" }
```

***

### Settings that matter

- **Leave both dates empty** to get the current scoreboard — today's games and what's next.
- **`dateFrom` + `dateTo`** pulls a historical range in a single run. This is the feature
  most single-day scrapers don't have.
- **`team`** matches both full names and abbreviations, so `BOS` and `Celtics` both work.
- **`withOddsOnly`** is aggressive: odds exist for some leagues only, and usually only near
  game time. Expect it to filter heavily.
- **`maxItems`** is your cost ceiling. Set it deliberately.

***

### Pricing

Pay per event — you pay for games returned, not for runtime.

| Event | Price |
|---|---|
| Actor start | $0.002 per run |
| Game scraped | $0.002 each |

**1,000 games ≈ $2.00.**

***

### Reliability

Plain HTTP against a public JSON API — no HTML parsing, no headless browser, no
bot-detection workarounds. Website redesigns don't affect it.

Every request retries with exponential backoff, and **one league failing degrades the run
instead of ending it** — you still get the others, and the log names the one that was
missing.

***

### Notes

- Data is provided **as-is for research and analysis**, with no warranty of accuracy or
  timeliness. It is not betting advice.
- Leagues have off-seasons. An empty result for a date range usually means there were no
  fixtures, not that something broke — the log tells you which leagues returned nothing.
- Odds coverage varies by league and is typically populated close to game time. `null` means
  "not published", not "no line exists".
- Tennis, MMA and golf have no home/away concept; competitors are mapped positionally and
  scores may be absent for formats that don't use them.

***

### Questions or a bug?

Open an issue on the **Issues** tab with your input JSON and the run ID — that's usually
enough to reproduce it immediately.

# Actor input Schema

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

Which leagues to pull. Every league uses the same schema, so you can mix them freely in one run.

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

Start date (YYYY-MM-DD). Leave both dates empty to get the current scoreboard — today's and upcoming games.

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

End date (YYYY-MM-DD). Set with Date from to pull a historical range in a single run.

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

Only games involving this team. Matches full names and abbreviations, e.g. Celtics or BOS.

## `statusFilter` (type: `string`):

Filter by whether games are upcoming, in progress, or finished.

## `withOddsOnly` (type: `boolean`):

ESPN carries odds for some leagues only, and usually only close to game time. This filter is aggressive.

## `sortBy` (type: `string`):

How to order results before they are returned.

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

Hard cap on rows returned. This is your cost ceiling.

## Actor input object example

```json
{
  "leagues": [
    "nba",
    "nfl"
  ],
  "team": "Celtics",
  "statusFilter": "all",
  "withOddsOnly": false,
  "sortBy": "date",
  "maxItems": 200
}
```

# 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("pixflor/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 = {}

# Run the Actor and wait for it to finish
run = client.actor("pixflor/sports-scores-scraper").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
for item in client.dataset(run["defaultDatasetId"]).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 pixflor/sports-scores-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=pixflor/sports-scores-scraper",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/acts/8czsO6oYmCthhS7Ab/builds/W9oQRRFSd89efV1Qe/openapi.json
