{
  "openapi": "3.0.1",
  "info": {
    "title": "Tennis Abstract Scraper — ATP & WTA Match Stats, Elo",
    "description": "Scrape Tennis Abstract: every ATP and WTA career match with serve and return stats, player profiles with Elo, splits and head-to-heads, full Elo ratings and rankings, tournament draws and charted matches. Filter by date, surface and round.",
    "version": "0.1",
    "x-build-id": "DaikxWHSSpOch5esc"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/blackfalcondata~tennis-abstract-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-blackfalcondata-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/blackfalcondata~tennis-abstract-scraper/runs": {
      "post": {
        "operationId": "runs-sync-blackfalcondata-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/blackfalcondata~tennis-abstract-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-blackfalcondata-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": {
          "players": {
            "title": "🎾 Players",
            "type": "array",
            "description": "Player names, as on Tennis Abstract (e.g. \"Carlos Alcaraz\" or \"Iga Swiatek\"). One per line. ATP or WTA is detected automatically. A player page URL also works.",
            "items": {
              "type": "string"
            }
          },
          "dataTypes": {
            "title": "📊 What to collect",
            "type": "array",
            "description": "Matches: every career match with serve and return stats. Player profiles: bio, ranking and Elo. Player stats tables: splits, seasons, finals, year-end rankings, recent events, head-to-heads and charting summaries. Elo ratings and rankings: the full current tables for the chosen tour.",
            "items": {
              "type": "string",
              "enum": [
                "matches",
                "players",
                "playerTables",
                "eloRatings",
                "rankings"
              ],
              "enumTitles": [
                "Matches",
                "Player profiles",
                "Player stats tables",
                "Elo ratings table",
                "Current rankings table"
              ]
            },
            "default": [
              "matches"
            ]
          },
          "tour": {
            "title": "🌍 Tour",
            "enum": [
              "auto",
              "atp",
              "wta"
            ],
            "type": "string",
            "description": "Auto detects each player's tour. For Elo ratings and rankings, Auto returns both ATP and WTA.",
            "default": "auto"
          },
          "dateFrom": {
            "title": "📅 Date from",
            "pattern": "^(\\d{4}-\\d{2}-\\d{2})?$",
            "type": "string",
            "description": "Only matches on or after this date (YYYY-MM-DD). Also filters charted matches."
          },
          "dateTo": {
            "title": "📅 Date to",
            "pattern": "^(\\d{4}-\\d{2}-\\d{2})?$",
            "type": "string",
            "description": "Only matches on or before this date (YYYY-MM-DD)."
          },
          "surfaces": {
            "title": "🟫 Surfaces",
            "type": "array",
            "description": "Only matches on these surfaces. Leave empty for all.",
            "items": {
              "type": "string",
              "enum": [
                "Hard",
                "Clay",
                "Grass",
                "Carpet"
              ]
            }
          },
          "levels": {
            "title": "🏅 Tournament levels",
            "type": "array",
            "description": "Only matches at these levels, by Tennis Abstract level code: G Grand Slam, M Masters 1000, F Tour Finals, A ATP tour level, PM WTA 1000 (Premier Mandatory), P WTA 500 (Premier), I WTA 250 (International), C Challenger, S ITF / Futures, D Davis Cup / BJK Cup, O Olympics. A level name such as Grand Slam also works. Leave empty for all.",
            "items": {
              "type": "string"
            }
          },
          "rounds": {
            "title": "🔁 Rounds",
            "type": "array",
            "description": "Only matches in these rounds, e.g. F, SF, QF, R16, R32, R64, R128, RR, Q1. Leave empty for all.",
            "items": {
              "type": "string"
            }
          },
          "result": {
            "title": "✅ Result",
            "enum": [
              "all",
              "W",
              "L"
            ],
            "type": "string",
            "description": "Only wins, only losses, or all matches.",
            "default": "all"
          },
          "opponent": {
            "title": "🆚 Opponent",
            "type": "string",
            "description": "Only matches against this player (name, e.g. \"Jannik Sinner\")."
          },
          "maxOpponentRank": {
            "title": "🔝 Max opponent rank",
            "minimum": 1,
            "type": "integer",
            "description": "Only matches against opponents ranked this number or better at the time (e.g. 10 for top-10 opponents)."
          },
          "maxMatchesPerPlayer": {
            "title": "🔢 Max matches per player",
            "minimum": 0,
            "type": "integer",
            "description": "Most recent matches to return per player (0 = all career matches).",
            "default": 0
          },
          "maxResults": {
            "title": "💯 Max results",
            "minimum": 0,
            "maximum": 1000000,
            "type": "integer",
            "description": "Maximum records in total across all lookups (0 = unlimited).",
            "default": 100
          },
          "tableGroups": {
            "title": "📋 Player stats tables",
            "type": "array",
            "description": "Which table groups to return when \"Player stats tables\" is selected. Leave empty for all.",
            "items": {
              "type": "string",
              "enum": [
                "splits",
                "seasons",
                "finals",
                "yearEndRankings",
                "recentEvents",
                "headToHeads",
                "chartingSummaries"
              ],
              "enumTitles": [
                "Career and last-52-weeks splits",
                "Season by season",
                "Finals",
                "Year-end rankings",
                "Recent events",
                "Head-to-heads",
                "Match charting summaries"
              ]
            }
          },
          "tournaments": {
            "title": "🏆 Tournaments",
            "type": "array",
            "description": "Tournament draws and results, as \"year name\" (e.g. \"2026 Roland Garros\") or a tournament page URL. Prefix WTA events with W_ (e.g. \"W_2026 Roland Garros\") or set Tour to WTA.",
            "items": {
              "type": "string"
            }
          },
          "includeChartedMatches": {
            "title": "✍️ Charted matches",
            "type": "boolean",
            "description": "Also return matches from the Match Charting Project (shot-by-shot charted matches), filtered by the players and dates above, newest first.",
            "default": false
          },
          "includeDetails": {
            "title": "📋 Charted match details",
            "type": "boolean",
            "description": "For charted matches, also fetch each match page with its full stat tables (serve, return, rally, shot types). Slower; leave off for the match list only.",
            "default": false
          },
          "startUrls": {
            "title": "🔗 Start URLs",
            "type": "array",
            "description": "Paste Tennis Abstract URLs: a player page, a tournament page, a charted match page, the charting index or an Elo ratings page. Each URL is routed automatically.",
            "items": {
              "type": "string"
            },
            "default": []
          },
          "proxyConfiguration": {
            "title": "🛡️ Proxy",
            "type": "object",
            "description": "Proxy settings. The default works for normal runs.",
            "default": {
              "useApifyProxy": true
            }
          },
          "compact": {
            "title": "📦 Compact Output",
            "type": "boolean",
            "description": "Core fields only (for AI-agent/MCP workflows).",
            "default": false
          },
          "excludeEmptyFields": {
            "title": "Exclude empty fields from output",
            "type": "boolean",
            "description": "Drop null, empty-string, and empty-array fields from each record before push. Smaller payloads for AI agents and dashboards.",
            "default": false
          },
          "incrementalMode": {
            "title": "♻️ Incremental Mode",
            "type": "boolean",
            "description": "Compare against previous run state and return only new or changed records. stateKey is optional: it defaults to a value derived from your inputs, so different player sets never share state.",
            "default": false
          },
          "stateKey": {
            "title": "🔑 State Key",
            "type": "string",
            "description": "Optional. Stable identifier for the tracked search universe. Leave empty to auto-generate from search inputs."
          },
          "skipReposts": {
            "title": "🚫 Skip Reposts",
            "type": "boolean",
            "description": "When incremental, skip records whose content matches a record that expired in a prior run.",
            "default": false
          },
          "emitUnchanged": {
            "title": "🔄 Emit unchanged records",
            "type": "boolean",
            "description": "When incremental mode is on, also emit records that have not changed since the last run.",
            "default": false
          },
          "emitExpired": {
            "title": "⚰️ Emit expired records",
            "type": "boolean",
            "description": "When incremental mode is on, also emit records that were seen before but are no longer found.",
            "default": false
          },
          "notifyOnlyChanges": {
            "title": "🔄 Notify Only New/Updated",
            "type": "boolean",
            "description": "When incremental mode is on, only send notifications for NEW and UPDATED records.",
            "default": false
          },
          "notificationLimit": {
            "title": "📊 Max records per notification",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "Maximum number of records included in each notification message (1-20).",
            "default": 5
          },
          "telegramToken": {
            "title": "🔑 Telegram Bot Token",
            "type": "string",
            "description": "Telegram bot token (from @BotFather). Required for Telegram notifications."
          },
          "telegramChatId": {
            "title": "💬 Telegram Chat ID",
            "type": "string",
            "description": "Telegram chat or channel ID (e.g. \"-100123456789\"). Required when telegramToken is set."
          },
          "discordWebhookUrl": {
            "title": "🎮 Discord Webhook URL",
            "type": "string",
            "description": "Discord incoming webhook URL. Server Settings > Integrations > Webhooks > New Webhook."
          },
          "slackWebhookUrl": {
            "title": "💼 Slack Webhook URL",
            "type": "string",
            "description": "Slack incoming webhook URL. api.slack.com/messaging/webhooks."
          },
          "whatsappPhoneNumberId": {
            "title": "📞 WhatsApp Phone Number ID",
            "type": "string",
            "description": "Your WhatsApp Business phone-number ID (numeric, from Meta dashboard). Required when whatsappAccessToken is set."
          },
          "whatsappAccessToken": {
            "title": "📱 WhatsApp Access Token",
            "type": "string",
            "description": "WhatsApp Cloud API permanent access token (System User token from Meta Business). Recipient must have messaged the business number within the last 24h (service-conversation window, free since Nov 2024)."
          },
          "whatsappTo": {
            "title": "📲 WhatsApp Recipient",
            "type": "string",
            "description": "Recipient phone in E.164 format without + (e.g. \"436641234567\"). Recipient must have messaged your business number within last 24h."
          },
          "webhookUrl": {
            "title": "🪝 Generic Webhook URL",
            "type": "string",
            "description": "Receives a JSON POST with {metadata, items} after each run. Universal escape hatch for n8n / Make / Zapier / custom backends."
          },
          "webhookHeaders": {
            "title": "📋 Webhook Headers",
            "type": "object",
            "description": "Optional JSON object of custom headers (e.g. {\"Authorization\":\"Bearer ...\"})."
          },
          "appConnector": {
            "title": "Send results to a connected app",
            "type": "string",
            "description": "Optional. Pick a connected app under Settings > API & Integrations to receive your results. Best-effort across MCP connectors as Apify expands its catalog."
          },
          "mcpIssueTeam": {
            "title": "Issue tracker team",
            "type": "string",
            "description": "Only when the connected app is an issue tracker: the team (name or ID) the summary issue is created under, if that app requires one."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}