{
  "openapi": "3.0.1",
  "info": {
    "title": "Sports Betting Odds Scraper: NFL, NBA, MLB & Soccer Lines",
    "description": "Scrape prematch betting odds for NFL, NBA, MLB, NHL, college and top soccer. Every sportsbook's moneyline, spread and total in one row per game: 5 US books, up to 20 in the UK, 26 in Brazil. Opening price and movement on each, plus vig free fair odds and arbitrage.",
    "version": "0.0",
    "x-build-id": "uPEYEA2EhStXVqnML"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/sourabhbgp~sports-odds-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-sourabhbgp-sports-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/sourabhbgp~sports-odds-scraper/runs": {
      "post": {
        "operationId": "runs-sync-sourabhbgp-sports-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/sourabhbgp~sports-odds-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-sourabhbgp-sports-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",
        "properties": {
          "leagues": {
            "title": "Leagues",
            "type": "array",
            "description": "Leagues to pull odds for. Pick any combination. A league that is out of season simply returns nothing and the run says so.",
            "items": {
              "type": "string",
              "enum": [
                "nfl",
                "ncaaf",
                "cfl",
                "nba",
                "wnba",
                "ncaab",
                "mlb",
                "nhl",
                "mls",
                "epl",
                "laliga",
                "bundesliga",
                "seriea",
                "ligue1",
                "ucl",
                "uel",
                "uecl",
                "atp",
                "wta"
              ],
              "enumTitles": [
                "NFL",
                "NCAA Football",
                "CFL",
                "NBA",
                "WNBA",
                "NCAA Basketball",
                "MLB",
                "NHL",
                "MLS",
                "Soccer: Premier League",
                "Soccer: LaLiga",
                "Soccer: Bundesliga",
                "Soccer: Serie A",
                "Soccer: Ligue 1",
                "Soccer: Champions League",
                "Soccer: Europa League",
                "Soccer: Conference League",
                "Tennis: ATP",
                "Tennis: WTA"
              ]
            }
          },
          "sports": {
            "title": "Whole sports",
            "type": "array",
            "description": "Optional. Sweep every competition in a sport, not just the leagues above. Much broader and slower than a league selection.",
            "items": {
              "type": "string",
              "enum": [
                "soccer",
                "basketball",
                "baseball",
                "hockey",
                "americanFootball",
                "tennis"
              ],
              "enumTitles": [
                "Soccer",
                "Basketball",
                "Baseball",
                "Ice hockey",
                "American football",
                "Tennis"
              ]
            },
            "default": []
          },
          "dateFrom": {
            "title": "Date from",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
            "type": "string",
            "description": "First day to include, as YYYY-MM-DD. Flashscore publishes 7 days back through tomorrow, so older dates are trimmed to that limit."
          },
          "dateTo": {
            "title": "Date to",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
            "type": "string",
            "description": "Last day to include, as YYYY-MM-DD. Defaults to tomorrow, which is the furthest ahead Flashscore publishes."
          },
          "oddsCountry": {
            "title": "Odds market",
            "enum": [
              "US",
              "US_CO",
              "US_IL",
              "US_NY",
              "GB",
              "BR",
              "DE"
            ],
            "type": "string",
            "description": "Which country's bookmakers to price the games with. US returns DraftKings, FanDuel, BetMGM, Fanatics and bet365. GB returns 20 UK books and BR returns 26.",
            "default": "US"
          },
          "markets": {
            "title": "Markets",
            "type": "array",
            "description": "Which betting markets to return. Moneyline is who wins, spread is the point spread or handicap, total is the over/under. Leave empty for these three.",
            "items": {
              "type": "string",
              "enum": [
                "moneyline",
                "spread",
                "total",
                "btts",
                "double_chance",
                "draw_no_bet",
                "correct_score",
                "odd_even"
              ],
              "enumTitles": [
                "Moneyline",
                "Spread / handicap",
                "Total (over / under)",
                "Both teams to score",
                "Double chance",
                "Draw no bet",
                "Correct score",
                "Odd or even"
              ]
            },
            "default": []
          },
          "statuses": {
            "title": "Game status",
            "type": "array",
            "description": "Limit to scheduled, live or finished games. Prices freeze at kickoff, so live and finished games return the last prematch price and not an in play price. Older finished games have their odds removed by the source entirely.",
            "items": {
              "type": "string",
              "enum": [
                "scheduled",
                "live",
                "finished"
              ],
              "enumTitles": [
                "Scheduled (upcoming)",
                "Live (in progress, last prematch price)",
                "Finished (closing price)"
              ]
            },
            "default": []
          },
          "includeAlternateLines": {
            "title": "Include alternate lines",
            "type": "boolean",
            "description": "Return every published spread and total, not only the primary line. Adds a lot of rows per game: an NFL game can carry 270 alternate totals.",
            "default": false
          },
          "includePeriodMarkets": {
            "title": "Include half and quarter markets",
            "type": "boolean",
            "description": "Also return first half, second half and first quarter markets alongside the full game line.",
            "default": false
          },
          "computeFairLines": {
            "title": "Compute vig free fair odds",
            "type": "boolean",
            "description": "Add consensus probabilities with the bookmaker margin removed, plus the average overround per market.",
            "default": true
          },
          "computeArbitrage": {
            "title": "Detect arbitrage",
            "type": "boolean",
            "description": "Flag games where taking the best price on every outcome across books guarantees a profit, with the stake split for each leg.",
            "default": true
          },
          "minArbitrageProfitPct": {
            "title": "Minimum arbitrage profit (%)",
            "minimum": 0,
            "maximum": 100,
            "type": "integer",
            "description": "Ignore arbitrage opportunities below this guaranteed return. 0 reports any positive edge.",
            "default": 0
          },
          "onlyArbitrage": {
            "title": "Only games with arbitrage",
            "type": "boolean",
            "description": "Return only games that contain at least one arbitrage opportunity. Games without one are skipped and never charged.",
            "default": false
          },
          "matchIds": {
            "title": "Specific game IDs",
            "type": "array",
            "description": "Optional. Flashscore game IDs to price directly, ignoring the league and date filters. The whole published window is searched.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "maxItems": {
            "title": "Maximum games",
            "minimum": 0,
            "type": "integer",
            "description": "Stop after this many games. One game is one row and one charge. Set 0 for no limit.",
            "default": 100
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}