{
  "openapi": "3.0.1",
  "info": {
    "title": "SofaScore Scraper - Results, Stats, Lineups, Ratings & Odds",
    "description": "SofaScore data for football, basketball, hockey, tennis and 17 more sports: results with period scores, team stats (xG, possession, shots), lineups with player ratings, incidents and opening/closing odds. By day, team or tournament season back to the 1990s.",
    "version": "0.1",
    "x-build-id": "eh2MyocFbBMURw2XO"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/artsiom_k~sofascore-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-artsiom_k-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/artsiom_k~sofascore-scraper/runs": {
      "post": {
        "operationId": "runs-sync-artsiom_k-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/artsiom_k~sofascore-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-artsiom_k-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": {
          "entityType": {
            "title": "What to scrape",
            "enum": [
              "events",
              "statistics",
              "lineups",
              "incidents",
              "odds"
            ],
            "type": "string",
            "description": "One row per match, per match period (statistics), per player (lineups), per incident or per odds selection.",
            "default": "events"
          },
          "sports": {
            "title": "Sports",
            "type": "array",
            "description": "Listing by day: which sports. Ignored when Tournaments, Teams or Match URLs are given.",
            "items": {
              "type": "string",
              "enum": [
                "football",
                "basketball",
                "ice-hockey",
                "american-football",
                "baseball",
                "tennis",
                "handball",
                "volleyball",
                "rugby",
                "cricket",
                "esports",
                "futsal",
                "table-tennis",
                "waterpolo",
                "darts",
                "snooker",
                "badminton",
                "aussie-rules",
                "beach-volley",
                "floorball",
                "bandy"
              ],
              "enumTitles": [
                "Football (soccer)",
                "Basketball",
                "Ice hockey",
                "American football",
                "Baseball",
                "Tennis",
                "Handball",
                "Volleyball",
                "Rugby",
                "Cricket",
                "Esports",
                "Futsal",
                "Table tennis",
                "Water polo",
                "Darts",
                "Snooker",
                "Badminton",
                "Australian rules football",
                "Beach volleyball",
                "Floorball",
                "Bandy"
              ]
            },
            "default": [
              "football"
            ]
          },
          "dateFrom": {
            "title": "From date",
            "type": "string",
            "description": "First day (YYYY-MM-DD, UTC). Leave both dates empty for yesterday and today (upcoming: today and tomorrow). Listing by day starts at 2026-01-01; for older matches use Tournaments or Teams, where the dates only filter."
          },
          "dateTo": {
            "title": "To date",
            "type": "string",
            "description": "Last day (YYYY-MM-DD, UTC)."
          },
          "eventStatus": {
            "title": "Match status",
            "enum": [
              "finished",
              "upcoming",
              "all"
            ],
            "type": "string",
            "description": "Finished matches have results, statistics and closing odds; upcoming ones have fixtures and current odds.",
            "default": "finished"
          },
          "tournaments": {
            "title": "Tournaments",
            "type": "array",
            "description": "SofaScore tournament URLs or ids, e.g. https://www.sofascore.com/football/tournament/england/premier-league/17 or 17. Returns whole seasons (see Seasons), any year SofaScore has (the Premier League back to 1992/93).",
            "items": {
              "type": "string"
            }
          },
          "seasons": {
            "title": "Seasons",
            "type": "array",
            "description": "Tournaments only: which seasons, e.g. 2024/2025, 24/25 or 2024 (calendar-year leagues). Empty = the newest season (or the one in the tournament URL's #id:). \"all\" = every season.",
            "items": {
              "type": "string"
            }
          },
          "teams": {
            "title": "Teams",
            "type": "array",
            "description": "SofaScore team URLs or ids, e.g. https://www.sofascore.com/football/team/manchester-united/35. Returns the team's matches across all competitions, newest first; use the dates to limit how far back.",
            "items": {
              "type": "string"
            }
          },
          "eventIds": {
            "title": "Match URLs",
            "type": "array",
            "description": "SofaScore match URLs (…#id:16938974) or match ids. Overrides every other way of picking matches.",
            "items": {
              "type": "string"
            }
          },
          "includeEventDetails": {
            "title": "Include venue, referee and attendance",
            "type": "boolean",
            "description": "Matches only: adds venue, city, capacity, attendance, referee and both managers (one extra request per match).",
            "default": false
          },
          "maxItems": {
            "title": "Max items",
            "minimum": 1,
            "type": "integer",
            "description": "Stop after this many rows. Clear it for everything in range.",
            "default": 50
          },
          "mode": {
            "title": "Mode",
            "enum": [
              "full",
              "incremental"
            ],
            "type": "string",
            "description": "\"incremental\" remembers the finished matches earlier incremental runs with the same settings returned and skips them, so a daily schedule gets only new results.",
            "default": "full"
          },
          "concurrency": {
            "title": "Concurrency",
            "minimum": 1,
            "maximum": 30,
            "type": "integer",
            "description": "Requests in parallel.",
            "default": 10
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "SofaScore blocks most IPs. The Actor finds Apify Proxy (datacenter) IPs that get through and keeps reusing them. Proxy traffic is included in the price.",
            "default": {
              "useApifyProxy": true
            }
          },
          "disableTelemetry": {
            "title": "Turn off telemetry",
            "type": "boolean",
            "description": "By default each run reports its status and errors to the developer and, only if the run fails, its input values, to find and fix problems. Results are never sent. Tick this to send nothing. See \"Diagnostics and telemetry\" in the README for the full list.",
            "default": 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
                  },
                  "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}