{
  "openapi": "3.0.1",
  "info": {
    "title": "Sports Odds Aggregator — Bet365 + Pinnacle, PPE",
    "description": "Pre-match and live odds from Bet365 + Pinnacle in one normalized feed. 11 sports, h2h / spreads / totals / player props. PPE from $0.008 per snapshot. Datacenter proxy works — no residential needed. The Odds API + OddsJam alternative for sharp bettors and EV-modelling teams.",
    "version": "0.3",
    "x-build-id": "hltmNJxwlzI8aedA2"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/zhorex~sports-odds-aggregator/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-zhorex-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/zhorex~sports-odds-aggregator/runs": {
      "post": {
        "operationId": "runs-sync-zhorex-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/zhorex~sports-odds-aggregator/run-sync": {
      "post": {
        "operationId": "run-sync-zhorex-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",
        "properties": {
          "books": {
            "title": "Sportsbooks",
            "type": "array",
            "description": "Which sportsbooks to pull odds from. Pinnacle is the canonical sharp-line book and works on datacenter or residential proxy without auth. Bet365 support is temporarily UNDER REPAIR (their public mobile-web endpoints recently changed — a defensive patch is in active development; selecting Bet365 right now returns 0 events while the new path is published). US books (DraftKings / FanDuel / BetMGM) are intentionally out of scope: they require US residential proxy.",
            "items": {
              "type": "string",
              "enum": [
                "pinnacle",
                "bet365"
              ]
            },
            "default": [
              "pinnacle"
            ]
          },
          "sports": {
            "title": "Sports",
            "type": "array",
            "description": "Which sports to query. Pick the ones with active fixtures during your scheduled-run window — empty selections waste a run budget. Soccer + tennis are the highest-liquidity / sharpest-priced markets year-round.",
            "items": {
              "type": "string",
              "enum": [
                "soccer",
                "tennis",
                "basketball",
                "ice_hockey",
                "mma",
                "baseball",
                "american_football_intl",
                "rugby_union",
                "rugby_league",
                "cricket",
                "esports"
              ]
            },
            "default": [
              "soccer",
              "tennis"
            ]
          },
          "leagueFilter": {
            "title": "League filter (optional)",
            "type": "array",
            "description": "Optional league codes / display-name fragments to whitelist (e.g. 'EPL', 'UEFA', 'ATP', 'NBA'). Empty = all leagues for the chosen sports. Case-insensitive substring match against the book's league label.",
            "items": {
              "type": "string"
            },
            "default": []
          },
          "marketTypes": {
            "title": "Market types",
            "type": "array",
            "description": "Which betting markets to extract per event. 'h2h' (moneyline) is the canonical sharp market. 'spreads' (handicap) and 'totals' (over/under) drive most EV-modelling pipelines. 'specials' enables Pinnacle's futures / yes-no / first-team-to-score / exact-totals / team-props markets (premium $0.04 tier — there are 5,000+ specials per major sport, so use maxEventsPerSport to control volume). 'player_props' is the Bet365-only player-prop tier (premium $0.04 — currently returns empty while Bet365 mode is under repair).",
            "items": {
              "type": "string",
              "enum": [
                "h2h",
                "spreads",
                "totals",
                "first_half_h2h",
                "first_half_spreads",
                "first_half_totals",
                "specials",
                "player_props"
              ]
            },
            "default": [
              "h2h",
              "spreads",
              "totals"
            ]
          },
          "mode": {
            "title": "Mode",
            "enum": [
              "pre_match_only",
              "live_only",
              "pre_match_and_live"
            ],
            "type": "string",
            "description": "'pre_match_only' (default) returns scheduled fixtures and is the cheapest, most-common workflow (5-15 min cadence). 'live_only' returns in-play markets — premium pricing tier; use with scheduled runs at ≤5 min cadence. 'pre_match_and_live' covers both, useful for arb finders that want to compare scheduled vs in-play lines.",
            "default": "pre_match_only"
          },
          "priceFormat": {
            "title": "Price format",
            "enum": [
              "decimal",
              "american",
              "fractional"
            ],
            "type": "string",
            "description": "Output price format. 'decimal' (1.91) is the sharp / EU standard and is most convenient for implied-probability math; the actor ALWAYS computes the other two as well so all three fields are always populated.",
            "default": "decimal"
          },
          "maxEventsPerSport": {
            "title": "Max events per sport (hard cap)",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Safety cap on number of events extracted per (book, sport) pair. Multiply by ~5-10 market-outcomes per event to estimate snapshot volume per run.",
            "default": 50
          },
          "includeBestPriceFlag": {
            "title": "Flag best price across books",
            "type": "boolean",
            "description": "When ≥2 books are selected, mark exactly one outcome per (event, market, outcome) as the best price across the chosen books. This is the foundation for any 2-way arbitrage workflow.",
            "default": true
          },
          "deduplicationWindowSeconds": {
            "title": "Dedup window (seconds)",
            "minimum": 0,
            "maximum": 3600,
            "type": "integer",
            "description": "If a price hasn't changed within this many seconds, suppress the duplicate snapshot — keeps PPE cost down on cron runs where most lines are stable. Set to 0 to disable and emit every snapshot.",
            "default": 30
          },
          "cookieStrings": {
            "title": "Optional per-book cookie strings",
            "type": "object",
            "description": "Optional. Object keyed by book name ({ 'bet365': '...', 'pinnacle': '...' }) with raw cookie headers from your browser DevTools to raise per-IP rate limits on heavy runs. NOT required for typical workloads — both books work anonymously."
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Apify proxy is enabled by default. For best cost/quality, set apifyProxyGroups: ['DATACENTER'] if your Apify plan includes datacenter proxy — both supported books work on datacenter IPs and using residential burns ~20x the proxy cost with no quality lift. RESIDENTIAL is the most-universal fallback; enable it if you hit persistent rate-limit warnings in the run log.",
            "default": {
              "useApifyProxy": true
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}