{
  "openapi": "3.0.1",
  "info": {
    "title": "Sofascore Season Stats Scraper",
    "description": "Scrape season leaderboards and team statistics from Sofascore for football, basketball and ice hockey. Top scorers, assists, ratings and 30 more statistics per league, plus a complete team table and knockout brackets. No API key, no login.",
    "version": "1.0",
    "x-build-id": "Lq7crVy98yCvJW6KB"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/incognito_mode~sofascore-season-stats-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-incognito_mode-sofascore-season-stats-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/incognito_mode~sofascore-season-stats-scraper/runs": {
      "post": {
        "operationId": "runs-sync-incognito_mode-sofascore-season-stats-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/incognito_mode~sofascore-season-stats-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-incognito_mode-sofascore-season-stats-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": [
          "tournaments"
        ],
        "properties": {
          "tournaments": {
            "title": "Tournaments",
            "minItems": 1,
            "type": "array",
            "description": "Competitions to scrape. Paste Sofascore tournament URLs (copy them from your browser) or unique tournament IDs. Examples: 17 = Premier League, 8 = LaLiga, 132 = NBA, 234 = NHL, 7 = Champions League. Baseball is not supported — Sofascore publishes no leaderboards for it.",
            "items": {
              "type": "string"
            }
          },
          "seasonId": {
            "title": "Season ID",
            "minimum": 1,
            "type": "integer",
            "description": "Optional. Which season to read. Leave empty for the latest. A season pinned in a tournament URL (the #id: part) wins over this."
          },
          "seasonFallback": {
            "title": "Fall back to the previous season",
            "type": "boolean",
            "description": "Sofascore lists a season as soon as it is scheduled, but statistics only exist once matches have been played. In August 2026 the NBA, the NHL and the Champions League all returned nothing for their newest season. With this on, those competitions return the previous season instead, and every row records which season was actually used in 'seasonYear' and 'seasonRequested'. Turn it off to get an empty result instead.",
            "default": true
          },
          "includePlayerLeaderboards": {
            "title": "Player leaderboards",
            "type": "boolean",
            "description": "Top players per statistic — scorers, assists, ratings, tackles, and 30 more depending on the sport. One row per player per leaderboard.",
            "default": true
          },
          "includeTeamStats": {
            "title": "Team season statistics",
            "type": "boolean",
            "description": "One row per team with every team statistic the competition publishes — goals, expected goals, possession, passing, cards. Unlike the player tables this covers the whole competition, not a top-50 cut, so a Premier League run is 20 complete rows.",
            "default": true
          },
          "includeCupBracket": {
            "title": "Knockout bracket",
            "type": "boolean",
            "description": "The knockout bracket, one row per tie: round, both teams, aggregate result and who went through. Cups, tournament knockout stages and play-off leagues have one — the NBA returns its 15-tie play-off bracket. Round-robin leagues decided on points, like the Premier League, return nothing. Off by default.",
            "default": false
          },
          "playerCategories": {
            "title": "Which player leaderboards",
            "uniqueItems": true,
            "type": "array",
            "description": "Category names to keep, or ['all'] for every leaderboard the sport publishes. This is what controls the size of your bill: an unfiltered Premier League season is 1,560 player rows across 34 categories, while the default three is 150. Football names include goals, assists, rating, expectedGoals, tackles, keyPasses, saves; basketball has points, rebounds, steals, blocks, tripleDoubles; ice hockey has points, savePercentage, timeOnIce. A name that doesn't exist for the sport is reported in the log with the full list of the ones that do.",
            "default": [
              "rating",
              "goals",
              "assists"
            ],
            "items": {
              "type": "string"
            }
          },
          "topN": {
            "title": "Players per leaderboard",
            "minimum": 1,
            "maximum": 50,
            "type": "integer",
            "description": "Keep only the top N of each player leaderboard. Sofascore returns 50 and offers no way to ask for more, so 50 is both the default and the maximum.",
            "default": 50
          },
          "statisticsTypes": {
            "title": "Statistics type",
            "uniqueItems": true,
            "type": "array",
            "description": "Leave empty and the Actor works this out for itself — football spells it 'overall' while the NBA and NHL want 'regularSeason', and there is no endpoint that says which. Set it only to ask for a table the automatic choice skips: the NBA publishes 'regularSeason' and 'playoffs' as two separate tables, and picking both returns both.",
            "items": {
              "type": "string",
              "enum": [
                "overall",
                "regularSeason",
                "playoffs"
              ],
              "enumTitles": [
                "overall — football and most competitions",
                "regularSeason — NBA, NHL and other franchise leagues",
                "playoffs — post-season tables where they exist"
              ]
            }
          },
          "maxItems": {
            "title": "Maximum rows",
            "minimum": 1,
            "type": "integer",
            "description": "Stop after this many rows across all record types.",
            "default": 10000
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Optional. This Actor calls Sofascore directly and only reaches for a proxy if a request is actually blocked, trying datacenter IPs (included in every Apify plan) before residential ones. Set this only to pin a specific proxy or country from the start.",
            "default": {
              "useApifyProxy": 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
                  }
                }
              },
              "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}