# US Sportsbook Odds: DraftKings, FanDuel, BetMGM, Caesars Lines (`automatic/actionnetwork-odds`) Actor

Compare the moneyline, spread and total at DraftKings, FanDuel, BetMGM, Caesars, bet365, BetRivers and Unibet for NFL, NBA, NHL, MLB, college and soccer games: one record per market per sportsbook, as relayed by Action Network, with American and decimal odds and implied probability.

- **URL**: https://apify.com/automatic/actionnetwork-odds.md
- **Developed by:** [Philip Kirkbride](https://apify.com/automatic) (community)
- **Categories:** Sports
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.30 / 1,000 market records

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

## US Sportsbook Odds: DraftKings, FanDuel, BetMGM, Caesars Lines

Compare the main betting lines of the big US sportsbooks game by game:
moneyline, point spread and total at DraftKings, FanDuel, BetMGM, Caesars,
bet365, BetRivers and Unibet, for the NFL, NBA, NHL, MLB, college football and
basketball, the main soccer leagues and UFC. Each record is one market for one
game at one sportsbook, with American odds, decimal odds and the implied
probability of every side, plus a blended consensus line and the opening line
for reference. Built for bettors, line shoppers, model builders and odds-site
developers who schedule runs and pipe the JSON into alerts, dashboards or
models. No sportsbook account is needed.

**These are second-hand prices.** The Actor does not read the sportsbooks
themselves. It collects the lines that Action Network, a sports media site,
publishes for each book. Every record says so: `source` is `actionnetwork`,
`book` is the sportsbook the price belongs to, and `firstParty` is `false`.
Show them as "DraftKings (via Action Network)". A relayed price can trail the
sportsbook by seconds or minutes, and a sportsbook can disappear from the
relay without notice.

**A relayed line can also be stale or plainly wrong.** Seen on 2026-11-11 for
one NBA game (Miami at Utah) at the same moment: most books at -355 to -405
on the favourite, a spread of -8.5 to -9.5 and a total of 225.5 to 227.5,
while Unibet (NJ) still showed -250 and -6.5, a line that had been right
about twenty minutes earlier, and BetMGM (NJ) showed a total of 0.5. Do not
rank these records as "best price" without checking them first. See "What to
filter" in the FAQ.

Data only, not betting or financial advice. This is an unofficial tool: it is
not affiliated with or endorsed by Action Network or any sportsbook.

### Use cases

- **Line shopping:** the best moneyline, spread or total for a game across
  eight sportsbooks in one run.
- **Market view:** each book next to the blended consensus line and the
  opening line, to see who is off the market and how far a line has moved.
- **Model inputs:** American odds, decimal odds and implied probability per
  side, ready for no-vig and expected-value calculations.
- **Cross-source comparison:** join sportsbook lines with prediction-market or
  exchange records on sport, league, teams and start time through the shared
  `canonical` envelope. Home and away are explicit.
- **Public betting splits:** optional share of tickets and of money on each
  side of a market.

### Quick start

1. Open the Actor and click **Start**. The prefilled form collects this week's
   NFL games and NBA games for today and the next two days, at the default
   sportsbooks: about 700 records, about $0.20 (see Pricing).
2. Read the rows in the **Output** tab, or export them as JSON, CSV or Excel.

Tonight's NHL totals at three sportsbooks:

```json
{"leagues": ["nhl"], "books": ["draftkings_nj", "fanduel_nj", "betmgm_nj"], "marketFamilies": ["totals"]}
```

A Premier League weekend with three-way moneylines:

```json
{"leagues": ["epl"], "dateFrom": "2026-11-21", "dateTo": "2026-11-22"}
```

NFL first-half lines and team totals, with betting percentages:

```json
{"leagues": ["nfl"], "periods": ["game", "first_half"], "marketFamilies": ["moneyline", "spreads", "totals", "team_totals"], "includeBettingPercentages": true, "maxResults": 5000}
```

An empty input (`{}`, no league, book, date or `maxResults`) is a sample: at
most 10 records of current lines from the NFL, NBA, NHL, MLB or WNBA at the
default books, and the run's status message says it was a sample. Name
`leagues` (and `maxResults`) for a full run.

An input that leaves `leagues` out but sets anything else (for example
`{"maxResults": 1000}`) collects the default scope: the NFL's current week and
NBA games for today and the next two days, at the ten default books, up to
1,000 records. When neither league has a priced game in that window (for
example in July) the run stops with a message that says so and asks you to
pick leagues and dates; it never widens the scope by itself.

An empty list (`"leagues": []` or `"books": []`, or `null`) is refused with an
error that names the field, so a pipeline that sends one is never charged for
a sample or for the default scope. An empty date is the same as no date.

### Input

| Name | Type | Default | What it does |
| --- | --- | --- | --- |
| `leagues` | array | NFL and NBA (a 10-record sample for an empty input) | Leagues to collect: `nfl`, `ncaaf`, `nba`, `wnba`, `ncaab`, `ncaaw`, `mlb`, `nhl`, `epl`, `laliga`, `seriea`, `bundesliga`, `ligue_1`, `ucl`, `uel`, `mls`, `soccer`, `ufc`. |
| `books` | array | the ten default books | Sportsbook keys from the table under "Which sportsbooks", or a numeric book id from the source's catalogue. At most 40 per run. |
| `marketFamilies` | array | `["moneyline", "spreads", "totals"]` | Any of `moneyline`, `spreads`, `totals`, `team_totals`. |
| `periods` | array | `["game"]` | Any of `game`, `first_half`, `first_period`, `second_period`, `third_period`, `fourth_period`. |
| `dateFrom` / `dateTo` | string | today to today + 2 | Game days as `YYYY-MM-DD` (US Eastern calendar days). With only `dateFrom`, that single day. At most 14 days. |
| `includeBettingPercentages` | boolean | `false` | Add the share of tickets and of money on each side, where published. |
| `maxResults` | integer | `1000` (`10` for an empty input) | Maximum dataset records per run (1–20,000). |
| `requestDelaySecs` | number | `1` | Seconds between requests (0.5–10). |

Notes on the inputs:

- `soccer` collects every soccer competition listed for the day. Games from a
  competition without a league key of its own get `league: null`.
- The NFL and college football are listed by week, not by day: only the
  current week is available. With no dates set you get the whole week; with
  dates set you get the games of the week that fall inside them.
- `first_period` to `fourth_period` are quarters in football and basketball
  and periods in hockey. A period that does not apply to a league is skipped
  for that league and noted in the run summary.
- A misspelt input field, an unknown league or book, or a window over the
  limits stops the run with an error that names the problem. A numeric book
  id that the source does not list also stops the run before any odds are
  read.

### Output

One record is one market for one game at one book.

- **Identity:** `recordKey` (`actionnetwork:<book>:<market id>`), `source`,
  `collectedAt`, `sourceUrl`.
- **What it is:** `sport`, `league`, `book`, `bookKind`, `family`
  (`moneyline`, `moneyline_3way`, `spreads`, `totals` or `team_totals`),
  `period`, `eventStatus` (`scheduled`, `in_progress`, `final`, `postponed`,
  `canceled`, `delayed` or `unknown`).
- **`quote`:** the price itself, in the flat shape all our sportsbook-odds
  Actors share:
  - `source`, `book`, `bookName` and `firstParty` (always `false` here);
  - `league`, `sport`, `eventNativeId`, `startTime` (UTC), `home`, `away`;
  - `family`, `period`, `includesOvertime`, `line` and `subject`;
  - `selections`: one entry per side with `role` (`home`, `away`, `draw`,
    `over`, `under`), `name`, `line`, `american`, `decimal` and
    `impliedProbability`;
  - `limits` (never published here, so `null`), `sourceUpdatedAt`,
    `collectedAt` and `url`.
- **`canonical`:** the same market as the shared sports envelope our other
  sports Actors use, for joining across sources. Detail without a field of its
  own is under `canonical.extensions.actionnetwork`: the book id, brand and
  state, whether the market is an in-play one, the source's market and outcome
  ids, rotation numbers and, when asked for, `bettingPercentages`.

How to read the lines:

- `quote.line` of a spread is the home team's line: `-2.5` means the home team
  gives 2.5 points. Each side also carries its own signed `line`. For totals
  both sides carry the total. Moneylines have no line.
- Soccer moneylines are three-way (`moneyline_3way`) with a `draw` side.
- A team total names its team in `quote.subject`.
- `impliedProbability` is `1 / decimal` of that single price. It includes the
  sportsbook's margin, so the sides of a market add up to more than 1.
- A side that is not priced is kept with `american`, `decimal` and
  `impliedProbability` all `null`. It is never dropped and never given a zero.
- `includesOvertime` is always `null`: the relay does not say whether a line
  settles including overtime or on regulation time. US sportsbooks normally
  settle hockey moneylines including overtime and soccer lines on 90 minutes,
  but that is not stated per price here, so check before comparing with a
  regulation-time line from another source.
- `sourceUpdatedAt` is always `null`: the relay does not say when a sportsbook
  last changed a price. `collectedAt` is when the run read it.
- Once a game starts, a book's in-play line replaces its pre-game line
  (`eventStatus: "in_progress"`). The opening line stays as it was.
- UFC fighters are not home or away; the record uses the order the source
  lists them in and says so in the extension.

The run summary (`OUTPUT` in the key-value store) reports records per league,
market and book, books that returned nothing, sides without a price, requests
made, warnings and the status `succeeded`, `succeeded_empty`,
`succeeded_partial` or `failed`.

### Output example

Selected fields of a real record collected 2026-11-11 (full records also carry
`sourceUrl` and `canonical`):

```json
{"recordKey":"actionnetwork:draftkings_nj:21805773","source":"actionnetwork","collectedAt":"2026-11-11T00:24:08Z","sport":"american_football","league":"nfl","eventStatus":"scheduled","book":"draftkings_nj","bookKind":"sportsbook","family":"spreads","period":"game","quote":{"quoteVersion":"1.1","source":"actionnetwork","book":"draftkings_nj","bookName":"DraftKings (NJ)","firstParty":false,"league":"nfl","sport":"american_football","eventNativeId":"290970","startTime":"2026-11-13T01:15:00Z","home":"New York Giants","away":"Washington Commanders","family":"spreads","period":"game","includesOvertime":null,"line":-2.5,"subject":null,"selections":[{"role":"home","name":"New York Giants","line":-2.5,"american":-110,"decimal":1.9091,"impliedProbability":0.5238},{"role":"away","name":"Washington Commanders","line":2.5,"american":-110,"decimal":1.9091,"impliedProbability":0.5238}],"limits":{"maxStake":null,"currency":null},"sourceUpdatedAt":null,"collectedAt":"2026-11-11T00:24:08Z","url":"https://www.actionnetwork.com/nfl/odds"}}
```

### Which sportsbooks

The default set, used when `books` is left out. Each returned moneyline, spread
and total for NFL, NBA and NHL games on 2026-11-10.

| Key | Name | Kind | Note |
| --- | --- | --- | --- |
| `draftkings_nj` | DraftKings (NJ) | Sportsbook |  |
| `fanduel_nj` | FanDuel (NJ) | Sportsbook |  |
| `betmgm_nj` | BetMGM (NJ) | Sportsbook |  |
| `caesars_nj` | Caesars (NJ) | Sportsbook |  |
| `bet365_nj` | bet365 (NJ) | Sportsbook |  |
| `betrivers_nj` | BetRivers (NJ) | Sportsbook |  |
| `betrivers_ny` | BetRivers (NY) | Sportsbook | Same prices as `betrivers_nj` on every game checked |
| `unibet_nj` | Unibet (NJ) | Sportsbook |  |
| `consensus` | Consensus (Action Network blended line, not a sportsbook) | Not a sportsbook: blended line |  |
| `open` | Opening line (recorded by Action Network, not a sportsbook) | Not a sportsbook: opening line |  |

More keys you can ask for. Each returned prices on 2026-11-10.

| Key | Name | Kind | Note |
| --- | --- | --- | --- |
| `fanatics_nj` | Fanatics (NJ) | Sportsbook |  |
| `fanatics_ny` | Fanatics (NY) | Sportsbook | Same prices as `fanatics_nj` on every game checked |
| `fanatics_pa` | Fanatics (PA) | Sportsbook | Same prices as `fanatics_nj` on every game checked |
| `thescore_nj` | theScore Bet (NJ) | Sportsbook |  |
| `thescore_pa` | theScore Bet (PA) | Sportsbook | Same prices as `thescore_nj` on every game checked |
| `thescore_on` | theScore Bet (ON) | Sportsbook | Same prices as `thescore_nj` on every game checked |
| `hardrock_nj` | Hard Rock Bet (NJ) | Sportsbook | NFL and NHL only when checked; no NBA |
| `hardrock_fl` | Hard Rock Bet (FL) | Sportsbook | Same prices as `hardrock_nj` on every game checked. NFL and NHL only when checked; no NBA |
| `bally_bet_nj` | Bally Bet (NJ) | Sportsbook |  |
| `bally_bet_ny` | Bally Bet (NY) | Sportsbook | Same prices as `bally_bet_nj` on every game checked |
| `betrivers_pa` | BetRivers (PA) | Sportsbook |  |
| `unibet_pa` | Unibet (PA) | Sportsbook |  |
| `parx_pa` | Parx (PA) | Sportsbook |  |
| `draftkings_ny` | DraftKings (NY) | Sportsbook | Same prices as `draftkings_nj` on every game checked |
| `draftkings_pa` | DraftKings (PA) | Sportsbook | Same prices as `draftkings_nj` on every game checked |
| `draftkings_co` | DraftKings (CO) | Sportsbook | Same prices as `draftkings_nj` on every game checked |
| `draftkings_il` | DraftKings (IL) | Sportsbook | Same prices as `draftkings_nj` on every game checked |
| `fanduel_ny` | FanDuel (NY) | Sportsbook | Same prices as `fanduel_nj` on every game checked |
| `fanduel_pa` | FanDuel (PA) | Sportsbook | Same prices as `fanduel_nj` on every game checked |
| `fanduel_co` | FanDuel (CO) | Sportsbook | Same prices as `fanduel_nj` on every game checked |
| `betmgm_ny` | BetMGM (NY) | Sportsbook | Same prices as `betmgm_nj` on every game checked |
| `betmgm_pa` | BetMGM (PA) | Sportsbook | Same prices as `betmgm_nj` on every game checked |
| `betmgm_nv` | BetMGM (NV) | Sportsbook | Same prices as `betmgm_nj` on every game checked |
| `caesars_ny` | Caesars (NY) | Sportsbook | Same prices as `caesars_nj` on every game checked |
| `caesars_pa` | Caesars (PA) | Sportsbook | Same prices as `caesars_nj` on every game checked |
| `caesars_nv` | Caesars (NV) | Sportsbook | Same prices as `caesars_nj` on every game checked |
| `bet365_pa` | bet365 (PA) | Sportsbook |  |
| `bet365_co` | bet365 (CO) | Sportsbook | Same prices as `bet365_pa` on every game checked |
| `kalshi` | Kalshi (prediction market, not a sportsbook) | Not a sportsbook: prediction market |  |
| `polymarket` | Polymarket (prediction market, not a sportsbook) | Not a sportsbook: prediction market |  |
| `polymarket_us` | Polymarket US (prediction market, not a sportsbook) | Not a sportsbook: prediction market | Same prices as `polymarket` on every game checked |

Most per-state keys of one brand carry the same prices: on 2026-11-10 the New
York, Pennsylvania, Colorado, Illinois and Nevada keys of DraftKings, FanDuel,
BetMGM, Caesars, Fanatics and theScore Bet matched the New Jersey prices on all
27 games checked. Asking for several states of one brand mostly adds
duplicates. Circa, Pinnacle, Bovada, BetOnline, Westgate, Borgata and PointsBet
returned no prices when checked.

### Pricing

Pay per result: **$0.0003 per dataset record** (one market for one game at one
book), which is $0.30 per 1,000 records, plus **$0.00005 per run start**.

Worked sizes, measured 2026-11-10, at that price:

| Run | Records | Cost |
| --- | --- | --- |
| Empty input (sample) | at most 10 | about $0.003 |
| Default scope (NFL week and NBA, ten books, three markets; the prefilled form) | 681 | about $0.20 |
| NFL, NBA and NHL, same books and markets | 1,130 | about $0.34 |
| One game at one book, default markets | 3 | about $0.001 |

Use `leagues`, `books`, `marketFamilies`, the date window and `maxResults` to
keep runs small. A run that matches nothing pays only the run start. A run's
maximum charge, if you set one, stops the dataset at the last record it
covers, and the run summary says so.

### Scheduling and monitoring

- **Line movement:** schedule a league-scoped run (for example every ten
  minutes on game days) and key your history on `recordKey` plus
  `collectedAt`. Compare against the `open` book for the move since opening.
- **Best price alerts:** schedule a run for today's games and compare
  `selections` across `book` for the same `eventNativeId`, `family` and
  `line`.
- **Closing lines:** run once after the games finish; finished games keep the
  last line shown for them.
- Records are a fresh snapshot each run; nothing is remembered between runs.
  De-duplicate on `recordKey`.

### FAQ

**Are these the sportsbooks' own prices?** They are the sportsbooks' prices as
relayed by Action Network, not read from the sportsbooks. Expect them to match
closely before a game and to trail during fast moves. Check the sportsbook
before acting on a price.

**What to filter before comparing books?** At least this:

- drop a total that is impossible for the sport (a basketball total under
  100, a football total under 20, a hockey total outside 3 to 10);
- drop a market whose two prices cannot belong together: implied
  probabilities that sum to less than 1, or to much more than about 1.25;
- when three or more books price the same game, drop a book whose spread is
  more than 1.5 points (0.5 in hockey, soccer and baseball) from the median,
  whose total is more than about 3% from it, or whose moneyline, with the
  margin removed, is more than 4 percentage points from it;
- leave out `consensus` and `open` (they are not sportsbooks), and count
  `betrivers_ny` and `betrivers_nj` as one book.

A record that fails these is usually a line the relay did not update, not a
price you can bet. The Actor does not apply these checks for you: it returns
every price the relay shows, as shown, so filter the records yourself before
ranking books.

**How fresh is a price?** The run reads the relay at run time. The relay does
not publish when each price last changed, so freshness cannot be shown per
price; `collectedAt` is the only timestamp.

**What are `consensus` and `open`?** Not sportsbooks. `consensus` is a blended
line across books and `open` is the recorded opening line. Leave them out of
`books` if you only want real sportsbooks, or filter on `bookKind`.

**Why does a book have no record for a game?** The relay had no line for it:
lines are posted a day or two ahead for the NBA and NHL and about a week ahead
for the NFL, and smaller books skip some games and markets. The run summary
lists books that returned nothing.

**Are New Jersey prices valid in my state?** Usually the same, not always. The
per-state keys of the big brands matched New Jersey on every game checked.

**Can I get player props, alternate lines or futures?** No. This Actor
collects main lines only.

**Export formats?** JSON, CSV, Excel, XML or RSS from the dataset, or read it
through the Apify API in your own pipeline.

### Limits

- Second-hand prices from an unofficial source that can lag a sportsbook,
  drop a sportsbook, change or become unavailable without notice. Check a
  run's status and warnings before relying on it.
- Main lines only: moneyline, spread, total and optional team totals. No
  player props, alternate lines, futures or historical line series; build
  history by scheduling runs.
- No time of last price change, no stake limits, and no statement of whether
  a hockey or soccer line includes overtime.
- The NFL and college football are available for the current week only.
  Second-half lines and baseball innings are not collected.
- Not supported: Liga MX, Brasileirao, Eredivisie, tennis, golf and motor
  racing.
- Team names are the source's spellings and are not matched to other sources.
- Sportsbook availability and prices differ by US state. You are responsible
  for using the data in line with the terms of the sites it comes from and the
  laws that apply to you.

For support, contact Apify support and include the Actor run ID.

# Actor input Schema

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

Leagues to collect. Leave the field out to collect the default scope (NFL and NBA); that default run stops with a clear message when neither league has a priced game in the date window, for example in July. An empty list is refused. An input with no league, book, date or maxResults at all runs a 10-record sample. "soccer" collects every soccer competition listed for the day.

## `books` (type: `array`):

Sportsbooks to compare, by key. Leave the field out for the default set (an empty list is refused): draftkings_nj, fanduel_nj, betmgm_nj, caesars_nj, bet365_nj, betrivers_nj, betrivers_ny, unibet_nj, consensus, open. "consensus" (a blended line) and "open" (the recorded opening line) are not sportsbooks. More keys are listed in the README; a numeric book id from the source's catalogue is also accepted. At most 40 per run.

## `marketFamilies` (type: `array`):

Which main lines to collect. Team totals (each team's own over/under) are optional and add up to two records per game per sportsbook.

## `periods` (type: `array`):

Full-game lines by default. The first half and quarters apply to football and basketball, the first half to soccer, periods to hockey; a period that does not apply to a league is skipped for it. Fewer sportsbooks publish period lines.

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

First game day to collect, as YYYY-MM-DD (US Eastern calendar day). Leave both dates empty for today and the next 2 days, plus the whole current week for the NFL and college football. With only this date set, that single day is collected.

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

Last game day to collect, as YYYY-MM-DD. A window may cover at most 14 days. NFL and college football are only available for the current week.

## `includeBettingPercentages` (type: `boolean`):

Add the share of tickets and of money on each side of a market, where published, to the record's canonical extension.

## `maxResults` (type: `integer`):

Stop after this many dataset records (one record is one market for one game at one sportsbook). Leave it out with no league, book or date set and the run is a 10-record sample; otherwise 1,000 when left out.

## `requestDelaySecs` (type: `number`):

Seconds between request starts. The default of 1 keeps the run to about one request per second.

## Actor input object example

```json
{
  "leagues": [
    "nfl",
    "nba"
  ],
  "books": [
    "draftkings_nj",
    "fanduel_nj",
    "betmgm_nj",
    "caesars_nj",
    "bet365_nj",
    "betrivers_nj",
    "betrivers_ny",
    "unibet_nj",
    "consensus",
    "open"
  ],
  "marketFamilies": [
    "moneyline",
    "spreads",
    "totals"
  ],
  "periods": [
    "game"
  ],
  "includeBettingPercentages": false,
  "maxResults": 1000,
  "requestDelaySecs": 1
}
```

# Actor output Schema

## `results` (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 = {
    "leagues": [
        "nfl",
        "nba"
    ],
    "books": [
        "draftkings_nj",
        "fanduel_nj",
        "betmgm_nj",
        "caesars_nj",
        "bet365_nj",
        "betrivers_nj",
        "betrivers_ny",
        "unibet_nj",
        "consensus",
        "open"
    ],
    "marketFamilies": [
        "moneyline",
        "spreads",
        "totals"
    ],
    "periods": [
        "game"
    ],
    "includeBettingPercentages": false,
    "maxResults": 1000,
    "requestDelaySecs": 1
};

// Run the Actor and wait for it to finish
const run = await client.actor("automatic/actionnetwork-odds").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": [
        "nfl",
        "nba",
    ],
    "books": [
        "draftkings_nj",
        "fanduel_nj",
        "betmgm_nj",
        "caesars_nj",
        "bet365_nj",
        "betrivers_nj",
        "betrivers_ny",
        "unibet_nj",
        "consensus",
        "open",
    ],
    "marketFamilies": [
        "moneyline",
        "spreads",
        "totals",
    ],
    "periods": ["game"],
    "includeBettingPercentages": False,
    "maxResults": 1000,
    "requestDelaySecs": 1,
}

# Run the Actor and wait for it to finish
run = client.actor("automatic/actionnetwork-odds").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": [
    "nfl",
    "nba"
  ],
  "books": [
    "draftkings_nj",
    "fanduel_nj",
    "betmgm_nj",
    "caesars_nj",
    "bet365_nj",
    "betrivers_nj",
    "betrivers_ny",
    "unibet_nj",
    "consensus",
    "open"
  ],
  "marketFamilies": [
    "moneyline",
    "spreads",
    "totals"
  ],
  "periods": [
    "game"
  ],
  "includeBettingPercentages": false,
  "maxResults": 1000,
  "requestDelaySecs": 1
}' |
apify call automatic/actionnetwork-odds --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,automatic/actionnetwork-odds"
        }
    }
}
```

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/4Lu4GYEhQkm36I9OK/builds/2BssQ5TKfOSogCB5j/openapi.json
