{
  "openapi": "3.0.1",
  "info": {
    "title": "Sports Betting Odds History & ATS Results Scraper",
    "description": "Historical opening and closing odds per sportsbook (spread, moneyline, total) with consensus picks from SportsBookReview, plus 20 seasons of final scores, closing lines and ATS / over-under results from Covers. NFL, NBA, MLB, NHL, WNBA, college football and basketball.",
    "version": "0.1",
    "x-build-id": "ngVPlR9s5e1A9a5XF"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/artsiom_k~sports-odds-history-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-artsiom_k-sports-odds-history-scraper",
        "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/artsiom_k~sports-odds-history-scraper/runs": {
      "post": {
        "operationId": "runs-sync-artsiom_k-sports-odds-history-scraper",
        "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/artsiom_k~sports-odds-history-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-artsiom_k-sports-odds-history-scraper",
        "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",
        "properties": {
          "entityType": {
            "title": "What to scrape",
            "enum": [
              "odds",
              "results"
            ],
            "type": "string",
            "description": "\"odds\": one row per game and sportsbook with the opening and closing spread, moneyline and total plus consensus pick percentages. Daily leagues (NBA, college basketball, MLB, NHL, WNBA) go back to about 2021; NFL and college football cover every week of the current season. \"results\": one row per game with the final score, closing spread (moneylines for MLB/NHL), closing total and who covered, for any season since 2006-07.",
            "default": "odds"
          },
          "leagues": {
            "title": "Leagues",
            "type": "array",
            "description": "Leagues to pull. Out-of-season leagues return nothing.",
            "items": {
              "type": "string",
              "enum": [
                "nfl",
                "ncaaf",
                "nba",
                "ncaab",
                "mlb",
                "nhl",
                "wnba"
              ],
              "enumTitles": [
                "NFL",
                "NCAA Football",
                "NBA",
                "NCAA Basketball",
                "MLB",
                "NHL",
                "WNBA"
              ]
            },
            "default": [
              "nfl",
              "ncaaf",
              "nba",
              "ncaab",
              "mlb",
              "nhl",
              "wnba"
            ]
          },
          "dateFrom": {
            "title": "Odds: from date",
            "type": "string",
            "description": "odds only, daily leagues: first game date (YYYY-MM-DD). Leave both dates empty for yesterday and today. Odds exist from about 2021."
          },
          "dateTo": {
            "title": "Odds: to date",
            "type": "string",
            "description": "odds only, daily leagues: last game date (YYYY-MM-DD). Defaults to today when only dateFrom is set."
          },
          "weekFrom": {
            "title": "Odds: from week (NFL/college football)",
            "minimum": 1,
            "maximum": 30,
            "type": "integer",
            "description": "odds only: first week of the current NFL/college football season. Leave empty for the current week only. With only this set, the run goes up to the current week."
          },
          "weekTo": {
            "title": "Odds: to week (NFL/college football)",
            "minimum": 1,
            "maximum": 30,
            "type": "integer",
            "description": "odds only: last week of the current season (lookahead lines exist for future weeks)."
          },
          "sportsbooks": {
            "title": "Odds: sportsbooks",
            "type": "array",
            "description": "odds only: limit rows to these sportsbooks. Leave empty for all.",
            "items": {
              "type": "string",
              "enum": [
                "betmgm",
                "bet365",
                "draftkings",
                "fanduel",
                "fanatics",
                "bet_rivers_co",
                "caesars",
                "hardrock"
              ],
              "enumTitles": [
                "BetMGM",
                "bet365",
                "DraftKings",
                "FanDuel",
                "Fanatics",
                "BetRivers",
                "Caesars",
                "Hard Rock Bet"
              ]
            }
          },
          "finalOnly": {
            "title": "Odds: finished games only",
            "type": "boolean",
            "description": "odds only: skip games that haven't finished, so every closing line is final.",
            "default": false
          },
          "seasonFrom": {
            "title": "Results: from season",
            "minimum": 2006,
            "maximum": 2100,
            "type": "integer",
            "description": "results only: first season by its starting year (2024 = the 2024-25 season; MLB/WNBA: the 2024 season). Data starts with 2006. Leave both seasons empty for the latest season."
          },
          "seasonTo": {
            "title": "Results: to season",
            "minimum": 2006,
            "maximum": 2100,
            "type": "integer",
            "description": "results only: last season by its starting year. Defaults to the latest when only seasonFrom is set."
          },
          "teams": {
            "title": "Results: teams",
            "type": "array",
            "description": "results only: limit to these teams, by their Covers slug (e.g. kansas-city-chiefs, duke-blue-devils). Leave empty for every team.",
            "items": {
              "type": "string"
            }
          },
          "maxItems": {
            "title": "Max results",
            "minimum": 1,
            "type": "integer",
            "description": "Stop after this many rows. Defaults to 50 for a quick preview; clear it (null) for everything in the chosen range.",
            "default": 50
          },
          "mode": {
            "title": "Incremental mode",
            "enum": [
              "auto",
              "full",
              "incremental"
            ],
            "type": "string",
            "description": "odds only. \"auto\": with maxItems cleared, later runs return only new rows and rows whose score, status or closing lines changed; a capped run always returns rows. \"full\": every row. \"incremental\": only new/changed. Results rows are final and always returned.",
            "default": "auto"
          },
          "concurrency": {
            "title": "Concurrency",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "Pages fetched in parallel.",
            "default": 8
          },
          "impersonate": {
            "title": "TLS impersonation target",
            "type": "string",
            "description": "curl_cffi browser fingerprint. Defaults to \"chrome\"; change only if requests start failing."
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Not needed: both sites answered every request from Apify's infrastructure without a proxy in testing.",
            "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
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "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
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}