{
  "openapi": "3.0.1",
  "info": {
    "title": "Tennis Player Career Scraper — Serve Stats, Surface Splits",
    "description": "Full career match history of ATP and WTA players: opponent, rank, round, surface, score, plus per-match ace rate, double fault rate, serve percentages, break points saved and dominance ratio. Win rates by surface and record against top-10 computed for you.",
    "version": "1.1",
    "x-build-id": "S8SQOhbX9mJsWMgTU"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/scapypuppy~tennis-player-career-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-scapypuppy-tennis-player-career-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/scapypuppy~tennis-player-career-scraper/runs": {
      "post": {
        "operationId": "runs-sync-scapypuppy-tennis-player-career-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/scapypuppy~tennis-player-career-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-scapypuppy-tennis-player-career-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",
        "required": [
          "players"
        ],
        "properties": {
          "players": {
            "title": "Players",
            "type": "array",
            "description": "Player names as written, such as \"Jannik Sinner\" or \"Iga Swiatek\", a last name that only one player has (\"Swiatek\"), or Tennis Abstract profile links. A last name several players share returns their names instead, unbilled. The same player given twice is fetched and billed once.",
            "items": {
              "type": "string"
            }
          },
          "maxMatchesPerPlayer": {
            "title": "Max matches per player",
            "minimum": 0,
            "maximum": 5000,
            "type": "integer",
            "description": "Most recent career matches kept per player. Each match is billed, so this is your cost cap; left empty, 500 is used. A cut career is marked truncated. 0 returns the profile with career totals only, billed as one profile.",
            "default": 500
          },
          "dateFrom": {
            "title": "Matches from",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
            "type": "string",
            "description": "Keep matches from tournaments that started on or after this date: the source dates each match by its tournament's start day."
          },
          "dateTo": {
            "title": "Matches to",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
            "type": "string",
            "description": "Keep matches of tournaments that started on or before this date (tournament start date)."
          },
          "surfaces": {
            "title": "Surfaces",
            "type": "array",
            "description": "Keep only matches on these surfaces. Empty means all surfaces.",
            "items": {
              "type": "string",
              "enum": [
                "Hard",
                "Clay",
                "Grass",
                "Carpet"
              ]
            }
          },
          "levels": {
            "title": "Tournament levels",
            "type": "array",
            "description": "Keep only these tournament levels, in the source's codes (men's and women's differ, see option names). ITF selects every ITF event, such as M15, W25 or Futures. Empty means all.",
            "items": {
              "type": "string",
              "enum": [
                "G",
                "M",
                "A",
                "S",
                "C",
                "F",
                "D",
                "O",
                "PM",
                "P",
                "I",
                "W",
                "ITF"
              ],
              "enumTitles": [
                "G: Grand Slam",
                "M: Masters 1000 (men)",
                "A: ATP Tour (men)",
                "S: ITF Futures (men)",
                "C: Challenger (men), WTA 125 (women)",
                "F: Tour Finals",
                "D: Davis Cup / Billie Jean King Cup",
                "O: Olympics",
                "PM: WTA 1000 (women)",
                "P: WTA 500 (women)",
                "I: WTA 250 (women)",
                "W: WTA event without a category yet (women)",
                "ITF: all ITF events (Futures, M15, M25, W10 to W100, CH, CC)"
              ]
            }
          },
          "rounds": {
            "title": "Rounds",
            "type": "array",
            "description": "Keep only these rounds. Empty means all rounds.",
            "items": {
              "type": "string",
              "enum": [
                "F",
                "SF",
                "QF",
                "R16",
                "R32",
                "R64",
                "R128",
                "RR",
                "BR",
                "Q1",
                "Q2",
                "Q3",
                "Q4"
              ],
              "enumTitles": [
                "F: Final",
                "SF: Semifinal",
                "QF: Quarterfinal",
                "R16: Round of 16",
                "R32: Round of 32",
                "R64: Round of 64",
                "R128: Round of 128",
                "RR: Round robin (group stages: Tour Finals, team cups)",
                "BR: Bronze medal match (Olympics)",
                "Q1: Qualifying round 1",
                "Q2: Qualifying round 2",
                "Q3: Qualifying round 3",
                "Q4: Qualifying round 4"
              ]
            }
          },
          "result": {
            "title": "Result",
            "enum": [
              "all",
              "won",
              "lost"
            ],
            "type": "string",
            "description": "Keep only matches the player won, only the ones lost, or all.",
            "default": "all"
          },
          "opponentRankMax": {
            "title": "Opponent ranked inside top",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "Keep only matches against opponents ranked at this position or better at the time, for example 10 for top-10 opponents. Unranked opponents are left out."
          },
          "opponents": {
            "title": "Opponents",
            "type": "array",
            "description": "Keep only matches against these players: names as the source writes them (\"Carlos Alcaraz\"), slugs (CarlosAlcaraz) or profile links. A last name alone is not enough. Empty means every opponent.",
            "items": {
              "type": "string"
            }
          },
          "computeCareerStats": {
            "title": "Career stats and summary",
            "type": "boolean",
            "description": "careerStats: win rate overall and by surface, level and year, dominance ratio, ace and double fault rates, record against the top 10. careerSummary: titles and finals, head-to-head by opponent, splits, sets, games, tiebreaks, hold and break rates, and a summary by tournament, over every match that passes the filters. Both come with the profile at no extra charge.",
            "default": true
          },
          "outputLayout": {
            "title": "Output layout",
            "enum": [
              "nested",
              "rows"
            ],
            "type": "string",
            "description": "Nested: one record per player with the matches inside; the Career matches view still shows one row per match. Rows: a profile record plus one record per match (recordType field), ready for CSV. Billing is the same.",
            "default": "nested"
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Datacenter proxies are enough; residential proxies are not required.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}