{
  "openapi": "3.0.1",
  "info": {
    "title": "SofaScore Scraper | Live Scores & Match Data API",
    "description": "[💰 $0.9 / 1K] Scrape live scores, fixtures, lineups, statistics, odds, and standings from SofaScore. Search by team/player/tournament, paste match links, or pull every live or scheduled match across any sport.",
    "version": "1.2",
    "x-build-id": "TBxOz095VTfjgxnP9"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/parsebird~sofascore-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-parsebird-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/parsebird~sofascore-scraper/runs": {
      "post": {
        "operationId": "runs-sync-parsebird-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/parsebird~sofascore-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-parsebird-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": [
              "search",
              "url",
              "live",
              "scheduled"
            ],
            "type": "string",
            "description": "search: resolve keywords. url: paste SofaScore links. live: every live match right now. scheduled: fixtures for a date range.",
            "default": "search"
          },
          "searchQueries": {
            "title": "Search queries",
            "type": "array",
            "description": "Keywords to resolve, e.g. a team, player, or tournament name. Used when mode is search.",
            "default": [
              "Real Madrid"
            ],
            "items": {
              "type": "string"
            }
          },
          "searchType": {
            "title": "Search type",
            "enum": [
              "all",
              "team",
              "player",
              "tournament",
              "match"
            ],
            "type": "string",
            "description": "Restrict search results to one entity type.",
            "default": "all"
          },
          "urls": {
            "title": "URLs",
            "type": "array",
            "description": "SofaScore links to team, player, tournament, or match pages. Used when mode is url. Match links must include the numeric id: copy the address bar while on a match page (it ends with #id:<number>), or use an /event/<number> link.",
            "default": [
              "https://www.sofascore.com/team/football/real-madrid/2829",
              "https://www.sofascore.com/player/lionel-messi/12994"
            ],
            "items": {
              "type": "string"
            }
          },
          "sports": {
            "title": "Sports",
            "type": "array",
            "description": "Sports to cover. Used when mode is live or scheduled, e.g. football, tennis, basketball.",
            "default": [
              "football"
            ],
            "items": {
              "type": "string"
            }
          },
          "date": {
            "title": "Date",
            "type": "string",
            "description": "Date for scheduled mode (YYYY-MM-DD), or \"today\".",
            "default": "today"
          },
          "daysAhead": {
            "title": "Days ahead",
            "minimum": 0,
            "maximum": 14,
            "type": "integer",
            "description": "Extra days to include after date (scheduled mode). 0 = only the given date.",
            "default": 0
          },
          "includeStatistics": {
            "title": "Include statistics",
            "type": "boolean",
            "description": "Match and player statistics (possession, shots, passes, xG, ...).",
            "default": true
          },
          "includeLineups": {
            "title": "Include lineups",
            "type": "boolean",
            "description": "Match lineups, formations, and player ratings.",
            "default": true
          },
          "includeIncidents": {
            "title": "Include incidents",
            "type": "boolean",
            "description": "Goals, cards, and substitutions.",
            "default": true
          },
          "includeOdds": {
            "title": "Include odds",
            "type": "boolean",
            "description": "Pre-match odds markets.",
            "default": false
          },
          "includeVotes": {
            "title": "Include fan votes",
            "type": "boolean",
            "description": "Fan prediction poll (community sentiment) per match.",
            "default": false
          },
          "includeStandings": {
            "title": "Include standings",
            "type": "boolean",
            "description": "Tournament league tables.",
            "default": true
          },
          "includeSquad": {
            "title": "Include squad",
            "type": "boolean",
            "description": "Full team squads.",
            "default": false
          },
          "maxItems": {
            "title": "Max items",
            "minimum": 0,
            "type": "integer",
            "description": "Stop after this many records. 0 = no limit (bounded by a safety cap).",
            "default": 20
          },
          "resumeFromRunId": {
            "title": "Resume from run ID",
            "type": "string",
            "description": "Continue a previously interrupted crawl: entities already pushed by that run are skipped (not re-fetched or re-charged) in this run. Leave empty for a normal run.",
            "default": ""
          },
          "incrementalMode": {
            "title": "Incremental mode",
            "type": "boolean",
            "description": "Compare this run's results against the last run sharing the same state key, and tag each record NEW, CHANGED, or UNCHANGED.",
            "default": false
          },
          "stateKey": {
            "title": "State key",
            "type": "string",
            "description": "Name this monitoring campaign so recurring runs (e.g. on a schedule) compare against each other. Leave empty to use a single default campaign.",
            "default": ""
          },
          "emitUnchanged": {
            "title": "Emit unchanged records",
            "type": "boolean",
            "description": "Also return (and bill) records with no change since the last incremental-mode run.",
            "default": false
          },
          "emitExpired": {
            "title": "Emit expired records",
            "type": "boolean",
            "description": "Also return (and bill) a minimal record for entities seen in a previous incremental-mode run that no longer appear in this one.",
            "default": false
          },
          "proxy": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "SofaScore blocks both non-browser traffic and datacenter IPs even from a real browser; a country-pinned residential proxy is required for reliable access.",
            "default": {
              "useApifyProxy": true,
              "apifyProxyGroups": [
                "RESIDENTIAL"
              ],
              "apifyProxyCountry": "US"
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}