{
  "openapi": "3.0.1",
  "info": {
    "title": "SofaScore Scraper - Live Scores, Fixtures & Stats",
    "description": "Scrape SofaScore live scores, fixtures and results across 14 sports, with lineups, player ratings, expected goals, match statistics and goal timelines. No login or API key needed. Independent tool, not affiliated with SofaScore.",
    "version": "0.1",
    "x-build-id": "6vAeCzeutOkY180B3"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/scrapesage~sofascore-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-scrapesage-sofascore-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/scrapesage~sofascore-scraper/runs": {
      "post": {
        "operationId": "runs-sync-scrapesage-sofascore-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/scrapesage~sofascore-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-scrapesage-sofascore-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": "Mode",
            "enum": [
              "live",
              "tournament",
              "team",
              "event"
            ],
            "type": "string",
            "description": "live = everything in play right now for the sports you pick. tournament = a league's fixtures and results. team = one team's fixtures and results. event = specific matches by id or URL.",
            "default": "live"
          },
          "sports": {
            "title": "Sports (live mode)",
            "type": "array",
            "description": "Which sports to pull live matches for.",
            "items": {
              "type": "string",
              "enum": [
                "football",
                "basketball",
                "tennis",
                "ice-hockey",
                "volleyball",
                "handball",
                "baseball",
                "american-football",
                "cricket",
                "mma",
                "rugby",
                "darts",
                "snooker",
                "table-tennis"
              ]
            }
          },
          "tournamentIds": {
            "title": "Tournament ids (tournament mode)",
            "type": "array",
            "description": "SofaScore unique-tournament ids. For example 17 = Premier League, 8 = LaLiga, 35 = Bundesliga, 23 = Serie A, 34 = Ligue 1, 7 = UEFA Champions League.",
            "items": {
              "type": "string"
            }
          },
          "seasonIds": {
            "title": "Season ids (optional)",
            "type": "array",
            "description": "Leave empty to use each tournament's current season.",
            "items": {
              "type": "string"
            }
          },
          "teamIds": {
            "title": "Team ids (team mode)",
            "type": "array",
            "description": "SofaScore team ids, for example 42 = Arsenal, 44 = Manchester United.",
            "items": {
              "type": "string"
            }
          },
          "eventIds": {
            "title": "Match ids (event mode)",
            "type": "array",
            "description": "SofaScore match ids.",
            "items": {
              "type": "string"
            }
          },
          "startUrls": {
            "title": "Match URLs (event mode)",
            "type": "array",
            "description": "Paste sofascore.com match URLs - the match id is read out of the URL for you.",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "includeStatistics": {
            "title": "Include match statistics",
            "type": "boolean",
            "description": "Possession, shots, corners, cards and the rest, as a keyed object on each match. Costs one extra request per match.",
            "default": false
          },
          "includeLineups": {
            "title": "Include lineups & player ratings",
            "type": "boolean",
            "description": "Formations plus every player with position, shirt number and - on matches where SofaScore publishes them - rating, minutes, goals and expected goals. Costs one extra request per match.",
            "default": false
          },
          "includeIncidents": {
            "title": "Include goals, cards & timeline",
            "type": "boolean",
            "description": "The match timeline with goals, cards and substitutions, plus goals and cards pulled out as their own arrays. Costs one extra request per match.",
            "default": false
          },
          "onlyLive": {
            "title": "Only matches in play",
            "type": "boolean",
            "description": "Keep only matches currently in progress.",
            "default": false
          },
          "onlyFinished": {
            "title": "Only finished matches",
            "type": "boolean",
            "description": "Keep only matches that have ended.",
            "default": false
          },
          "maxResults": {
            "title": "Max results (whole run)",
            "minimum": 0,
            "maximum": 100000,
            "type": "integer",
            "description": "Total cap across every source. Set 0 for no limit (explicit opt-in).",
            "default": 100
          },
          "concurrency": {
            "title": "Concurrency",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "Parallel enrichment requests. Higher is faster but harder on the proxy pool.",
            "default": 5
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "A residential proxy is recommended.",
            "default": {
              "useApifyProxy": true,
              "apifyProxyGroups": [
                "RESIDENTIAL"
              ]
            }
          },
          "urlsFromFile": {
            "title": "Import URLs from a file",
            "type": "string",
            "description": "Paste a list of URLs (one per line), OR one link to a .txt/.csv file, Google Sheet or Google Drive file containing them. Lets you import many Start URLs at once instead of typing each. Google Sheet/Drive share links are handled automatically."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}