{
  "openapi": "3.0.1",
  "info": {
    "title": "Odds Arbitrage & Value Signal API",
    "description": "Cross-book best-price comparison via The Odds API (bring your own key): detect guaranteed-profit arbitrage (negative overround) with a stake-split calculator, and flag value bets against a de-vigged sharp-book (Pinnacle) fair price.",
    "version": "0.1",
    "x-build-id": "Da8xUWP3elTz4h0Jv"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/westerly_breaker~odds-arbitrage-value-signal/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-westerly_breaker-odds-arbitrage-value-signal",
        "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/westerly_breaker~odds-arbitrage-value-signal/runs": {
      "post": {
        "operationId": "runs-sync-westerly_breaker-odds-arbitrage-value-signal",
        "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/westerly_breaker~odds-arbitrage-value-signal/run-sync": {
      "post": {
        "operationId": "run-sync-westerly_breaker-odds-arbitrage-value-signal",
        "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": [
          "odds_api_key",
          "sport"
        ],
        "properties": {
          "odds_api_key": {
            "title": "The Odds API key (bring your own)",
            "type": "string",
            "description": "Your OWN The Odds API key (https://the-odds-api.com/ -- free tier: 500 requests/month). This actor is bring-your-own-key: it never ships with a shared/pooled key, and your key is never logged, stored in output, or shared. Get one at https://the-odds-api.com/#get-access."
          },
          "sport": {
            "title": "Sport / league key",
            "type": "string",
            "description": "The Odds API sport_key to fetch, e.g. \"basketball_nba\", \"soccer_epl\", \"americanfootball_nfl\". Use the special value \"upcoming\" for the next games across ALL sports when you don't know a specific league key. Validated against The Odds API's live /v4/sports catalog at run time (a free call) -- an unknown key fails the run immediately with a list of valid examples. Call https://api.the-odds-api.com/v4/sports?apiKey=YOUR_KEY to see the full current list."
          },
          "leagues": {
            "title": "Additional leagues",
            "type": "array",
            "description": "Optional list of ADDITIONAL sport_key values to fetch in the SAME run alongside 'sport' (e.g. sport=\"basketball_nba\", leagues=[\"basketball_wnba\"] fetches both). Each additional key costs its own separate Odds API quota and its own fair share of 'max_events'. Leave empty to fetch only 'sport'.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "books": {
            "title": "Bookmakers filter",
            "type": "array",
            "description": "Optional list of The Odds API bookmaker keys to restrict results to, e.g. [\"draftkings\", \"fanduel\", \"pinnacle\"]. Maps directly to the Odds API 'bookmakers' param -- does NOT change your quota cost. If non-empty and 'sharp_book' isn't in this list, it is added automatically (free) so the value-signal anchor is always fetched. Leave empty to get every bookmaker available in the requested 'regions' instead (recommended for arbitrage -- more books compared = more chance of a real cross-book gap).",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "regions": {
            "title": "Regions",
            "type": "array",
            "description": "Odds API region codes controlling which bookmakers are eligible, e.g. \"us\", \"uk\", \"eu\", \"au\". Ignored for a book already named explicitly in 'books', but still required by the upstream API in general -- defaults to [\"us\"]. NOTE: Pinnacle (the default 'sharp_book') is not always covered by region \"us\" -- add \"eu\" (or list \"pinnacle\" explicitly in 'books') if you want reliable value_flags. Each additional region multiplies quota cost (cost = markets requested x regions requested).",
            "default": [
              "us"
            ],
            "items": {
              "type": "string"
            }
          },
          "markets": {
            "title": "Markets",
            "type": "array",
            "description": "Which market type(s) to fetch and analyze: \"h2h\" (moneyline/1x2), \"spreads\" (point spread), \"totals\" (over/under). Each requested market multiplies quota cost (cost = markets requested x regions requested) -- fetching all three in one call is 3x the cost of just \"h2h\".",
            "items": {
              "type": "string",
              "enum": [
                "h2h",
                "spreads",
                "totals"
              ],
              "enumTitles": [
                "Moneyline / 1x2 (h2h)",
                "Point spread",
                "Totals (over/under)"
              ]
            },
            "default": [
              "h2h"
            ]
          },
          "min_edge_pct": {
            "title": "Minimum edge % for a value flag",
            "minimum": 0,
            "maximum": 100,
            "type": "number",
            "description": "Minimum edge (percentage points) a book's own quoted odds must clear versus 'sharp_book's de-vigged fair probability before it's reported in 'value_flags'. edge_pct = (book_odds x fair_prob - 1) x 100. Must be between 0 and 100.",
            "default": 2
          },
          "devig_method": {
            "title": "De-vig method (for the sharp-book fair price)",
            "enum": [
              "multiplicative",
              "power",
              "shin"
            ],
            "type": "string",
            "description": "How to strip 'sharp_book's own margin (vig) to compute the fair probability used as the value-bet anchor. \"multiplicative\" (default): normalize raw implied probabilities to sum to 1. \"power\": solves for a shared exponent -- shrinks longshot probabilities more aggressively. \"shin\": Shin's (1992) insider-trading model -- generally considered the most theoretically grounded for sports betting; falls back to multiplicative (logged) for the rare book with ~zero/negative overround.",
            "default": "multiplicative"
          },
          "sharp_book": {
            "title": "Sharp book (value anchor)",
            "type": "string",
            "description": "The Odds API bookmaker key treated as the fair-value anchor for the value-bet signal, e.g. \"pinnacle\" (default -- the traditional industry sharp reference). If this book doesn't cover a given event/market/line, 'value_flags' is left empty for that row with an explicit 'note' -- never silently wrong or guessed.",
            "default": "pinnacle"
          },
          "max_events": {
            "title": "Max events",
            "minimum": 1,
            "maximum": 200,
            "type": "integer",
            "description": "Maximum number of DISTINCT events to include, fair-shared across every requested sport_key ('sport' + 'leagues') so one league can't consume the whole budget. NOTE: this caps events, not output rows -- each included event still produces one output row per (market x distinct line) it has, so total billed 'event-row's is usually a multiple of this number. Must be between 1 and 200.",
            "default": 25
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}