# Sports Odds Scraper: DraftKings, FanDuel, bet365 & 100+ Books (`keelwright/sports-odds-scraper`) Actor

Betting odds for NFL, NBA, MLB, NHL, soccer, tennis and more: moneyline, spread and total from DraftKings, FanDuel, BetMGM, bet365 and 100+ bookmakers in 29 countries, with opening lines and best prices.

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

## Pricing

Pay per usage

This Actor is paid per platform usage. The Actor is free to use, and you only pay for the Apify platform usage, which gets cheaper the higher subscription plan you have.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-usage

## 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: DraftKings, FanDuel, bet365 and 100+ bookmakers

Get betting odds for **NFL, NBA, MLB, NHL, soccer, tennis, MMA and 12 more sports** as clean JSON, CSV or Excel. Every game comes with each bookmaker's **moneyline, three-way (1X2), spread and total**, the opening prices, the best price and who offers it, the average, fair (no-vig) chances, the bookmaker margin and any arbitrage. Bookmakers: **DraftKings, FanDuel, BetMGM, Fanatics and bet365** in four US states, and **100+ bookmakers in 29 countries**, from William Hill, Betfair and Paddy Power to Bet9ja and Caliente.

- **Line shopping in one row.** For each game, the best moneyline, spread and total price and the bookmaker offering it, next to every bookmaker's own line.
- **US sportsbooks by state.** New Jersey, New York, Virginia and Massachusetts, each with the sportsbooks licensed there; Ontario for Canada.
- **Opening and current prices** from every bookmaker, to follow line movement and measure closing line value.
- **Fair odds and arbitrage.** No-vig chances and the margin for every market, and the profit and stakes when the best prices across bookmakers add up to less than 100%.
- **Closing lines.** Finished games of the last 7 days keep the last prices the bookmakers listed.
- **All markets on request.** Alternate spreads and totals, halves, quarters and periods, double chance, draw no bet, correct score, odd/even, half-time/full-time and more: up to several thousand prices per game.
- **Only what moved.** Run it on a schedule and get only the games whose prices changed since the last run.

### What can I use sports odds data for?

- **Odds comparison and line shopping**: power a comparison table, website, app or spreadsheet with the best price for every game.
- **Betting models and backtesting**: collect opening, current and closing prices to build models and measure closing line value (CLV).
- **Arbitrage and value alerts**: send yourself a Slack, Telegram or email alert when an arbitrage or a price above fair odds shows up.
- **Sports media and content**: odds tables for previews, newsletters and social posts.
- **Market research**: compare margins and pricing between bookmakers, countries and leagues.

### How to scrape betting odds

1. Click **Try for free**.
2. Pick the **sports** (NFL, NBA, MLB, NHL and soccer are selected by default).
3. Pick the **bookmaker regions**, for example *USA, New Jersey* for DraftKings, FanDuel, BetMGM, Fanatics and bet365, or *United Kingdom* for 20 UK bookmakers.
4. Optionally narrow down by **leagues**, **teams**, **bookmakers**, **upcoming days** and **game status**.
5. Click **Start** and download the results as JSON, CSV, Excel or HTML, or read them through the API.

**Pick leagues** the way Flashscore names them: `USA: NBA`, `USA: NFL`, `USA: MLB`, `USA: NHL`, `England: Premier League`, `Europe: Champions League`, or paste the league URL from flashscore.com (for example `https://www.flashscore.com/basketball/usa/nba/`). If a name fits nothing, the run log suggests the closest names.

