{
  "openapi": "3.0.1",
  "info": {
    "title": "Sports Betting Odds Scraper — Live Lines by Bookmaker",
    "description": "Pull live sports betting odds from 8+ bookmakers in one run — moneyline, spreads and totals for NFL, NBA, MLB, NHL, soccer and more. One row per bookmaker line, plus live scores and a sports directory. American or decimal odds, US/UK/EU/AU regions. Export JSON, CSV or Excel.",
    "version": "1.0",
    "x-build-id": "KmBFqBs08WeIZiRxj"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/sian.agency~sports-betting-odds-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-sian.agency-sports-betting-odds-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/sian.agency~sports-betting-odds-scraper/runs": {
      "post": {
        "operationId": "runs-sync-sian.agency-sports-betting-odds-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/sian.agency~sports-betting-odds-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-sian.agency-sports-betting-odds-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",
        "required": [
          "operation"
        ],
        "properties": {
          "operation": {
            "title": "🎯 Operation — what do you want to pull?",
            "enum": [
              "odds",
              "scores",
              "sports"
            ],
            "type": "string",
            "description": "🎯 **PICK ONE OPERATION PER RUN.** Each run produces one clean dataset matching the chosen mode.\n\n- **🎲 Live Odds** — moneyline, spreads and totals for a sport, one row per bookmaker line (the main mode)\n- **🏁 Scores** — live & recent game scores for a sport (final and in-play)\n- **📚 Sports Directory** — the list of available sports and leagues with their keys\n\n💡 **TIP:** Run **Sports Directory** first to discover the exact sport key, then use it in **Live Odds** or **Scores**. Use `upcoming` as the sport to sweep the next games across all in-season sports in one run.",
            "default": "odds"
          },
          "sport": {
            "title": "🏈 Sport key",
            "type": "string",
            "description": "🏈 **The sport / league to pull (Live Odds & Scores).** Use a key from the Sports Directory operation — e.g. `americanfootball_nfl`, `basketball_nba`, `baseball_mlb`, `icehockey_nhl`, `soccer_epl`.\n\n💡 Use **`upcoming`** to get the next games across ALL in-season sports in one run (recommended starting point).\n\n⚠️ Ignored for the **Sports Directory** operation.",
            "default": "upcoming"
          },
          "regions": {
            "title": "🌍 Regions (Live Odds)",
            "type": "array",
            "description": "🌍 **Bookmaker regions to include (Live Odds).** Each region adds its bookmakers' lines.\n\n- **us** — major US books (FanDuel, DraftKings, BetMGM, Caesars…)\n- **us2** — additional US books\n- **uk / eu / au** — UK, European & Australian books\n\nLeave default (`us`) for US sportsbooks.",
            "items": {
              "type": "string",
              "enum": [
                "us",
                "us2",
                "uk",
                "eu",
                "au"
              ],
              "enumTitles": [
                "US",
                "US (extra)",
                "UK",
                "EU",
                "Australia"
              ]
            },
            "default": [
              "us"
            ]
          },
          "markets": {
            "title": "📊 Markets (Live Odds)",
            "type": "array",
            "description": "📊 **Bet markets to include (Live Odds).**\n\n- **h2h** — moneyline (win/lose)\n- **spreads** — point spreads (with the handicap line)\n- **totals** — over/under (with the total line)\n- **outrights** — futures / tournament winners (where offered)\n\nEach added market multiplies the number of rows returned.",
            "items": {
              "type": "string",
              "enum": [
                "h2h",
                "spreads",
                "totals",
                "outrights"
              ],
              "enumTitles": [
                "Moneyline (h2h)",
                "Spreads",
                "Totals (O/U)",
                "Outrights / Futures"
              ]
            },
            "default": [
              "h2h"
            ]
          },
          "oddsFormat": {
            "title": "🔢 Odds format (Live Odds)",
            "enum": [
              "american",
              "decimal"
            ],
            "type": "string",
            "description": "🔢 **How prices are expressed (Live Odds).** `american` (e.g. -110, +250) or `decimal` (e.g. 1.91, 3.50).",
            "default": "american"
          },
          "daysFrom": {
            "title": "🗓️ Days back (Scores)",
            "minimum": 1,
            "maximum": 3,
            "type": "integer",
            "description": "🗓️ **How many days of completed games to include (Scores).** `1`–`3`. Upcoming games are always included; this only widens the recent-results window.",
            "default": 1
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}