{
  "openapi": "3.0.1",
  "info": {
    "title": "Tennis Scraper – Results, Odds, H2H & ATP/WTA Rankings",
    "description": "Scrape tennis results, fixtures and betting odds from TennisExplorer: set scores, opening and closing odds from 15 bookmakers, H2H, player stats and ATP/WTA rankings. ATP, WTA, Challenger, ITF. No login.",
    "version": "0.1",
    "x-build-id": "CKMcWPiDVKTI5YNQ3"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/smoldesk~tennis-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-smoldesk-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/smoldesk~tennis-scraper/runs": {
      "post": {
        "operationId": "runs-sync-smoldesk-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/smoldesk~tennis-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-smoldesk-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": {
          "startDate": {
            "title": "Start date",
            "type": "string",
            "description": "First day to scrape: YYYY-MM-DD, or relative: today, yesterday, tomorrow, -7 (7 days ago), +2 (in 2 days). Every listed match that day is scraped: results and upcoming fixtures, ATP, WTA, Challenger, ITF and UTR. Dates go back to the early 2000s (odds from about 2010)."
          },
          "endDate": {
            "title": "End date",
            "type": "string",
            "description": "Last day to scrape (same formats). Leave empty to scrape only the start date. Use 'today' with start date '-7' for a rolling last-week window in scheduled runs."
          },
          "matchTypes": {
            "title": "Match types",
            "type": "array",
            "description": "Which draws to keep. Empty = all. Applies to the date range only — tournament, player and match URLs are always scraped in full.",
            "items": {
              "type": "string",
              "enum": [
                "atp-single",
                "wta-single",
                "atp-double",
                "wta-double",
                "mixed-double"
              ],
              "enumTitles": [
                "ATP / men's singles",
                "WTA / women's singles",
                "ATP / men's doubles",
                "WTA / women's doubles",
                "Mixed doubles"
              ]
            }
          },
          "levels": {
            "title": "Tournament levels",
            "type": "array",
            "description": "Which tournament levels to keep. Empty = all. 'tour' = ATP/WTA tour events and Grand Slams; 'team-exhibition' = Davis Cup, United Cup, Laver Cup, club leagues (Bundesliga…) and exhibitions. Applies to the date range only — tournament, player and match URLs are always scraped in full.",
            "items": {
              "type": "string",
              "enum": [
                "tour",
                "challenger",
                "itf",
                "utr",
                "team-exhibition"
              ],
              "enumTitles": [
                "ATP / WTA tour",
                "Challenger",
                "ITF / Futures",
                "UTR Pro Tennis Series",
                "Team cups, club leagues & exhibitions"
              ]
            }
          },
          "tournamentNames": {
            "title": "Tournament name contains",
            "type": "array",
            "description": "Keep only matches whose tournament name contains one of these words (case-insensitive), e.g. 'Shanghai', 'Wimbledon', 'US Open'. Applies to the date range only — tournament, player and match URLs are always scraped in full.",
            "items": {
              "type": "string"
            }
          },
          "playerNames": {
            "title": "Player name contains",
            "type": "array",
            "description": "Keep only matches with a player whose name contains one of these (case-insensitive). Names are listed as 'Surname I.', e.g. 'Sinner', 'Alcaraz'. Applies to the date range only — tournament, player and match URLs are always scraped in full.",
            "items": {
              "type": "string"
            }
          },
          "matchStatus": {
            "title": "Match status",
            "enum": [
              "all",
              "finished",
              "upcoming"
            ],
            "type": "string",
            "description": "All matches, only played ones (finished, retired, walkover) or only upcoming ones (no result yet). Applies to the date range only — tournament, player and match URLs are always scraped in full.",
            "default": "all"
          },
          "maxMatches": {
            "title": "Max matches",
            "minimum": 0,
            "type": "integer",
            "description": "Stop after this many matches in total (all sources). 0 or empty = no limit."
          },
          "includeRoundAndSurface": {
            "title": "Add round and surface (free)",
            "type": "boolean",
            "description": "Fills each match's round (1. round … final, qualifying) and court surface from the tournament draw page. One extra page per tournament, no extra charge. Not needed when match details are on.",
            "default": true
          },
          "includeMatchDetails": {
            "title": "Match details: odds from every bookmaker, H2H, round, surface, player bios",
            "type": "boolean",
            "description": "Opens each match page for: closing and opening odds from each bookmaker (usually 10-15), average/best odds, head-to-head record with past meetings, round, surface, and both players' ranking, birth date, height, weight and playing hand. Charged as an extra 'match details' event.",
            "default": false
          },
          "includeOddsHistory": {
            "title": "Odds movement history",
            "type": "boolean",
            "description": "Adds every odds change per bookmaker with its timestamp (UTC). Turns on match details.",
            "default": false
          },
          "includeAllMarkets": {
            "title": "Over/Under, Asian Handicap and Correct Score odds",
            "type": "boolean",
            "description": "Adds the other betting markets: total sets/games over-under, set/game handicaps and correct-score odds per bookmaker. Turns on match details.",
            "default": false
          },
          "tournamentUrls": {
            "title": "Tournament URLs",
            "type": "array",
            "description": "TennisExplorer tournament pages, e.g. https://www.tennisexplorer.com/wimbledon/2025/atp-men/ (add ?type=double for doubles or ?phase=qualification for qualifying). Every match of the draw is scraped with its round.",
            "items": {
              "type": "string"
            }
          },
          "playerUrls": {
            "title": "Player URLs",
            "type": "array",
            "description": "TennisExplorer player pages (https://www.tennisexplorer.com/player/sinner-8b8e8/) or just the slug (sinner-8b8e8). Gives a player profile (rankings, age, height, plays, win/loss by year and surface) plus their singles matches for the chosen seasons.",
            "items": {
              "type": "string"
            }
          },
          "playerSeasons": {
            "title": "Player seasons",
            "type": "array",
            "description": "Years of matches to fetch for each player, e.g. 2025, 2026. Empty = current season.",
            "items": {
              "type": "string"
            }
          },
          "includePlayerMatches": {
            "title": "Include player matches",
            "type": "boolean",
            "description": "Off = only the player profile records.",
            "default": true
          },
          "matchUrls": {
            "title": "Match URLs",
            "type": "array",
            "description": "Single matches: TennisExplorer match-detail URLs or IDs (https://www.tennisexplorer.com/match-detail/?id=3350891). Always returned with full details.",
            "items": {
              "type": "string"
            }
          },
          "rankings": {
            "title": "Rankings",
            "type": "array",
            "description": "ATP / WTA ranking lists to scrape (rank, movement, points, country).",
            "items": {
              "type": "string",
              "enum": [
                "atp-singles",
                "wta-singles",
                "atp-doubles",
                "wta-doubles",
                "atp-race",
                "wta-race"
              ],
              "enumTitles": [
                "ATP singles",
                "WTA singles",
                "ATP doubles",
                "WTA doubles",
                "ATP race",
                "WTA race"
              ]
            }
          },
          "rankingTopN": {
            "title": "Ranking depth",
            "minimum": 1,
            "maximum": 2500,
            "type": "integer",
            "description": "How many players per ranking list (from #1).",
            "default": 100
          },
          "rankingDate": {
            "title": "Ranking date",
            "type": "string",
            "description": "Optional past ranking week (YYYY-MM-DD, a Monday the ranking was published). Empty = latest."
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Optional. TennisExplorer works from Apify servers without a proxy. Residential proxies are not needed."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}