# Sports Odds Scraper: DraftKings, BetRivers, Line Move Alerts (`datahamster/sports-odds-scraper`) Actor

Sports odds scraper for pre-match betting odds from DraftKings and BetRivers: NFL, NCAAF, NBA, NCAAB, NHL, EPL moneyline, spread and total, decimal and American odds, implied probability, best price across both. Monitor alerts on line moves above your threshold.

- **URL**: https://apify.com/datahamster/sports-odds-scraper.md
- **Developed by:** [Viktor Dubnytskiy](https://apify.com/datahamster) (community)
- **Categories:** News
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $6.72 / 1,000 result items

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

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

Pre-match betting odds from **DraftKings and BetRivers** in one run, matched into games across the two bookmakers, with the best price per side and a monitor that alerts on line moves. One flat row per game × market × bookmaker: moneyline, spread and total with decimal odds, American odds, implied probability, bookmaker margin, the best price among the bookmakers and which bookmaker pays it. Leagues: NFL, NCAA Football, NBA, NCAA Basketball, NHL and the English Premier League. No account, no odds-API key.

**Try it:** the prefilled example (NBA, `maxItems: 20`) returns 18 rows (3 games × 2 bookmakers × 3 markets) in about 5 seconds. Results cost $8.40 per 1,000 rows, plus Apify platform usage (about $0.002-0.006 per 1,000 rows on our runs).

**Why this one** (compared with the two most-used sports odds actors in the Store, scrapemint/sports-odds-scraper and scrapesage/sports-betting-odds-scraper; input schemas and READMEs checked 2026-11-17):

- **Line-move alerts with your threshold.** Run it as a scheduled task with `mode: "monitor"`: each run returns only markets that are new (a new game or a newly posted line) and known markets whose line changed or whose implied probability moved by at least `minProbabilityMove` percentage points (default 2) since the value you were last told. Small moves add up against that value, so a slow drift still alerts once. scrapemint's actor only skips event ids it pushed before (`dedupe`); scrapesage's monitor mode returns every game whose odds moved, with no minimum move.
- **DraftKings and BetRivers read directly.** DraftKings comes from its own sportsbook feed (main lines with exact prices) and BetRivers from its Kambi feed. scrapemint's input says it reads one bookmaker through ESPN's scoreboard ("typically DraftKings") plus Bovada; scrapesage reads Pinnacle, FanDuel and Bovada.
- **Best price per side across bookmakers.** Every row carries `bestPrice` (best decimal and American odds per side and the bookmakers paying it, compared only between bookmakers quoting the same line), `bestPriceSides` and `booksCompared`.
- **One row per market and bookmaker, both sides in it.** Home, away (and draw), or over and under, sit in the same row, so a spreadsheet or database gets one line per price board entry.

### What you get

Real rows from the example dataset (`leagues: ["nba"]`, `maxItems: 20`, run dUfmH4tiiUsFxXQef, 18 rows = 3 games, 4.7 s, 2026-11-17). H = home, A = away, O/U = over/under:

| game | bookmaker | market | line | odds (American) | best price on |
|---|---|---|---|---|---|
| Houston Rockets @ Miami Heat | draftkings | moneyline |  | H +101 / A -120 | away |
| Houston Rockets @ Miami Heat | betrivers | moneyline |  | H +104 / A -125 | home |
| Houston Rockets @ Miami Heat | draftkings | spread | 1.5 | H -110 / A -110 | away |
| Houston Rockets @ Miami Heat | betrivers | spread | 1.5 | H -110 / A -112 | home |
| Houston Rockets @ Miami Heat | draftkings | total | 233.5 | O -114 / U -106 | - |
| Houston Rockets @ Miami Heat | betrivers | total | 232.5 | O -114 / U -108 | - |

Best price compares decimal odds, which are more exact than the American figure (-118 is 1.847 at DraftKings and 1.85 at BetRivers, so BetRivers is the best price).

One row:

```json
{
  "id": "draftkings:35020950:moneyline",
  "url": "https://sportsbook.draftkings.com/event/35020950",
  "scrapedAt": "2026-11-17T00:20:26.133620Z",
  "eventKey": "nba:2026-11-17:rockets@heat",
  "eventName": "Houston Rockets @ Miami Heat",
  "sport": "basketball",
  "league": "nba",
  "leagueName": "NBA",
  "homeTeam": "Miami Heat",
  "awayTeam": "Houston Rockets",
  "startTime": "2026-11-17T00:40:00Z",
  "bookmaker": "draftkings",
  "bookmakerEventId": "35020950",
  "bookmakerHomeTeam": "MIA Heat",
  "bookmakerAwayTeam": "HOU Rockets",
  "market": "moneyline",
  "line": null,
  "homeOdds": 2.01,
  "homeOddsAmerican": 101,
  "homeImpliedProbability": 0.4975,
  "awayOdds": 1.833,
  "awayOddsAmerican": -120,
  "awayImpliedProbability": 0.5455,
  "marginPercent": 4.3,
  "booksCompared": 2,
  "bestPriceSides": [
    "away"
  ],
  "bestPrice": {
    "home": {
      "odds": 2.04,
      "oddsAmerican": 104,
      "bookmakers": [
        "betrivers"
      ]
    },
    "away": {
      "odds": 1.833,
      "oddsAmerican": -120,
      "bookmakers": [
        "draftkings"
      ]
    }
  },
  "updatedAt": "2026-11-17T00:20:25Z"
}
```

- `line`: for a spread, the **home** team's handicap (-9.5 means the home team gives 9.5 points); for a total, the points or goals line; null for a moneyline.
- `homeImpliedProbability` etc.: 1 / decimal odds, the bookmaker's margin included. `marginPercent` is the overround of the market.
- `booksCompared`: how many bookmakers of this run quote this game's market at the same line (best price is compared among them; a bookmaker with a different spread or total line is not compared). `bestPriceSides` is empty when `booksCompared` is 1.
- `eventKey` is one key per game, built the same way whichever bookmakers list it: `<league>:<UTC date of the start>:<away>@<home>` with the team's nickname for NFL, NBA and NHL (`nba:2026-11-17:magic@celtics`), the school's first word plus the nickname for college (`ncaab:2026-11-17:alcorn-braves@maryland-terrapins`) and the first word of the club's name for soccer (`epl:2026-11-21:fulham@manchester`; the opponent and the date keep it unique). `eventName`, `homeTeam` and `awayTeam` use BetRivers' full English names when BetRivers lists the game, else DraftKings' ("BOS Celtics"); `bookmakerHomeTeam` keeps each bookmaker's own spelling.
- `updatedAt` is when the actor read that bookmaker's feed; the feeds carry no per-price timestamp.

### Use cases

- Line shopping: find the bookmaker paying the most for each side before you bet.
- Line-move and steam alerts: a scheduled monitor with a webhook or Telegram message when a spread moves or a price shifts by 3 points.
- Closing-line and model data: collect prices on a schedule for backtests and models.
- Odds comparison widgets and sports content sites.

### Input examples

```json
{"leagues": ["nfl", "ncaaf"], "markets": ["spread", "total"], "hoursAhead": 72}
```

```json
{"leagues": ["epl"], "bookmakers": ["draftkings", "betrivers"], "markets": ["moneyline"]}
```

Monitor (save as a task and schedule it every 15 minutes or every hour):

```json
{"mode": "monitor", "leagues": ["nba"], "markets": ["spread", "total"], "minProbabilityMove": 3, "maxItems": 200}
```

### Input

- `leagues`: NFL, NCAA Football, NBA, NCAA Basketball, NHL, English Premier League. Empty = all.
- `markets`: moneyline, spread, total (full game, main line). Empty = all.
- `bookmakers`: draftkings, betrivers. Empty = both.
- `hoursAhead`: only games starting within this many hours.
- `maxItems`: maximum rows (default 100). The run stops at a game boundary, so a game is never returned with only some of its bookmakers or markets (the prefilled 20 gives 18 rows: 3 NBA games).
- `mode: "monitor"`, `minProbabilityMove`, `monitorStateId`, `webhookUrl`, `telegramBotToken` / `telegramChatId`: see Monitor mode.

### Monitor mode

The first run of a league is a baseline: it records every market it reads and returns nothing (you pay only the monitor check). Later runs return:

- `changeType: "new"`: a market not seen before (a new game, a bookmaker that posted a line later, or a game that entered your `hoursAhead` window).
- `changeType: "changed"`: the `line` changed, or the implied probability of any side moved by at least `minProbabilityMove` points from the value last reported. `changedFields` names the fields and `previous` holds the old values.

Each league × bookmaker is tracked separately, per selection of markets and `hoursAhead` (changing them starts a new baseline). If a bookmaker's feed is refused during its first run of a league, that baseline is not committed and the next run records it again, so the bookmaker's markets are not reported as new later; the other bookmaker is not held back. Measured: a monitor over all six leagues recorded a baseline of 843 markets ($0.0066 usage, run zzXqCGn13wOqGYy43); the next run a few minutes later read the same 843 markets and returned 2, both real line moves (Vikings @ 49ers total at BetRivers from 46 to 46.5, Alabama State @ UC Davis total at DraftKings from 153.5 to 151.5), with `previous` ($0.0007 usage, run oEyAfntMr1B7UgX8A). An earlier pair returned 8 line moves out of 894 markets (run zHS98lbWpzdZ1N6Bj).

### Pricing

Pay per event, platform usage paid by you:

- `result`: $0.0084 per row (scrape mode).
- `monitor-check`: $0.005 per monitor run.
- `change`: $0.0084 per new or moved market in monitor mode.

A game with both bookmakers and all three markets is 6 rows. Use `markets` and `bookmakers` to return only what you need. Platform usage measured on our runs at 256 MB without proxy: the 18-row example $0.0004 (5 s); all six leagues, 599 rows $0.0020 (42 s, run Lv4q6pOAHYvWtdqJo), about $0.002-0.006 per 1,000 rows on top of the result price; a monitor run over all six leagues $0.0007-0.0066. If a feed refuses the direct connection the actor switches to residential proxies in the US, which costs more per request.

Store discounts: SILVER 10% off, GOLD and above 20% off. If you find a problem, please open an issue; if it works for you, a review helps.

### Limits

- Pre-match odds only: games that already started are skipped. No live (in-play) odds.
- Full-game main lines only: no alternate lines, halves, quarters, periods, player props or futures.
- DraftKings and BetRivers are read from their Ohio (US) feeds; prices in other states can differ slightly.
- Two bookmakers in this version. Bovada's feed answered with an empty `{}` on most of our platform runs on 2026-11-16 and 17, so it is not offered.
- DraftKings lists only the moneyline for the Premier League in its league feed; spread and total there come from BetRivers.
- Six leagues. Out of season a league simply returns no games.
- Games are matched across bookmakers by league, start time (within 3 hours, or 24 hours when both teams' names are spelled the same) and team names: home with home and away with away, each by word overlap, and for US sports two different spellings must share the nickname (Kansas Jayhawks is not Kansas State Wildcats); in NFL, NBA and NHL the same nickname is the same team whatever the city abbreviation ("WAS Capitals" and "WSH Capitals"). Each game gets the best-scoring partner, and a tie is left unmatched. A game the two bookmakers name very differently stays as two `eventKey`s, each with correct prices for its bookmaker. Known cases: neutral-site games where the bookmakers swap home and away, and spelling variants without a shared word ("ULM" and "UL Monroe").
- BetRivers needs one extra request per game (about 70 for a full NCAA Football slate); if some are refused, those games are missing from BetRivers and the run status says how many.
- If a bookmaker refuses the request on every proxy tier, the run returns the other bookmakers and says so in its status (`emptyReason: partial`); if all refuse, the run ends with `emptyReason: blocked`, not an empty success.
- Odds change quickly. A row is a snapshot at `updatedAt`.

### FAQ

**Do I need an account or an API key?** No. The actor reads the public odds feeds the bookmakers' own websites use.

**Can I place bets with it?** No. It only reads prices.

**Which bookmaker is "best"?** For each side, the one paying the highest decimal odds among the bookmakers quoting the same line in that run.

This actor provides odds data for information only. Sports betting is regulated and may be illegal where you live; check your local laws.

### Changelog

- 0.1 (2026-11-17): first version.

# Actor input Schema

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

Leagues to read, several allowed. Empty = all six. Each league is read from every selected bookmaker.

## `markets` (type: `array`):

Full-game main lines to return. Empty = all three. Alternate lines, halves, quarters and player props are not returned.

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

Bookmakers to read and compare. Empty = both. Best price and booksCompared are computed across the bookmakers of the run.

## `hoursAhead` (type: `integer`):

Only games that start within this many hours from the run. Empty = every upcoming game the bookmakers list. Games that already started (live) are never returned.

## `minProbabilityMove` (type: `number`):

Monitor mode: report a known market only when the implied probability of any side moved by at least this many percentage points since the value last reported (smaller moves add up), or when its line changed. Empty = 2. Example: -110 to -125 is 52.4% to 55.6%, a 3.2-point move.

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

Stop after this many results (you are charged only for pushed items)

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

scrape = full results; monitor = only new/changed items since the previous run of this task

## `monitorStateId` (type: `string`):

Optional state id when not running as a saved task (monitor mode)

## `webhookUrl` (type: `string`):

POST a change summary here in monitor mode

## `telegramBotToken` (type: `string`):

Optional: bot token for monitor-mode change summaries

## `telegramChatId` (type: `string`):

Optional: chat id that receives monitor-mode summaries

## Actor input object example

```json
{
  "leagues": [
    "nba"
  ],
  "maxItems": 20,
  "mode": "scrape"
}
```

# Actor output Schema

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

All pushed rows (dataset, JSON)

## `resultsTable` (type: `string`):

Dataset in the Console viewer

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

RUN_SUMMARY record

# 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 = {
    "leagues": [
        "nba"
    ],
    "maxItems": 20
};

// Run the Actor and wait for it to finish
const run = await client.actor("datahamster/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 = {
    "leagues": ["nba"],
    "maxItems": 20,
}

# Run the Actor and wait for it to finish
run = client.actor("datahamster/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 '{
  "leagues": [
    "nba"
  ],
  "maxItems": 20
}' |
apify call datahamster/sports-odds-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,datahamster/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/bakUjhL5hdw8700Uw/builds/8SkZArKjuyuQvcJxu/openapi.json
