{
  "openapi": "3.0.1",
  "info": {
    "title": "Opta Scraper | Football Player Stats and xG",
    "description": "Opta scraper for football stats from Opta Analyst: player goals, assists, xG, npxG, xA, shots, passing, defending and goalkeeping, plus club table, expected points and Power Ranking. Team rows add xGA and title odds. The Premier League came back as 461 players in 39 seconds, 61 fields filled.",
    "version": "1.0",
    "x-build-id": "GR6NIuRcSfuDEXfuW"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/silentflow~opta-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-silentflow-opta-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/silentflow~opta-scraper/runs": {
      "post": {
        "operationId": "runs-sync-silentflow-opta-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/silentflow~opta-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-silentflow-opta-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": {
          "competitions": {
            "title": "🏆 Competitions",
            "type": "array",
            "description": "The competitions to read, in this order. Every player with minutes in the season becomes one row: the Premier League gives about 460 players in under a minute. Pick from the list or type a name, a slug or a theanalyst.com competition URL (<code>Serie A</code>, <code>la-liga</code>, <code>https://theanalyst.com/competition/mls</code>).",
            "items": {
              "type": "string",
              "enumSuggestedValues": [
                "premier-league",
                "la-liga",
                "serie-a",
                "bundesliga",
                "ligue-1",
                "uefa-champions-league",
                "uefa-europa-league",
                "uefa-conference-league",
                "english-championship",
                "english-league-one",
                "english-league-two",
                "scottish-premiership",
                "mls",
                "saudi-pro-league",
                "wsl",
                "uefa-womens-champions-league",
                "fifa-world-cup",
                "euro",
                "copa-america",
                "africa-cup-of-nations",
                "concacaf-gold-cup",
                "fifa-club-world-cup",
                "uefa-euros-women"
              ],
              "enumTitles": [
                "Premier League",
                "La Liga",
                "Serie A",
                "Bundesliga",
                "Ligue 1",
                "UEFA Champions League",
                "UEFA Europa League",
                "UEFA Conference League",
                "EFL Championship",
                "EFL League One",
                "EFL League Two",
                "Scottish Premiership",
                "MLS",
                "Saudi Pro League",
                "Women's Super League (WSL)",
                "UEFA Women's Champions League",
                "FIFA World Cup",
                "UEFA Euro",
                "Copa America",
                "Africa Cup of Nations",
                "CONCACAF Gold Cup",
                "FIFA Club World Cup",
                "UEFA Women's Euro"
              ]
            }
          },
          "playerIds": {
            "title": "🆔 Player IDs or URLs",
            "type": "array",
            "description": "Follow a list of players instead of a whole competition. Each line is an Opta player id (<code>223094</code> or <code>p223094</code>, the <code>code</code> of Fantasy Premier League data) or an Opta player uuid. Each player gives one row per competition they play in this season, domestic leagues first. Add their competition above to search only there, which is faster.",
            "items": {
              "type": "string"
            }
          },
          "playerUrls": {
            "title": "🔗 Player URLs",
            "type": "array",
            "description": "theanalyst.com player pages, as you copy them from the site (<code>https://theanalyst.com/players/4137/erling-haaland</code>; <code>/stats</code> and <code>/career</code> pages work too). They are read with the player IDs above: one row per player and competition this season.",
            "items": {
              "type": "string"
            }
          },
          "season": {
            "title": "📅 Season",
            "type": "string",
            "description": "The season to read. <code>current</code> is the season being played (or the latest edition of a tournament). Past seasons use their starting year: <code>2025/2026</code> or <code>2025</code>. Opta Analyst keeps past player stats for the big leagues (Premier League back to 2023/2024); a season it does not publish ends with a clear message and no rows.",
            "default": "current"
          },
          "rowType": {
            "title": "📊 Row type",
            "enum": [
              "players",
              "teams"
            ],
            "type": "string",
            "description": "<b>Players</b>: one row per player and competition season. <b>Teams</b>: one row per team, with the table, form, xG, xGA, npxG, expected points and position, PPDA, high turnovers, Opta Power Ranking and Opta's season simulation (predicted points, title and relegation probabilities).",
            "default": "players"
          },
          "teams": {
            "title": "👕 Teams",
            "type": "array",
            "description": "Keep only these teams: a club name, its three-letter code or its theanalyst.com page (<code>Arsenal</code>, <code>MCI</code>, <code>https://theanalyst.com/football/team/scm-3/arsenal</code>). Leave empty for every team of the competition.",
            "items": {
              "type": "string"
            }
          },
          "minMinutes": {
            "title": "⏱️ Minimum minutes played",
            "minimum": 0,
            "type": "integer",
            "description": "Keep only players with at least this many minutes in the season (<code>450</code> is five full matches). Leaves out players with too few minutes for their per-90 numbers to mean much. <code>0</code> keeps everyone.",
            "default": 0
          },
          "maxItems": {
            "title": "🔢 Max rows",
            "minimum": 1,
            "type": "integer",
            "description": "The most rows the run saves. Players come regulars first (most minutes), so a low number keeps each team's starters. For a player list, this is the most rows per player (one per competition).",
            "default": 500
          },
          "debugMode": {
            "title": "🐞 Debug mode",
            "type": "boolean",
            "description": "Write detailed progress to the log. Leave off for normal runs.",
            "default": 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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}