{
  "openapi": "3.0.1",
  "info": {
    "title": "SofaScore Scraper - Live Scores, Fixtures, Stats & Odds",
    "description": "Sofascore data for football and 24 more sports: matches by day, live, league, team or URL with scores, plus optional stats (xG, possession, shots), lineups with ratings, goals and cards, odds and shotmaps. League tables and squads too.",
    "version": "1.0",
    "x-build-id": "LolV5y4vsdSjwQ6mm"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/axlymxp~sofascore-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-axlymxp-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/axlymxp~sofascore-scraper/runs": {
      "post": {
        "operationId": "runs-sync-axlymxp-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/axlymxp~sofascore-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-axlymxp-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": "What to scrape",
            "enum": [
              "matches",
              "standings",
              "squads"
            ],
            "type": "string",
            "description": "Matches by day, live, tournament, team or URL; league standings; or team squads.",
            "default": "matches"
          },
          "sports": {
            "title": "Sports",
            "type": "array",
            "description": "Sports for days/live and for name lookups.",
            "items": {
              "type": "string",
              "enum": [
                "football",
                "basketball",
                "tennis",
                "ice-hockey",
                "american-football",
                "baseball",
                "handball",
                "volleyball",
                "rugby",
                "cricket",
                "esports",
                "table-tennis",
                "darts",
                "snooker",
                "futsal",
                "motorsport",
                "mma",
                "waterpolo",
                "badminton",
                "aussie-rules",
                "beach-volley",
                "floorball",
                "bandy",
                "minifootball",
                "cycling"
              ],
              "enumTitles": [
                "Football",
                "Basketball",
                "Tennis",
                "Ice hockey",
                "American football",
                "Baseball",
                "Handball",
                "Volleyball",
                "Rugby",
                "Cricket",
                "Esports",
                "Table tennis",
                "Darts",
                "Snooker",
                "Futsal",
                "Motorsport",
                "MMA",
                "Waterpolo",
                "Badminton",
                "Aussie rules",
                "Beach volleyball",
                "Floorball",
                "Bandy",
                "Mini football",
                "Cycling"
              ]
            },
            "default": [
              "football"
            ]
          },
          "dates": {
            "title": "Days",
            "type": "array",
            "description": "UTC days to collect every match of: YYYY-MM-DD or today, yesterday, tomorrow, +2, -3. Defaults to today when no other source is given.",
            "items": {
              "type": "string"
            }
          },
          "liveOnly": {
            "title": "Live matches only",
            "type": "boolean",
            "description": "Only matches in progress right now (one request per sport). Other sources are ignored.",
            "default": false
          },
          "tournaments": {
            "title": "Tournaments / leagues",
            "type": "array",
            "description": "Tournament URLs, ids or names (e.g. 'Premier League', https://www.sofascore.com/football/tournament/england/premier-league/17). Matches mode: the season's fixtures and/or results. Standings mode: the league table.",
            "items": {
              "type": "string"
            }
          },
          "seasonId": {
            "title": "Season id",
            "type": "integer",
            "description": "Optional: a past season's id (default = current season). Season ids are in the output's seasonId field."
          },
          "tournamentMatches": {
            "title": "Tournament matches",
            "enum": [
              "both",
              "last",
              "next"
            ],
            "type": "string",
            "description": "For tournaments in matches mode: results, fixtures or both.",
            "default": "both"
          },
          "teams": {
            "title": "Teams",
            "type": "array",
            "description": "Team URLs, ids or names (e.g. 'Arsenal'). Matches mode: recent results and upcoming matches. Squads mode: the squad.",
            "items": {
              "type": "string"
            }
          },
          "matchUrls": {
            "title": "Match URLs or ids",
            "type": "array",
            "description": "e.g. https://www.sofascore.com/football/match/tottenham-hotspur-coventry-city/lsI#id:16363890 or 16363890.",
            "items": {
              "type": "string"
            }
          },
          "countries": {
            "title": "Countries",
            "type": "array",
            "description": "Keep matches from these countries/regions (Sofascore category name or code, e.g. England, Spain, EN, International).",
            "items": {
              "type": "string"
            }
          },
          "tournamentFilter": {
            "title": "Tournament name contains",
            "type": "array",
            "description": "Keep matches whose tournament name contains any of these words (e.g. 'Premier League', 'Champions League').",
            "items": {
              "type": "string"
            }
          },
          "statuses": {
            "title": "Match status",
            "type": "array",
            "description": "Keep only these statuses. Empty = all.",
            "items": {
              "type": "string",
              "enum": [
                "notstarted",
                "inprogress",
                "finished",
                "postponed",
                "canceled",
                "other"
              ],
              "enumTitles": [
                "Not started",
                "In progress",
                "Finished",
                "Postponed",
                "Canceled",
                "Other"
              ]
            }
          },
          "includeStatistics": {
            "title": "Match statistics",
            "type": "boolean",
            "description": "Possession, xG, shots, passes, duels, saves... for the match and each half/period.",
            "default": false
          },
          "includeLineups": {
            "title": "Lineups",
            "type": "boolean",
            "description": "Formations, starting XI and bench with ratings, minutes and per-player stats, plus missing players. Usually published ~1 hour before kick-off.",
            "default": false
          },
          "includeIncidents": {
            "title": "Incidents",
            "type": "boolean",
            "description": "Goals (scorer, assist), cards, substitutions, VAR, periods.",
            "default": false
          },
          "includeOdds": {
            "title": "Odds",
            "type": "boolean",
            "description": "Bookmaker markets (1X2, double chance, BTTS, over/under...): decimal and fractional, opening and current.",
            "default": false
          },
          "includeShotmap": {
            "title": "Shotmap",
            "type": "boolean",
            "description": "Every shot with player, minute, xG, xGOT, body part, situation and pitch coordinates (football).",
            "default": false
          },
          "standingsType": {
            "title": "Standings table",
            "enum": [
              "total",
              "home",
              "away"
            ],
            "type": "string",
            "description": "Overall, home-only or away-only league table.",
            "default": "total"
          },
          "maxItems": {
            "title": "Max rows",
            "minimum": 1,
            "maximum": 50000,
            "type": "integer",
            "description": "Maximum number of rows to return. You are charged per row.",
            "default": 1000
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Default (Apify Proxy, automatic) tries datacenter IPs and switches to residential when Sofascore challenges them.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}