# Sports Odds Scraper - NFL, NBA, MLB & Soccer (`fetchfinch/sports-odds-scraper`) Actor

Compare sportsbook moneyline, spread and totals odds for NFL, NBA, MLB, NHL and soccer. Get decimal and American odds, implied probabilities and quote changes. Each row represents one sportsbook, market and outcome.

- **URL**: https://apify.com/fetchfinch/sports-odds-scraper.md
- **Developed by:** [Fetch Finch](https://apify.com/fetchfinch) (community)
- **Categories:** Sports, Developer tools, Automation
- **Features:** Limited permissions
- **Stats:** 4 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $3.00 / 1,000 odds 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

### Sports Odds Scraper - NFL, NBA, MLB & Soccer

![No API key required](https://img.shields.io/badge/No%20API%20key-required-43A047)
![Pricing](https://img.shields.io/badge/Pricing-%243%20per%201%2C000%20rows-5C6BC0)
![Output](https://img.shields.io/badge/Output-one%20row%20per%20quote-3178C6)
![Freshness](https://img.shields.io/badge/Odds-fetched%20on%20each%20run-00A98F)
![Changes only](https://img.shields.io/badge/Changes--only-supported-8E44AD)
![Public tasks](https://img.shields.io/badge/Public%20tasks-3%20ready--to--run-F39C12)
![Export](https://img.shields.io/badge/Export-JSON%20%7C%20CSV%20%7C%20Excel-2E86C1)

Compare sportsbook moneyline, spread and totals odds for NFL, NBA, MLB, NHL and soccer. Get decimal and American odds, implied probabilities and quote changes. Each row is one sportsbook, market and outcome - not one game. A single game can produce dozens of rows, and each output row is billed individually.

### Competitions and markets

Choose from the competitions in the input list, including NFL, NBA, MLB, NHL, NCAA, and major soccer leagues. Select moneyline, point spread, and total-points markets. Results vary by competition, event, market, and sportsbook availability.

### Sportsbooks

Sportsbooks observed in recent NFL results include BetParx, BetRivers, DraftKings, ESPN BET, Fanatics, FanDuel, Kalshi, OG.com, Polymarket, ProphetX, and Underdog. Availability can vary by event and competition; leave the sportsbook filter empty to include all books returned for the selected events.

### Freshness and caching

By default, odds are fetched from the live feed on every Actor run; response caching is off (`0` minutes). If you enable a response-cache TTL, a run may reuse a recent response until that TTL expires. Persistent cache storage is also used for delta-comparison state, which does not make the odds response stale.

When no dates are selected, the Actor requests events from the beginning of today (UTC) through the next 30 days. One upstream request is normally made per selected competition, with a bounded retry if a response contains markets but no outcomes.

### Output

Each dataset row represents one sportsbook quote for one event, market, and outcome. The row includes event and team identifiers, market and sportsbook, outcome, line or total modifier, decimal odds, American odds, implied probability, live status, and timestamps.

Example row:

```json
{
  "competition": "NFL",
  "eventName": "Buffalo Bills @ Los Angeles Rams",
  "marketType": "MONEYLINE",
  "bookmaker": "POLYMARKET",
  "outcomeName": "Buffalo Bills",
  "priceDecimal": 1.5385,
  "priceAmerican": -185.71,
  "impliedProbability": 0.65,
  "isLive": false
}
```

### Changes-only mode

Set **Output mode** to **Changes only** for repeated polling. The first run creates a baseline; later runs write only `ADDED`, `UPDATED`, and `REMOVED` quote records. Updates include the previous quote in `previousRow`. A complete current snapshot is saved as `CURRENT_SNAPSHOT` in the run's default key-value store.

The Actor defers removals when a large part of a response unexpectedly disappears, then confirms them if the omission persists on the next run. This helps avoid reporting a temporarily missing sportsbook block as a genuine removal.

### Pricing example

The Actor charges **$3 per 1,000 output rows** (that is, **$0.003 per row**) plus a **minimum $0.00005 Actor-start charge**.

For example, 60 sportsbook-market-outcome rows cost $0.18 in result charges. A game with two outcomes, three markets, and ten sportsbooks could produce 60 rows; alternate lines or additional outcomes can produce more.

### Run the Actor

1. Select one or more competitions.
2. Choose markets and optionally filter sportsbooks.
3. Optionally set an event date range in UTC under Advanced options.
4. Start the Actor and view or export the dataset as JSON, CSV, or Excel.

You do not need to provide your own API key.

### Public example tasks

- [Get NFL moneyline, spread and totals odds](https://apify.com/fetchfinch/sports-odds-scraper/examples/nfl-main-markets)
- [Compare NFL moneyline odds by sportsbook](https://apify.com/fetchfinch/sports-odds-scraper/examples/nfl-moneyline-books)
- [Get MLB moneyline, spread and totals odds](https://apify.com/fetchfinch/sports-odds-scraper/examples/mlb-main-markets)

# Actor input Schema

## `competitions` (type: `array`):

Select one or more competitions. Each selected competition uses one Sportsbook API request.

## `marketTypes` (type: `array`):

Select the main markets to include. Filtering happens after the single competition request.

## `bookmakers` (type: `array`):

Optional sportsbook filter. Leave empty to include every sportsbook returned for the selected events.

## `startTimeFrom` (type: `string`):

Optional first event date in UTC. Leave empty to start at the beginning of today.

## `startTimeTo` (type: `string`):

Optional last event date in UTC. Leave empty to include the next 30 days.

## `maxEvents` (type: `integer`):

Maximum events per competition. Zero includes all events.

## `outputMode` (type: `string`):

SNAPSHOT writes the complete current odds set. DELTA writes only added, updated, or removed quotes and keeps the full current snapshot in the output key-value store.

## `enableCache` (type: `boolean`):

Cache competition metadata and optional short-lived snapshots in a named Apify key-value store.

## `cacheStoreName` (type: `string`):

Persistent named key-value store used between runs. Keep this stable for scheduled collection.

## `competitionCacheTtlHours` (type: `integer`):

How long the competition catalog remains valid, in hours.

## `responseCacheTtlMinutes` (type: `integer`):

Cache complete odds responses for this many minutes. Keep at zero when every scheduled run must fetch fresh odds.

## `resolveCompetitionNames` (type: `boolean`):

Refresh the provider competition catalog so full names and slugs can also be entered. Costs one extra request on a cold catalog cache.

## `maxCompetitionsPerRun` (type: `integer`):

Safety cap on upstream competition requests.

## Actor input object example

```json
{
  "competitions": [
    "NFL"
  ],
  "marketTypes": [
    "MONEYLINE",
    "POINT_SPREAD",
    "POINT_TOTAL"
  ],
  "bookmakers": [],
  "maxEvents": 0,
  "outputMode": "SNAPSHOT",
  "enableCache": true,
  "cacheStoreName": "sports-odds-scraper-cache",
  "competitionCacheTtlHours": 24,
  "responseCacheTtlMinutes": 0,
  "resolveCompetitionNames": false,
  "maxCompetitionsPerRun": 5
}
```

# Actor output Schema

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

One row per event, market, sportsbook, and outcome in SNAPSHOT mode, or one ADDED, UPDATED, or REMOVED change record in DELTA mode.

## `currentSnapshot` (type: `string`):

Complete latest odds snapshot when DELTA mode is used.

## `summary` (type: `string`):

Run-level counts, cache usage, quota information, and any competition errors.

# 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("fetchfinch/sports-odds-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("fetchfinch/sports-odds-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 fetchfinch/sports-odds-scraper --silent --output-dataset

```

## MCP server setup

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