{
  "openapi": "3.0.1",
  "info": {
    "title": "SofaScore Sports Scraper: Live Scores, Timeline, Lineups",
    "description": "Scrape SofaScore football, tennis and basketball matches, one row per match: teams, score, period scores, status, minute, start time and winner. Live, by round, by match link or by day. Football adds referee, venue, goals, cards, substitutions and lineups. JSON, CSV or Excel. By MrBridge",
    "version": "0.1",
    "x-build-id": "fUvG49eUSh1QuSbvh"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/mrbridge~sofascore-sports-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-mrbridge-sofascore-sports-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/mrbridge~sofascore-sports-scraper/runs": {
      "post": {
        "operationId": "runs-sync-mrbridge-sofascore-sports-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/mrbridge~sofascore-sports-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-mrbridge-sofascore-sports-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",
              "matches",
              "date"
            ],
            "type": "string",
            "description": "live: the matches in play now for the sports below. tournament: the matches of the rounds listed in Tournament rounds. matches: the matches listed in Match links. date: the matches of the days listed in Dates, for the sports below, optionally limited to some leagues.",
            "default": "live"
          },
          "sports": {
            "title": "Sports (live and date modes)",
            "type": "array",
            "description": "Sports read in live and date modes. Ignored in the other modes: the sport comes from the match.",
            "items": {
              "type": "string",
              "enum": [
                "football",
                "tennis",
                "basketball"
              ],
              "enumTitles": [
                "Football",
                "Tennis",
                "Basketball"
              ]
            },
            "default": [
              "football"
            ]
          },
          "tournaments": {
            "title": "Tournament rounds (tournament mode)",
            "type": "array",
            "description": "One entry per round. Either { \"uniqueTournamentId\": 17, \"seasonId\": 96668, \"round\": 7 } or { \"url\": \"https://www.sofascore.com/football/tournament/england/premier-league/17#id:96668\", \"round\": 7 }. The round is required."
          },
          "matchUrls": {
            "title": "Match links (matches mode)",
            "type": "array",
            "description": "SofaScore match links that end with #id:<number>, or match ids (numbers).",
            "items": {
              "type": "string"
            }
          },
          "dates": {
            "title": "Dates (date mode)",
            "type": "array",
            "description": "UTC days in the form YYYY-MM-DD, from 7 days before to 7 days after the day the run starts. Leave empty for today (UTC). A match is kept when it starts on one of these UTC days.",
            "items": {
              "type": "string"
            }
          },
          "leagues": {
            "title": "Leagues (date mode)",
            "type": "array",
            "description": "Optional, 100 entries at most. Keeps the matches of a league when an entry (case ignored) equals its SofaScore unique tournament id or its tournament slug (for example 17 or premier-league), or the name or slug of its category, usually the country (England or england). Prefix an entry with a sport to limit it to that sport (football:17, basketball:england): the sport must be one of football, tennis, basketball and be in Sports, any other prefix such as hockey:17 is refused. A number alone only matches a unique tournament id. A category name that contains a colon is given by its slug. Leave empty for every league.",
            "items": {
              "type": "string"
            }
          },
          "maxItems": {
            "title": "Maximum matches",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Hard cap on the match rows returned and billed, from 1 to 10000. The run stops once that many rows are delivered.",
            "default": 100
          },
          "includeDetails": {
            "title": "⏩ Add-on: Include match details ($)",
            "type": "boolean",
            "description": "Adds a details column to each match. Football gets the sheet (venue, referee, managers, added time), the timeline (goals, cards, substitutions, period marks) and the line-ups. Basketball gets the sheet and the line-ups, with no timeline. Tennis gets none. Makes up to 3 extra requests per match, so the run lasts longer. One match-details event is billed for a match whose timeline holds at least one goal, card or substitution, or whose line-up holds at least one player. The venue, the referee, the managers and the period marks alone are not billed. See the Pricing tab.",
            "default": false
          },
          "capturePlan": {
            "title": "Capture plan",
            "type": "string",
            "description": "Maintainer only. Name of a closed diagnostic capture campaign (three names). Requires Internal capture mode. The allowlist lives in the code: any other value is rejected without issuing a request."
          },
          "internalCaptureMode": {
            "title": "Internal capture mode",
            "type": "boolean",
            "description": "Maintainer only. When true, captures raw responses to a named key-value store for building test fixtures. Not for normal use.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}