{
  "openapi": "3.0.1",
  "info": {
    "title": "Sports Odds Aggregator — Multi-Book Lines & Line-Shop",
    "description": "Live sports betting odds aggregated across DraftKings, Bovada, Pinnacle & FanDuel (no login/key): moneyline, spread, totals & player props for NFL, NBA, WNBA, MLB, NHL, college & soccer. Best-line line-shopping, implied & no-vig fair probabilities, and arbitrage detection.",
    "version": "0.0",
    "x-build-id": "4XcON1368OUIM6n2c"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/brilliant_gum~sports-odds-aggregator/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-brilliant_gum-sports-odds-aggregator",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/acts/brilliant_gum~sports-odds-aggregator/runs": {
      "post": {
        "operationId": "runs-sync-brilliant_gum-sports-odds-aggregator",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor and returns information about the initiated run in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/runsResponseSchema"
                }
              }
            }
          }
        }
      }
    },
    "/acts/brilliant_gum~sports-odds-aggregator/run-sync": {
      "post": {
        "operationId": "run-sync-brilliant_gum-sports-odds-aggregator",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "inputSchema": {
        "type": "object",
        "required": [
          "mode"
        ],
        "properties": {
          "mode": {
            "title": "Mode",
            "enum": [
              "games",
              "event",
              "player-props",
              "best-line"
            ],
            "type": "string",
            "description": "What to scrape. games = one record per upcoming game for the chosen sport(s) with every book's moneyline/spread/total side-by-side plus best-line, no-vig and arbitrage analytics. event = the same rich record for one game by ESPN eventId. player-props = one record per player per stat market (Bovada). best-line = a line-shopping view: per market/outcome the best book and price, its edge vs the field and the no-vig fair price.",
            "default": "games"
          },
          "sport": {
            "title": "Sport (single)",
            "type": "string",
            "description": "Convenience single sport key, merged into Sports. Accepts the-odds-api style keys (basketball_nba, americanfootball_nfl, baseball_mlb, icehockey_nhl, soccer_epl, ...) or short aliases (nba, nfl, mlb, nhl, epl). Leave blank to use Sports.",
            "default": ""
          },
          "sports": {
            "title": "Sports",
            "type": "array",
            "description": "One or more sport/league keys. Supported: americanfootball_nfl, americanfootball_ncaaf, basketball_nba, basketball_wnba, basketball_ncaab, basketball_ncaaw, baseball_mlb, icehockey_nhl, soccer_epl, soccer_uefa_champs_league, soccer_uefa_europa_league, soccer_usa_mls, soccer_spain_la_liga, soccer_italy_serie_a, soccer_germany_bundesliga, soccer_france_ligue_one, mma_mixed_martial_arts. Short aliases (nba, nfl, mlb, ncaaw, uel, ...) accepted. Empty + empty Sport = baseball_mlb.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "eventId": {
            "title": "Event ID (event mode)",
            "type": "string",
            "description": "ESPN event id for mode=event (the eventId field returned by games mode). Requires a matching Sport so the league is known.",
            "default": ""
          },
          "eventIds": {
            "title": "Event IDs (event mode)",
            "type": "array",
            "description": "Multiple ESPN event ids for mode=event.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "books": {
            "title": "Books",
            "type": "array",
            "description": "Restrict output to these sportsbooks. Empty = all available. FanDuel may require a US proxy in some regions (enable proxyConfiguration); a book with no line for a given game is emitted as null.",
            "items": {
              "type": "string",
              "enum": [
                "draftkings",
                "bovada",
                "pinnacle",
                "fanduel"
              ],
              "enumTitles": [
                "DraftKings",
                "Bovada",
                "Pinnacle (sharp)",
                "FanDuel (needs US proxy)"
              ]
            },
            "default": []
          },
          "markets": {
            "title": "Markets",
            "type": "array",
            "description": "Restrict to these game-line markets. Empty = all. (Player props are their own mode.)",
            "items": {
              "type": "string",
              "enum": [
                "moneyline",
                "spread",
                "total"
              ],
              "enumTitles": [
                "Moneyline (h2h)",
                "Spread / handicap",
                "Total (over/under)"
              ]
            },
            "default": []
          },
          "oddsFormat": {
            "title": "Preferred odds format",
            "enum": [
              "american",
              "decimal",
              "fractional"
            ],
            "type": "string",
            "description": "Display preference. American, decimal and fractional prices are always emitted on every outcome regardless of this setting.",
            "default": "american"
          },
          "outputMode": {
            "title": "Output shape",
            "enum": [
              "events",
              "rows"
            ],
            "type": "string",
            "description": "events = one nested record per game (books side-by-side + analytics). rows = flat, one row per book x market x outcome (spreadsheet-friendly). Applies to games/event/best-line.",
            "default": "events"
          },
          "lookAheadDays": {
            "title": "Look-ahead days",
            "minimum": 1,
            "maximum": 60,
            "type": "integer",
            "description": "How many days ahead to include upcoming games (games/best-line/player-props). If the near window is empty (e.g. an off-season league), the actor automatically extends up to 60 days to find the next scheduled slate.",
            "default": 3
          },
          "includeStartedEvents": {
            "title": "Include started / finished games",
            "type": "boolean",
            "description": "Include in-progress and completed games (with live/final scores). Off = upcoming (pre-game) only.",
            "default": false
          },
          "dateFrom": {
            "title": "Date from (YYYY-MM-DD)",
            "type": "string",
            "description": "Lower bound on game date (UTC). Overrides Look-ahead days when set.",
            "default": ""
          },
          "dateTo": {
            "title": "Date to (YYYY-MM-DD)",
            "type": "string",
            "description": "Upper bound on game date (UTC).",
            "default": ""
          },
          "players": {
            "title": "Player filter (props)",
            "type": "array",
            "description": "player-props mode: keep only players whose name contains any of these (case-insensitive), e.g. Mahomes.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "statContains": {
            "title": "Stat filter (props)",
            "type": "array",
            "description": "player-props mode: keep only markets whose stat contains any of these, e.g. passing, rushing, receiving, strikeouts, points, rebounds, assists.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "maxPropsPerEvent": {
            "title": "Max props per event",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "Cap the number of player-prop markets read per game.",
            "default": 200
          },
          "includePlayerProps": {
            "title": "Attach player props (event mode)",
            "type": "boolean",
            "description": "event mode: also attach the game's Bovada player props under playerProps[].",
            "default": false
          },
          "computeBestLine": {
            "title": "Compute best line",
            "type": "boolean",
            "description": "Add the best (highest-payout) price per outcome across books and isBestPrice flags.",
            "default": true
          },
          "computeNoVig": {
            "title": "Compute no-vig fair odds",
            "type": "boolean",
            "description": "Add de-vigged fair probabilities and the book margin (overround) per market.",
            "default": true
          },
          "computeArbitrage": {
            "title": "Detect arbitrage",
            "type": "boolean",
            "description": "Flag risk-free arbitrage across books (moneyline/total) with ROI% and stake split.",
            "default": true
          },
          "includeOpeningLines": {
            "title": "Include opening lines",
            "type": "boolean",
            "description": "Include DraftKings opening lines alongside closing (line-movement reference).",
            "default": true
          },
          "includeAlternateLines": {
            "title": "Include alternate-line ladders",
            "type": "boolean",
            "description": "Attach the full alternate spread/total ladders (multiple points per market) under each book's alternateLines. Pinnacle carries complete ladders; other books expose only the main line.",
            "default": false
          },
          "monitoringMode": {
            "title": "Line-movement monitoring",
            "type": "boolean",
            "description": "Track line movement across scheduled runs. Persists last-seen prices in a named key-value store and attaches lineMovement[] (previousPrice, priceChange, moveDirection, firstSeenPrice) to each game record (events output). Run the actor on a schedule to build history.",
            "default": false
          },
          "minArbPct": {
            "title": "Min arbitrage ROI % (filter)",
            "minimum": 0,
            "maximum": 100,
            "type": "integer",
            "description": "Only emit games whose best cross-book arbitrage ROI is at least this percent (0 = no filter). Applies to games/best-line.",
            "default": 0
          },
          "minBestEdgePct": {
            "title": "Min best-line edge % (filter)",
            "minimum": 0,
            "maximum": 100,
            "type": "integer",
            "description": "Only emit games with a best-line edge vs the no-vig fair price of at least this percent (0 = no filter). Applies to games/best-line.",
            "default": 0
          },
          "maxItems": {
            "title": "Max items",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "Maximum number of output records for the whole run.",
            "default": 50
          },
          "maxEventsPerSport": {
            "title": "Max events per sport",
            "minimum": 0,
            "maximum": 100000,
            "type": "integer",
            "description": "Cap games processed per sport (0 = no cap, limited only by Max items).",
            "default": 0
          },
          "pinnacleApiKey": {
            "title": "Pinnacle API key (optional)",
            "type": "string",
            "description": "Optional override for Pinnacle's data key. Leave blank to use the built-in default.",
            "default": ""
          },
          "fanduelApiKey": {
            "title": "FanDuel API key (optional)",
            "type": "string",
            "description": "Optional override for FanDuel's data key. Leave blank to use the built-in default. FanDuel also requires a US IP — enable proxyConfiguration.",
            "default": ""
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Optional proxy. The feeds are public and work without a proxy; enable a US datacenter or residential proxy only if you hit collective rate-limits or geo-blocks.",
            "default": {
              "useApifyProxy": false
            }
          }
        }
      },
      "runsResponseSchema": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "actId": {
                "type": "string"
              },
              "userId": {
                "type": "string"
              },
              "startedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "finishedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "status": {
                "type": "string",
                "example": "READY"
              },
              "meta": {
                "type": "object",
                "properties": {
                  "origin": {
                    "type": "string",
                    "example": "API"
                  },
                  "userAgent": {
                    "type": "string"
                  }
                }
              },
              "stats": {
                "type": "object",
                "properties": {
                  "inputBodyLen": {
                    "type": "integer",
                    "example": 2000
                  },
                  "rebootCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "restartCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "resurrectCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "computeUnits": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "options": {
                "type": "object",
                "properties": {
                  "build": {
                    "type": "string",
                    "example": "latest"
                  },
                  "timeoutSecs": {
                    "type": "integer",
                    "example": 300
                  },
                  "memoryMbytes": {
                    "type": "integer",
                    "example": 1024
                  },
                  "diskMbytes": {
                    "type": "integer",
                    "example": 2048
                  }
                }
              },
              "buildId": {
                "type": "string"
              },
              "defaultKeyValueStoreId": {
                "type": "string"
              },
              "defaultDatasetId": {
                "type": "string"
              },
              "defaultRequestQueueId": {
                "type": "string"
              },
              "buildNumber": {
                "type": "string",
                "example": "1.0.0"
              },
              "containerUrl": {
                "type": "string"
              },
              "usage": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "integer",
                    "example": 1
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "usageTotalUsd": {
                "type": "number",
                "example": 0.00005
              },
              "usageUsd": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "number",
                    "example": 0.00005
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}