**Track line movement:** turn on **Only new or changed odds** and [schedule](https://docs.apify.com/platform/schedules) the run every 5 to 30 minutes. Each run returns only the games whose prices changed.

**Get closing lines:** set **Game status** to *Finished*, **Past days** to 1–7 and **Upcoming days** to 0.

### Input example

```json
{
    "sports": ["basketball", "american-football"],
    "leagues": ["USA: NBA", "USA: NFL"],
    "regions": ["US-NJ", "CA-ON", "GB"],
    "oddsFormat": "american",
    "daysAhead": 2,
    "maxItems": 100
}
```

### Bookmakers by region

Pick up to 10 regions per run. A bookmaker that appears in several regions is listed once.

| Region                 | Code           | Bookmakers                                                                                                                                                                                 |
| ---------------------- | -------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| USA, New Jersey        | `US-NJ`        | FanDuel, DraftKings, BetMGM, Fanatics, bet365                                                                                                                                              |
| USA, New York          | `US-NY`        | FanDuel, DraftKings, BetMGM, Fanatics                                                                                                                                                      |
| USA, Virginia          | `US-VA`        | FanDuel, DraftKings, BetMGM, Fanatics, bet365, Betr                                                                                                                                        |
| USA, Massachusetts     | `US-MA`        | FanDuel, DraftKings, BetMGM, Fanatics, Betr                                                                                                                                                |
| Canada, Ontario        | `CA-ON`        | bet365, Betway, Sports Interaction, Betano, TonyBet, PointsBet, FanDuel, BetMGM, DraftKings, 888sport, Bet99                                                                               |
| United Kingdom         | `GB`           | bet365, BetMGM, Betfred, Unibet, Betway, Midnite, 7Bet, Ladbrokes, Sky Bet, 10bet, Betano, Betfair, BetUK, BetVictor, Coral, Paddy Power, Parimatch, Spreadex, talkSPORT BET, William Hill |
| Ireland                | `IE`           | bet365, 1xBet, Midnite, Novibet, Betway, Paddy Power, Spreadex, Unibet                                                                                                                     |
| Australia              | `AU`           | bet365, Unibet                                                                                                                                                                             |
| Germany                | `DE`           | Neobet, bwin, Oddset, Winamax, Interwetten, Betano, bet365                                                                                                                                 |
| Italy                  | `IT`           | bet365, Sisal, GoldBet, Eurobet, Betsson, SNAI, Lottomatica, Planetwin365, Betflag, bwin, Marathonbet, Netwin, William Hill                                                                |
| Spain                  | `ES`           | bet365, Sportium, Versus, Betway, Codere, Luckia, Retabet, Speedybet, William Hill                                                                                                         |
| France                 | `FR`           | Betclic, Winamax, Unibet, PMU, Betsson, bet365, bwin, NetBet                                                                                                                               |
| Netherlands            | `NL`           | Sevelev, bet365                                                                                                                                                                            |
| Sweden                 | `SE`           | Unibet, Expekt, Dbet, bet365, BetMGM, 1x2, Coolbet, Mr Green                                                                                                                               |
| Denmark                | `DK`           | bet365, Expekt, Betano, Stake, bwin, Unibet                                                                                                                                                |
| Poland                 | `PL`           | STS, Fortuna, Superbet, Betclic, BETFAN, LV BET                                                                                                                                            |
| Czech Republic         | `CZ`           | Tipsport, Fortuna, Chance, Betano                                                                                                                                                          |
| Austria                | `AT`           | Admiral, bet365, bet-at-home, bwin                                                                                                                                                         |
| Switzerland            | `CH`           | bet365, bet-at-home                                                                                                                                                                        |
| Portugal               | `PT`           | Betano, Solverde, bwin                                                                                                                                                                     |
| Greece                 | `GR`           | bet365, Stoiximan, Pame Stoixima, Novibet, bwin, Interwetten                                                                                                                               |
| Romania                | `RO`           | Unibet, Superbet, Betano, MrBit, Getsbet, NetBet, Fortuna                                                                                                                                  |
| Turkey                 | `TR`           | 1xBet                                                                                                                                                                                      |
| Mexico                 | `MX`           | Caliente, 1xBet, Winpot, Novibet, Sportium, BetBoom, Betway, Codere                                                                                                                        |
| Argentina              | `AR`           | 1xBet, bet365, Unibet, Betfair, bwin, William Hill                                                                                                                                         |
| Colombia               | `CO`           | Wplay, Betano, Stake, bwin, BetPlay, Luckia                                                                                                                                                |
| South Africa           | `ZA`           | Easybet, Betway, Sportingbet, Sunbet, Virginbet, PantherBet, Betxchange, World Sports Betting                                                                                              |
| Nigeria                | `NG`           | 1xBet, Bet9ja, BetKing                                                                                                                                                                     |
| Kenya, India and Japan | `KE` `IN` `JP` | 1xBet                                                                                                                                                                                      |
| Thailand               | `TH`           | 1xBet, Stake, Melbet, bet-at-home, bet365, Betfair                                                                                                                                         |

The lists are the bookmakers Flashscore shows to visitors from each place (checked October 2026). Not every bookmaker prices every game; `bookmakerCount` says how many did.

### What data do you get?

Every row is one game.

| Field                       | What it holds                                                                                                                                                                         |
| --------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `matchId`, `url`            | Flashscore game id and link                                                                                                                                                           |
| `sport`                     | `american-football`, `basketball`, `baseball`, `hockey`, `soccer`, `tennis`, `mma` and so on                                                                                          |
| `competition`               | League name with stage (e.g. *NBA*, *Champions League - League phase*), country, id and link                                                                                          |
| `startTime`                 | Start time (ISO 8601, UTC)                                                                                                                                                            |
| `status`, `statusDetail`    | `scheduled`, `live`, `finished`, `interrupted`, `postponed`, `cancelled` or `abandoned`; the detail (e.g. *3rd Quarter*, *After Overtime*)                                            |
| `home`, `away`              | Team or player name, short code, Flashscore id, link and logo                                                                                                                         |
| `score`                     | For live and finished games: points or goals of each side                                                                                                                             |
| `regions`, `bookmakerCount` | The regions asked for and how many bookmakers priced the game                                                                                                                         |
| `moneyline`                 | Two-way winner market: best price per side and its bookmaker, average price, fair chances, margin, arbitrage and number of bookmakers                                                 |
| `threeWay`                  | Three-way (1X2) market with home, draw and away, summarised the same way                                                                                                              |
| `spread`                    | The main spread line (the line most bookmakers offer, for the home side) with best and average prices at that line                                                                    |
| `total`                     | The main total line with best and average over and under prices                                                                                                                       |
| `bookmakers`                | One entry per bookmaker with its region, moneyline, three-way prices, its own spread line and prices, its own total line with over and under, and the opening price of each           |
| `markets`                   | With **All markets**: every price the bookmakers list, one entry per price with bookmaker, market, period, selection, line, current and opening price and whether it is still offered |
| `scrapedAt`                 | When the prices were read                                                                                                                                                             |

`period` says what part of the game a market covers: `full-time-incl-overtime` (how US sportsbooks settle moneyline, spread and total), `full-time` (regulation time, as for three-way bets), `first-half`, `first-quarter`, `first-period` and so on. Prices are decimal odds by default; set **Odds format** to *American* for `-110` style odds.

#### Output example

An NBA game with US and UK bookmakers (bookmaker list shortened with "…"):

```json
{
    "matchId": "O8V0aGHF",
    "url": "https://www.flashscore.com/match/basketball/O8V0aGHF/",
    "sport": "basketball",
    "competition": {
        "name": "NBA",
        "country": "USA",
        "id": "IBmris38",
        "url": "https://www.flashscore.com/basketball/usa/nba/"
    },
    "startTime": "2026-10-21T23:00:00.000Z",
    "status": "scheduled",
    "statusDetail": "Scheduled",
    "home": {
        "name": "Orlando Magic",
        "shortCode": "ORL",
        "id": "QZMS36Dn",
        "url": "https://www.flashscore.com/team/orlando-magic/QZMS36Dn/",
        "logoUrl": "https://static.flashscore.com/res/image/data/lMTx9oXH-l0jb3WKi.png"
    },
    "away": {
        "name": "Atlanta Hawks",
        "shortCode": "ATL",
        "id": "xAO4gBas",
        "url": "https://www.flashscore.com/team/atlanta-hawks/xAO4gBas/",
        "logoUrl": "https://static.flashscore.com/res/image/data/Glb3yYRq-4bqaxRtQ.png"
    },
    "score": null,
    "regions": ["US-NJ", "GB"],
    "bookmakerCount": 25,
    "moneyline": {
        "period": "full-time-incl-overtime",
        "best": {
            "home": { "odds": 1.79, "bookmaker": "Fanduel" },
            "away": { "odds": 2.15, "bookmaker": "William Hill" }
        },
        "average": { "home": 1.743, "away": 2.078 },
        "fairProbability": { "home": 0.5438, "away": 0.4562 },
        "margin": 0.055,
        "arbitrage": null,
        "bookmakers": 23
    },
    "threeWay": {
        "period": "full-time",
        "best": {
            "home": { "odds": 1.85, "bookmaker": "Ladbrokes" },
            "draw": { "odds": 17, "bookmaker": "Betway" },
            "away": { "odds": 2.2, "bookmaker": "Fanatics" }
        },
        "average": { "home": 1.81, "draw": 13.444, "away": 2.17 },
        "fairProbability": { "home": 0.5079, "draw": 0.0684, "away": 0.4237 },
        "margin": 0.0877,
        "arbitrage": null,
        "bookmakers": 9
    },
    "spread": {
        "period": "full-time-incl-overtime",
        "line": -2.5,
        "best": {
            "home": { "odds": 1.98, "bookmaker": "Unibetuk" },
            "away": { "odds": 1.9, "bookmaker": "10bet" }
        },
        "average": { "home": 1.917, "away": 1.851 },
        "arbitrage": null,
        "bookmakers": 23
    },
    "total": {
        "period": "full-time-incl-overtime",
        "line": 234.5,
        "best": {
            "over": { "odds": 1.91, "bookmaker": "BetMGM.us" },
            "under": { "odds": 1.98, "bookmaker": "Unibetuk" }
        },
        "average": { "over": 1.847, "under": 1.937 },
        "arbitrage": null,
        "bookmakers": 18
    },
    "bookmakers": [
        {
            "bookmaker": "Fanduel",
            "region": "US-NJ",
            "moneylineHome": 1.79,
            "moneylineAway": 2.08,
            "moneylineHomeOpening": 1.74,
            "moneylineAwayOpening": 2.16,
            "threeWayHome": null,
            "threeWayDraw": null,
            "threeWayAway": null,
            "threeWayHomeOpening": null,
            "threeWayDrawOpening": null,
            "threeWayAwayOpening": null,
            "spreadLine": -2.5,
            "spreadHome": 1.95,
            "spreadAway": 1.87,
            "spreadHomeOpening": 1.91,
            "spreadAwayOpening": 1.91,
            "totalLine": 235.5,
            "over": 1.94,
            "under": 1.88,
            "overOpening": 1.91,
            "underOpening": 1.91
        },
        {
            "bookmaker": "William Hill",
            "region": "GB",
            "moneylineHome": 1.7,
            "moneylineAway": 2.15,
            "moneylineHomeOpening": 1.73,
            "moneylineAwayOpening": 2.1,
            "threeWayHome": null,
            "threeWayDraw": null,
            "threeWayAway": null,
            "threeWayHomeOpening": null,
            "threeWayDrawOpening": null,
            "threeWayAwayOpening": null,
            "spreadLine": -2.5,
            "spreadHome": 1.85,
            "spreadAway": 1.85,
            "spreadHomeOpening": 1.85,
            "spreadAwayOpening": 1.85,
            "totalLine": 234.5,
            "over": 1.8,
            "under": 1.91,
            "overOpening": 1.91,
            "underOpening": 1.8
        },
        "…"
    ],
    "scrapedAt": "2026-10-21T14:23:36.080Z"
}
```

With **All markets**, each row also has `markets`, one entry per price:

```json
[
    {
        "bookmaker": "bet365.us",
        "market": "spread",
        "period": "first-quarter",
        "selection": "away",
        "line": 0.5,
        "odds": 1.91,
        "opening": 1.95,
        "active": true
    },
    "…"
]
```

When the best prices of a market add up to less than 100%, `arbitrage` holds the profit and the stake split per 100 staked, for example `{ "profitPercent": 0.25, "stakes": { "home": 49.4, "away": 50.6 } }`.

The Output tab has two table views: **Games** (one row per game with the best prices) and **Bookmakers** (one row per game and bookmaker).

### How much does it cost?

**Pay-per-event pricing starts on 20 November 2026.** Until then the Actor costs only the Apify platform usage of your runs, which is small.

From 20 November 2026 you pay only for the games you get (pay per event); Apify platform usage is included.

| What                                       | Price                  |
| ------------------------------------------ | ---------------------- |
| Game with the main markets                 | $8.00 per 1,000 games  |
| Game with all markets (**All markets** on) | $15.00 per 1,000 games |
| Run start                                  | $0.05 per 1,000 runs   |

Examples:

- Tonight's NBA and NHL games with US and UK bookmakers (about 25 games): about **$0.20**.
- Two days of NFL, NBA, MLB, NHL and soccer with US and UK bookmakers (about 500 games): about **$4.00**.
- Every NBA game of the week with all markets (about 50 games): about **$0.75**.
- NBA odds every 15 minutes with **Only new or changed odds**: you pay only for games whose prices moved.

Games without odds in your regions are skipped and not charged. You can cap any run with **Max games** or with the maximum cost per run in the run options; the run stops cleanly at the limit. Apify's free plan includes $5 of monthly credit, enough for about 600 games.

### Tips

- **Days are in UTC.** *Upcoming days* 1 covers today and tomorrow, which includes tonight's games in US time zones.
- **Biggest leagues first.** NFL, NBA, MLB, NHL, the Champions League and the top soccer leagues come first, so a small **Max games** still gives you the big games.
- **When do odds appear?** Bookmakers post prices at different times: NFL and top soccer games are priced days ahead, NBA and NHL games often only the day before. A game nobody in your regions has priced yet is skipped; the run summary counts these as `gamesWithoutOdds`.
- **More bookmakers.** Add regions to compare more bookmakers: *United Kingdom* alone has 20, and *USA, New Jersey* plus *Canada, Ontario* plus *United Kingdom* gives about 30 per NBA game.
- **Only some bookmakers?** Type them in **Bookmakers**, for example `DraftKings`, `FanDuel`, `bet365` (`bet365` matches every bet365 site).
- **Live games.** Add *Live* to **Game status** to include games in play; their prices are the in-play prices listed at that moment.
- **Integrations.** Send results to Google Sheets, Slack, Zapier, Make or your own webhook with Apify [integrations](https://apify.com/integrations), or call the Actor through the [API](https://docs.apify.com/api/v2).

### FAQ

**Where do the odds come from?**
From Flashscore's odds comparison, which shows the prices of licensed bookmakers to visitors from each country or US state. The Actor asks for each region you pick and merges the results.

**How fresh are the prices?**
Each run reads the prices at that moment. Schedule runs as often as you need; with **Only new or changed odds** you get only the games whose prices changed.

**What are closing lines here?**
For finished games, the prices are the last ones the bookmakers listed before they took the game off; for US sportsbooks that is the pre-game closing line. Opening prices are always included.

**Are the arbitrage opportunities real?**
They are computed from the listed prices of all bookmakers in the run, which can be in different countries. Prices move fast, bookmakers limit stakes, and rules differ (for example on overtime or retirements), so treat them as leads and check the prices before you act.

**What does `active: false` mean?**
In the **All markets** list it marks a price the bookmaker no longer offers (suspended or taken down). The last price is kept for reference. Best and average prices use only prices that are still offered.

**Do I need a proxy?**
No. Flashscore answers Apify's servers directly. The proxy option is there in case that changes.

**Is it legal to scrape betting odds?**
This Actor collects publicly listed sports data: fixtures, scores and the odds bookmakers publish. It does not log in or collect private information. Check the source's terms and your local laws for your use case, especially for commercial use.

**Something is missing or broken?**
Open an issue in the **Issues** tab with the run link, and it will be looked at.

*Sports Odds Scraper is an independent tool. It is not affiliated with, endorsed by or connected to Flashscore, Livesport s.r.o. or any bookmaker; bookmaker names are trademarks of their owners. Odds are shown for information only and are not betting advice. If you bet, do it responsibly and only where it is legal for you.*

# Actor input Schema

## `sports` (type: `array`):

Sports to include.

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

Only these leagues. Write "Country: League" as on Flashscore (USA: NBA, USA: NFL, England: Premier League), just the league name, or paste the league URL from flashscore.com. Leave empty for all leagues of the chosen sports.

## `topLeaguesOnly` (type: `boolean`):

Only the biggest leagues of each sport (NFL, NBA, MLB, NHL, the top European soccer leagues, the Champions League, EuroLeague, ATP and WTA and others on Flashscore's top-leagues list).

## `teams` (type: `array`):

Only games of these teams or players, for example Lakers, Chiefs or Arsenal. Leave empty for all.

## `daysAhead` (type: `integer`):

How many days after today (UTC) to include. 1 covers today and tomorrow, which includes evening games in US time zones.

## `daysBack` (type: `integer`):

How many days before today to include. Use with the status "Finished" to get closing lines of games already played (up to 7 days back).

## `statuses` (type: `array`):

Only games with these statuses. Scheduled games give pre-game odds; finished games give the last prices before the end (usually the closing line). Leave empty for all.

## `regions` (type: `array`):

Bookmakers licensed in these places (up to 10). Each region adds its bookmakers to the comparison; a bookmaker found in several regions is listed once. In the US the list depends on the state.

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

Only these bookmakers, for example DraftKings, FanDuel or bet365 (bet365 matches every bet365 site). Leave empty for all bookmakers in the chosen regions.

## `markets` (type: `string`):

Main markets: moneyline, three-way (1X2), spread and total for each bookmaker. All markets adds every other price the bookmakers list (alternate lines, halves, quarters, periods, double chance, correct score and more), one entry per price.

## `oddsFormat` (type: `string`):

Decimal (1.91) or American (-110) odds.

## `onlyChanged` (type: `boolean`):

Return only games that are new or whose prices changed since the last run with the same settings. Use it with a schedule to track line movement without paying again for unchanged games.

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

Stop after this many games. 0 means no limit.

## `maxConcurrency` (type: `integer`):

How many games to load at the same time.

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

Not needed: Flashscore answers Apify's servers directly. Turn on only if requests start failing.

## Actor input object example

```json
{
  "sports": [
    "american-football",
    "basketball",
    "baseball",
    "hockey",
    "soccer"
  ],
  "leagues": [],
  "topLeaguesOnly": false,
  "teams": [],
  "daysAhead": 1,
  "daysBack": 0,
  "statuses": [
    "scheduled"
  ],
  "regions": [
    "US-NJ",
    "GB"
  ],
  "bookmakers": [],
  "markets": "main",
  "oddsFormat": "decimal",
  "onlyChanged": false,
  "maxItems": 20,
  "maxConcurrency": 10,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

# Actor output Schema

## `games` (type: `string`):

No description

## `summary` (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 = {
    "sports": [
        "american-football",
        "basketball",
        "baseball",
        "hockey",
        "soccer"
    ],
    "regions": [
        "US-NJ",
        "GB"
    ],
    "maxItems": 20
};

// Run the Actor and wait for it to finish
const run = await client.actor("keelwright/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 = {
    "sports": [
        "american-football",
        "basketball",
        "baseball",
        "hockey",
        "soccer",
    ],
    "regions": [
        "US-NJ",
        "GB",
    ],
    "maxItems": 20,
}

# Run the Actor and wait for it to finish
run = client.actor("keelwright/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 '{
  "sports": [
    "american-football",
    "basketball",
    "baseball",
    "hockey",
    "soccer"
  ],
  "regions": [
    "US-NJ",
    "GB"
  ],
  "maxItems": 20
}' |
apify call keelwright/sports-odds-scraper --silent --output-dataset

```

## MCP server setup

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