{
  "openapi": "3.0.1",
  "info": {
    "title": "Tennis Scraper — ATP & WTA Scores, Draws, Set Scores",
    "description": "Scrape every ATP and WTA match: both players or doubles pairs, set-by-set scores with tiebreaks, seeds, round, division, winner, walkovers and retirements. History back to 2010.",
    "version": "1.0",
    "x-build-id": "vqf7b2lfxpzH8pyOJ"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/pixflor~tennis-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-pixflor-tennis-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/pixflor~tennis-scraper/runs": {
      "post": {
        "operationId": "runs-sync-pixflor-tennis-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/pixflor~tennis-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-pixflor-tennis-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": {
          "tours": {
            "title": "Tours",
            "type": "array",
            "description": "Which ESPN tour feeds to read. These are NOT a men's/women's split: each feed carries every draw of the tournaments it covers, so they overlap heavily (measured: 340 of 364 matches in common over one fortnight). Both are read by default because each also carries tournaments the other misses, and duplicates are removed automatically. To pick men's or women's matches, use the Divisions filter.",
            "items": {
              "type": "string",
              "enum": [
                "atp",
                "wta"
              ],
              "enumTitles": [
                "ATP (men)",
                "WTA (women)"
              ]
            },
            "default": [
              "atp",
              "wta"
            ]
          },
          "dateFrom": {
            "title": "Date from",
            "type": "string",
            "description": "Start date (YYYY-MM-DD). Leave both dates empty for whatever tournaments are on right now. History reaches back to at least 2010."
          },
          "dateTo": {
            "title": "Date to",
            "type": "string",
            "description": "End date (YYYY-MM-DD). Set with Date from to pull a historical range; a range is fetched one calendar month per request, up to 24 months in a single run."
          },
          "player": {
            "title": "Player name contains",
            "type": "string",
            "description": "Keep only matches involving this player, matched as a case-insensitive substring against both sides — including the individual members of a doubles pair. Example: Alcaraz"
          },
          "country": {
            "title": "Country contains",
            "type": "string",
            "description": "Keep only matches where either side's country matches this text, case-insensitive. Example: Spain"
          },
          "divisions": {
            "title": "Divisions",
            "type": "array",
            "description": "Keep only these draws, matched as substrings of the division name. This — not the Tours setting — is how you select men's or women's matches. Leave empty for all five draws. Example: pick Men's Singles for the men's main draw only.",
            "items": {
              "type": "string",
              "enum": [
                "Singles",
                "Doubles",
                "Men's Singles",
                "Women's Singles",
                "Men's Doubles",
                "Women's Doubles",
                "Mixed Doubles"
              ],
              "enumTitles": [
                "Any singles",
                "Any doubles",
                "Men's Singles",
                "Women's Singles",
                "Men's Doubles",
                "Women's Doubles",
                "Mixed Doubles"
              ]
            },
            "default": []
          },
          "rounds": {
            "title": "Rounds",
            "type": "array",
            "description": "Keep only these rounds, matched as substrings of the round name. Leave empty for the whole draw. Example: pick Final and Semifinal for the business end only.",
            "items": {
              "type": "string",
              "enum": [
                "Qualifying",
                "Round 1",
                "Round 2",
                "Round 3",
                "Round 4",
                "Quarterfinal",
                "Semifinal",
                "Final"
              ],
              "enumTitles": [
                "Qualifying",
                "Round 1",
                "Round 2",
                "Round 3",
                "Round 4 (last 16)",
                "Quarterfinal",
                "Semifinal",
                "Final"
              ]
            },
            "default": []
          },
          "includeQualifying": {
            "title": "Include qualifying matches",
            "type": "boolean",
            "description": "Qualifying rounds are included by default and are a large share of a Grand Slam — 329 of 1,126 ATP matches in July 2026. Turn this off for main-draw results only, which also lowers the bill.",
            "default": true
          },
          "seededOnly": {
            "title": "Seeded players only",
            "type": "boolean",
            "description": "Keep only matches where at least one side carries a seed. Seeds exist for main-draw matches, so this also excludes most qualifying.",
            "default": false
          },
          "statusFilter": {
            "title": "Match status",
            "enum": [
              "all",
              "completed",
              "upcoming",
              "live"
            ],
            "type": "string",
            "description": "Filter by state of play. Walkovers and retirements both count as completed, and are flagged separately in the isWalkover and isRetirement columns.",
            "default": "all"
          },
          "sortBy": {
            "title": "Sort by",
            "enum": [
              "date",
              "dateDesc",
              "tournament",
              "round"
            ],
            "type": "string",
            "description": "Row order in the dataset. 'Round' orders a draw the way it is actually played, qualifying first through to the final.",
            "default": "date"
          },
          "maxItems": {
            "title": "Maximum matches",
            "minimum": 1,
            "maximum": 20000,
            "type": "integer",
            "description": "Hard cap on rows written, and therefore on the bill. A Grand Slam month can exceed 1,700 matches, so set this deliberately when pulling a wide range.",
            "default": 500
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}