{
  "openapi": "3.0.1",
  "info": {
    "title": "Tennis Match Stats Scraper - ATP & WTA",
    "description": "Scrape ATP and WTA tennis data from Sofascore by player name or match ID: results with set scores, serve and return statistics, point-by-point sequences, head-to-head history, betting odds and live rankings. Export CSV, Excel, JSON. No login or API key. Six record types per run.",
    "version": "0.1",
    "x-build-id": "5m3d9YhQehIvSr56E"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/recordsdata~tennis-match-stats-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-recordsdata-tennis-match-stats-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/recordsdata~tennis-match-stats-scraper/runs": {
      "post": {
        "operationId": "runs-sync-recordsdata-tennis-match-stats-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/recordsdata~tennis-match-stats-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-recordsdata-tennis-match-stats-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": {
          "playerNames": {
            "title": "Player names",
            "type": "array",
            "description": "Players whose recent and upcoming matches you want. Example: Novak Djokovic, Iga Swiatek. Ignored if you use profiles, name search or the tournament calendar below.",
            "default": [
              "Novak Djokovic"
            ],
            "items": {
              "type": "string"
            }
          },
          "tournaments": {
            "title": "Tournaments (all matches of a season)",
            "type": "array",
            "description": "Whole tournament seasons. Use a name (Roland Garros, Madrid), a Sofascore tournament ID (2519 = Shanghai) or id:seasonId. A name can match men, women and doubles, so combine it with Tour and Singles or doubles.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "tournamentSeason": {
            "title": "Tournament season",
            "type": "string",
            "description": "Season to list for the tournaments above: latest or a year such as 2025.",
            "default": ""
          },
          "eventIds": {
            "title": "Match IDs",
            "type": "array",
            "description": "Fetch specific matches directly by Sofascore match ID. Example: 12345678, the number after id: in a Sofascore match URL. When set, the default player name is ignored.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "liveOnly": {
            "title": "Live matches only",
            "type": "boolean",
            "description": "Ignores players and match IDs and returns every tennis match being played right now.",
            "default": false
          },
          "dateFrom": {
            "title": "Matches from (YYYY-MM-DD)",
            "type": "string",
            "description": "Only matches starting on or after this UTC date. Example: 2026-11-03.",
            "default": ""
          },
          "dateTo": {
            "title": "Matches until (YYYY-MM-DD)",
            "type": "string",
            "description": "Only matches starting on or before this UTC date. Use the same date as Matches from for a single day.",
            "default": ""
          },
          "gameWindow": {
            "title": "Played or upcoming",
            "enum": [
              "both",
              "played",
              "upcoming"
            ],
            "type": "string",
            "description": "Which matches of a player or tournament to list. Without dates, a player returns the latest 30 played and the next 30 upcoming.",
            "default": "both"
          },
          "tour": {
            "title": "Tour",
            "enum": [
              "any",
              "atp",
              "wta",
              "challenger",
              "itf",
              "utr"
            ],
            "type": "string",
            "description": "Keep only one tour: ATP, WTA, Challenger (includes WTA 125), ITF or UTR. Also applies to the tournament calendar.",
            "default": "any"
          },
          "matchType": {
            "title": "Singles or doubles",
            "enum": [
              "any",
              "singles",
              "doubles"
            ],
            "type": "string",
            "description": "Keep only singles or only doubles. Also applies to the tournament calendar.",
            "default": "any"
          },
          "matchStatus": {
            "title": "Match status",
            "enum": [
              "any",
              "finished",
              "live",
              "upcoming"
            ],
            "type": "string",
            "description": "Keep only finished, live or not-yet-started matches.",
            "default": "any"
          },
          "includeStatistics": {
            "title": "Match statistics (adds about 0.20 to 0.42 USD per match)",
            "type": "boolean",
            "description": "Serve, return, points and games stats for both players (aces, break points, first-serve %). Billed per statistic line, about 20 to 42 lines per match, on top of the match row.",
            "default": false
          },
          "includeSetStatistics": {
            "title": "Statistics per set",
            "type": "boolean",
            "description": "Same stats as Match statistics, set by set. Billed per statistic line.",
            "default": false
          },
          "includePointByPoint": {
            "title": "Point-by-point",
            "type": "boolean",
            "description": "Every point of every game and set. Large output.",
            "default": false
          },
          "includeH2h": {
            "title": "Head-to-head record",
            "type": "boolean",
            "description": "Historical wins and losses between the two players.",
            "default": false
          },
          "includeH2hMeetings": {
            "title": "Past meetings and surface split",
            "type": "boolean",
            "description": "Earlier matches between the two players (date, tournament, round, surface, winner, score) and wins per surface. One extra row per past meeting.",
            "default": false
          },
          "includeOdds": {
            "title": "Betting odds",
            "type": "boolean",
            "description": "Bookmaker odds for the match result. Informational data only, not betting advice.",
            "default": false
          },
          "oddsMarkets": {
            "title": "Odds markets (only with Betting odds)",
            "enum": [
              "main",
              "all"
            ],
            "type": "string",
            "description": "Main = match result only. All = every listed market (match winner, first set winner, total games), each with opening odd and movement.",
            "default": "main"
          },
          "includeVotes": {
            "title": "Fan votes",
            "type": "boolean",
            "description": "How many Sofascore users picked each player to win. One extra row per match with votes.",
            "default": false
          },
          "includeRanking": {
            "title": "ATP/WTA ranking of each player",
            "type": "boolean",
            "description": "Current ranking snapshot, computed once per unique player in the run, not per match.",
            "default": false
          },
          "playerProfiles": {
            "title": "Player profiles",
            "type": "array",
            "description": "One profile row per player with ranking, UTR rating, country, hand, height, birth date and prize money. Accepts a name (Carlos Alcaraz), a Sofascore player ID (275923) or a player page URL.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "includePlayerResults": {
            "title": "Add recent results of each player",
            "type": "boolean",
            "description": "Latest finished matches of every profile: date, tournament, round, surface, opponent, score. One extra row per result.",
            "default": false
          },
          "playerResultsLimit": {
            "title": "Results per player (max 150)",
            "minimum": 1,
            "maximum": 150,
            "type": "integer",
            "description": "How many recent results to add per player. 30 is one Sofascore page.",
            "default": 30
          },
          "includeSeasonStatistics": {
            "title": "Add serve statistics by tournament",
            "type": "boolean",
            "description": "Aces, double faults, first-serve %, break points and tie-breaks for the player's 10 most recent tournaments. One extra row per tournament.",
            "default": false
          },
          "tournamentProfiles": {
            "title": "Tournament profiles",
            "type": "array",
            "description": "One profile row per tournament with tour, surface, points, host city, prize money, title holder and most titles. Accepts a name (Roland Garros), a tournament ID (2480) or a page URL.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "includeChampions": {
            "title": "Add past champions of each tournament",
            "type": "boolean",
            "description": "Winner, runner-up, final score and date for the latest seasons. One extra row per champion.",
            "default": false
          },
          "championSeasons": {
            "title": "Seasons of champions",
            "minimum": 1,
            "maximum": 30,
            "type": "integer",
            "description": "How many of the latest seasons to look up per tournament (seasons whose final is not played yet give no row).",
            "default": 5
          },
          "searchQueries": {
            "title": "Search players and tournaments by name",
            "type": "array",
            "description": "Names to search, at least 2 characters. Example: Alcaraz. One row per player or tournament found, with ID, country or tour, link and relevance.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "searchType": {
            "title": "Keep only (players / tournaments)",
            "enum": [
              "all",
              "player",
              "tournament"
            ],
            "type": "string",
            "description": "Which kind of search result to keep.",
            "default": "all"
          },
          "searchFullProfiles": {
            "title": "Return full profiles for search results",
            "type": "boolean",
            "description": "Fetch the full profile of each result instead of one short row. Slower, more requests, one profile record per result.",
            "default": false
          },
          "listTournaments": {
            "title": "List tournaments",
            "type": "boolean",
            "description": "One row per tournament. Without dates: the season calendar of the chosen Tour. With dates (up to 14 days): tournaments that have matches on those days.",
            "default": false
          },
          "maxItems": {
            "title": "Max rows to return",
            "minimum": 1,
            "maximum": 1000000,
            "type": "integer",
            "description": "Maximum rows: matches, profiles, search results or tournaments. Example: 100. Free plan: 10 rows (preview). Paid plans: up to 1,000,000. Leave empty for all rows found."
          },
          "onlyNew": {
            "title": "Only new or changed matches",
            "type": "boolean",
            "description": "Skip matches this same search already returned (new match, finished, or new live score). You are not charged for skipped matches. Max rows then counts new rows.",
            "default": false
          },
          "stateKey": {
            "title": "Monitor name",
            "type": "string",
            "description": "Label to keep several independent monitors with identical filters. Leave empty to share state between runs of the same search.",
            "default": ""
          },
          "resetSeen": {
            "title": "Reset the seen list before this run",
            "type": "boolean",
            "description": "Forget earlier runs of this search so everything counts as new again.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}