{
  "openapi": "3.0.1",
  "info": {
    "title": "Tennis Stats Scraper: ATP & WTA Match History, Elo",
    "description": "Tennis Abstract match history with serve and return stats for many ATP and WTA players per run, plus profiles, season and surface splits and Elo tables. Filters by date, surface, level, opponent rank. $6.40 per 1,000 rows, no monthly fee.",
    "version": "0.2",
    "x-build-id": "npW8cMFZdzRsaI5PQ"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/deepurple~tennis-abstract-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-deepurple-tennis-abstract-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/deepurple~tennis-abstract-scraper/runs": {
      "post": {
        "operationId": "runs-sync-deepurple-tennis-abstract-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/deepurple~tennis-abstract-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-deepurple-tennis-abstract-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": [
              "players",
              "elo"
            ],
            "type": "string",
            "description": "players: match history, profile and season stats of the players below. elo: the ATP and WTA Elo ratings tables.",
            "default": "players"
          },
          "players": {
            "title": "Players",
            "type": "array",
            "description": "Full names (Jannik Sinner, Iga Świątek), slugs (JannikSinner) or any tennisabstract.com URL with p=<Slug>. ATP and WTA can be mixed.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "tour": {
            "title": "Tour",
            "enum": [
              "auto",
              "atp",
              "wta"
            ],
            "type": "string",
            "description": "auto tries ATP first, then WTA. Choose a tour to search only there.",
            "default": "auto"
          },
          "dateFrom": {
            "title": "Matches from",
            "type": "string",
            "description": "First match date to keep, YYYY-MM-DD, inclusive."
          },
          "dateTo": {
            "title": "Matches to",
            "type": "string",
            "description": "Last match date to keep, YYYY-MM-DD, inclusive."
          },
          "surfaces": {
            "title": "Surfaces",
            "type": "array",
            "description": "Keep only these surfaces. Empty: all.",
            "items": {
              "type": "string",
              "enum": [
                "Hard",
                "Clay",
                "Grass",
                "Carpet"
              ]
            },
            "default": []
          },
          "levels": {
            "title": "Tournament levels",
            "type": "array",
            "description": "Keep only matches of these tournament levels (Grand Slam, Masters 1000, Tour 250/500, Tour Finals, Challenger, ITF, Team & Olympics, Other). Empty: all levels.",
            "items": {
              "type": "string",
              "enum": [
                "Grand Slam",
                "Masters 1000",
                "Tour 250/500",
                "Tour Finals",
                "Challenger",
                "ITF",
                "Team & Olympics",
                "Other"
              ]
            },
            "default": []
          },
          "rounds": {
            "title": "Rounds",
            "type": "array",
            "description": "Keep only matches of these rounds (R128 to F, RR round robin, BR bronze match, Q1 to Q3 qualifying). Empty: all rounds.",
            "items": {
              "type": "string",
              "enum": [
                "R128",
                "R64",
                "R32",
                "R16",
                "QF",
                "SF",
                "F",
                "RR",
                "BR",
                "Q1",
                "Q2",
                "Q3"
              ]
            },
            "default": []
          },
          "opponentRankMin": {
            "title": "Opponent rank from",
            "minimum": 0,
            "type": "integer",
            "description": "Keep only matches where the opponent's ranking at the time is at least this number (for example 11 skips the top 10). Matches with unknown opponent rank are dropped when set. 0 turns the filter off.",
            "default": 0
          },
          "opponentRankMax": {
            "title": "Opponent rank up to",
            "minimum": 0,
            "type": "integer",
            "description": "Keep only matches where the opponent's ranking at the time is this number or better (for example 10 keeps only top-10 opponents). Matches with unknown opponent rank are dropped when set. 0 turns the filter off.",
            "default": 0
          },
          "results": {
            "title": "Results",
            "enum": [
              "all",
              "wins",
              "losses"
            ],
            "type": "string",
            "description": "Keep all matches, only wins or only losses.",
            "default": "all"
          },
          "includeUpcoming": {
            "title": "Include upcoming",
            "type": "boolean",
            "description": "Also return scheduled matches (result U, no score). Only with results = all.",
            "default": false
          },
          "opponent": {
            "title": "Opponent contains",
            "type": "string",
            "description": "Keep matches against opponents whose name contains this text. Case and accents are ignored."
          },
          "maxMatchesPerPlayer": {
            "title": "Max matches per player",
            "minimum": 0,
            "maximum": 5000,
            "type": "integer",
            "description": "Newest first, after the filters. 0 returns no match rows (profile and seasons only). 0 to 5000.",
            "default": 500
          },
          "includeProfile": {
            "title": "Include player profile",
            "type": "boolean",
            "description": "One player row per player: ranks, birth date, hand, titles and Elo when known.",
            "default": true
          },
          "includeSeasonStats": {
            "title": "Include season stats",
            "type": "boolean",
            "description": "Rows for every season and for career and last-52-weeks splits (one extra request per player).",
            "default": false
          },
          "eloTours": {
            "title": "Elo tours",
            "type": "array",
            "description": "Mode elo: which Elo tables to return. Empty: both.",
            "items": {
              "type": "string",
              "enum": [
                "atp",
                "wta"
              ]
            },
            "default": []
          },
          "maxResults": {
            "title": "Max Elo rows per tour",
            "minimum": 1,
            "type": "integer",
            "description": "Mode elo: top rows per tour.",
            "default": 1000
          },
          "onlyNew": {
            "title": "Only new matches",
            "type": "boolean",
            "description": "Mode players: skip matches returned by earlier runs with the same players and tour.",
            "default": false
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Apify datacenter proxy is enough. Every attempt uses a new proxy session.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}