{
  "openapi": "3.0.1",
  "info": {
    "title": "SofaScore Live Scraper: Live Scores, Goal Alerts & Match Stats",
    "description": "Scrape SofaScore live scores, fixtures and match stats for 20+ sports, and monitor live matches for goals, red cards, half time and full time. Schedule it and get only what changed. Lineups, incidents, odds, head-to-head, period scores, venue and referee included. No login needed.",
    "version": "0.5",
    "x-build-id": "a73hq2DFsvNEfWaVz"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/getascraper~sofascore-live-events-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-getascraper-sofascore-live-events-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/getascraper~sofascore-live-events-scraper/runs": {
      "post": {
        "operationId": "runs-sync-getascraper-sofascore-live-events-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/getascraper~sofascore-live-events-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-getascraper-sofascore-live-events-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": {
          "mode": {
            "title": "Scrape mode",
            "enum": [
              "liveEvents",
              "scheduledEvents",
              "eventDetail",
              "search",
              "liveMonitor",
              "teamEvents",
              "profiles"
            ],
            "type": "string",
            "description": "What to do. Live events lists matches in play. Scheduled events lists fixtures and results by date. Event detail adds statistics, incidents, lineups, odds and more for chosen matches. Search finds players, teams, managers and referees. Live monitor reports only what changed since the last run (goals, red cards, half time, full time). Team fixtures lists last and next matches of teams. Profiles returns team and player cards.",
            "default": "liveEvents"
          },
          "sport": {
            "title": "Sport",
            "enum": [
              "football",
              "basketball",
              "tennis",
              "ice-hockey",
              "baseball",
              "handball",
              "volleyball",
              "snooker",
              "rugby",
              "mma",
              "cricket",
              "american-football",
              "esports",
              "table-tennis",
              "futsal",
              "darts",
              "badminton",
              "motorsport",
              "aussie-rules",
              "beach-volley",
              "floorball",
              "bandy",
              "minifootball",
              "padel",
              "cycling"
            ],
            "type": "string",
            "description": "Sport for Live events, Scheduled events, Live monitor and Search. Use Sports below to cover several sports in one run.",
            "default": "football"
          },
          "sports": {
            "title": "Several sports (optional)",
            "type": "array",
            "description": "Pick more than one sport to cover them all in a single run. When set, it replaces the single Sport above.",
            "items": {
              "type": "string",
              "enum": [
                "football",
                "basketball",
                "tennis",
                "ice-hockey",
                "baseball",
                "handball",
                "volleyball",
                "snooker",
                "rugby",
                "mma",
                "cricket",
                "american-football",
                "esports",
                "table-tennis",
                "futsal",
                "darts",
                "badminton",
                "motorsport",
                "aussie-rules",
                "beach-volley",
                "floorball",
                "bandy",
                "minifootball",
                "padel",
                "cycling"
              ],
              "enumTitles": [
                "Football (Soccer)",
                "Basketball",
                "Tennis",
                "Ice Hockey",
                "Baseball",
                "Handball",
                "Volleyball",
                "Snooker",
                "Rugby",
                "MMA",
                "Cricket",
                "American Football",
                "Esports",
                "Table Tennis",
                "Futsal",
                "Darts",
                "Badminton",
                "Motorsport",
                "Aussie Rules",
                "Beach Volleyball",
                "Floorball",
                "Bandy",
                "Minifootball",
                "Padel",
                "Cycling"
              ]
            },
            "default": []
          },
          "date": {
            "title": "Date (Scheduled events mode)",
            "type": "string",
            "description": "Day to fetch fixtures and results for. Leave empty to use today (UTC). Only dates from 2026 on are read, because the site's robots.txt disallows earlier ones."
          },
          "dateTo": {
            "title": "Last date (optional)",
            "type": "string",
            "description": "Fetch every day from Date up to this day (at most 7 days). Leave empty for a single day."
          },
          "statusFilter": {
            "title": "Status filter",
            "enum": [
              "all",
              "live",
              "scheduled",
              "finished"
            ],
            "type": "string",
            "description": "Only keep matches with this status. Applies to Live events, Scheduled events and Team fixtures.",
            "default": "all"
          },
          "tournamentIds": {
            "title": "Competition IDs",
            "type": "array",
            "description": "Only matches from these competitions, for example 17 for the Premier League. Find the number in the 'uniqueTournamentId' column of any run. Skips the full competition scan, so scheduled runs are faster and cheaper.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "teamIds": {
            "title": "Team IDs",
            "type": "array",
            "description": "Matches of these teams (Live, Scheduled, Monitor), their last and next matches (Team fixtures) or their cards (Profiles). Find the number in 'homeTeamId' or 'awayTeamId'.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "countries": {
            "title": "Countries",
            "type": "array",
            "description": "Only matches from these countries or regions, for example England, Spain or World.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "nameContains": {
            "title": "Name contains",
            "type": "string",
            "description": "Only matches whose teams or competition contain this text, for example 'United' or 'Cup'."
          },
          "query": {
            "title": "Search query (Search mode)",
            "type": "string",
            "description": "Name of a player, team, manager or referee to look up. Only used in Search mode."
          },
          "playerIds": {
            "title": "Player IDs (Profiles mode)",
            "type": "array",
            "description": "Players to return a profile card for. Find the number in the 'id' column of a Search run. Team cards use the Team IDs field above.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "events": {
            "title": "Events (Event detail mode)",
            "type": "array",
            "description": "SofaScore event IDs (e.g. 12836554) or full match links to fetch deep detail for. Copy the numeric 'id' from a Live or Scheduled run. Only used in Event detail mode.",
            "items": {
              "type": "string"
            }
          },
          "includeStatistics": {
            "title": "Include match statistics",
            "type": "boolean",
            "description": "Possession, shots, xG and other match statistics. Not available for every match.",
            "default": true
          },
          "includeIncidents": {
            "title": "Include incidents",
            "type": "boolean",
            "description": "The incident timeline: goals, cards, substitutions, VAR and period markers.",
            "default": true
          },
          "includeLineups": {
            "title": "Include lineups",
            "type": "boolean",
            "description": "Starting lineups, formations and player ratings. Not available for every match.",
            "default": false
          },
          "includeOdds": {
            "title": "Include odds",
            "type": "boolean",
            "description": "Betting markets with opening and current prices (fractional and decimal). Shown as published on SofaScore, not betting advice.",
            "default": false
          },
          "includeHeadToHead": {
            "title": "Include head-to-head",
            "type": "boolean",
            "description": "Win, draw and loss record of the two teams plus their last meetings.",
            "default": false
          },
          "includeVotes": {
            "title": "Include fan votes",
            "type": "boolean",
            "description": "Who the fans expect to win, both teams to score and first team to score.",
            "default": false
          },
          "includeBestPlayers": {
            "title": "Include best players",
            "type": "boolean",
            "description": "The best rated players of each side with their ratings.",
            "default": false
          },
          "includeShotmap": {
            "title": "Include shot map",
            "type": "boolean",
            "description": "Every shot with expected goals and pitch position. Football matches with tracking only.",
            "default": false
          },
          "monitorName": {
            "title": "Monitor name (Live monitor mode)",
            "type": "string",
            "description": "Name of the feed. Runs with the same name share one memory, so each run reports only what changed since the previous one. Leave empty to use a default feed. Use different names for different alerts."
          },
          "onlyChanges": {
            "title": "Save only changes",
            "type": "boolean",
            "description": "On: only matches that changed are saved, so quiet minutes cost nothing. Off: every live match in scope is also saved as an unchanged row. The first run of a feed only builds its baseline.",
            "default": true
          },
          "watch": {
            "title": "What to watch",
            "type": "array",
            "description": "Which changes create a row. Leave empty to watch everything.",
            "items": {
              "type": "string",
              "enum": [
                "goal",
                "redCard",
                "statusChange",
                "kickoff",
                "finished"
              ],
              "enumTitles": [
                "Goals and corrected scores",
                "Red cards",
                "Half time and other status changes",
                "Kick-off of a new live match",
                "Full time and other endings"
              ]
            },
            "default": []
          },
          "includeScorers": {
            "title": "Add scorer and card details",
            "type": "boolean",
            "description": "For goal and red card rows, look up who scored, the assist and the minute. Adds one request per such row.",
            "default": false
          },
          "maxItems": {
            "title": "Max items",
            "minimum": 0,
            "type": "integer",
            "description": "Maximum number of records to save. Use 0 for no limit. You are billed per record returned. Free plan runs are capped at 100.",
            "default": 25
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "The Actor starts on cheap datacenter proxies and switches to residential automatically when SofaScore refuses them, so the default works for most runs. Add your own proxy URLs only if you need a fixed exit.",
            "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
                  },
                  "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}