{
  "openapi": "3.0.1",
  "info": {
    "title": "Tennis Scraper — Matches, Odds History, Players, Rankings, H2H",
    "description": "Scrape TennisExplorer: ATP/WTA/ITF/Challenger results and fixtures by date range with average and per-bookmaker odds (opening odds, movement history, O/U, handicap, correct score), player profiles with match history, rankings and head-to-head. No login, no browser.",
    "version": "0.1",
    "x-build-id": "vKOplVmK9ITtECSNh"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/teodor_banea~tennisexplorer-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-teodor_banea-tennisexplorer-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/teodor_banea~tennisexplorer-scraper/runs": {
      "post": {
        "operationId": "runs-sync-teodor_banea-tennisexplorer-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/teodor_banea~tennisexplorer-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-teodor_banea-tennisexplorer-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": "What to scrape",
            "enum": [
              "matches",
              "players",
              "rankings",
              "headToHead"
            ],
            "type": "string",
            "description": "Choose the data set. Matches: results and fixtures for a date range (optionally with bookmaker odds). Players: profile plus match history. Rankings: ATP or WTA ranking table. Head-to-head: all meetings between two players.",
            "default": "matches"
          },
          "dateFrom": {
            "title": "Date from",
            "type": "string",
            "description": "Enter the first day to scrape (YYYY-MM-DD, London calendar day as the site lists it). Past days give results, today gives live and finished matches, future days give fixtures. Empty = today."
          },
          "dateTo": {
            "title": "Date to",
            "type": "string",
            "description": "Enter the last day to scrape (inclusive). One run covers up to 92 days unless you set Maximum results. Empty = same as Date from."
          },
          "tours": {
            "title": "Tours",
            "type": "array",
            "description": "Select the lists to scrape. ATP and WTA singles include Challengers, ITF and UTR events. \"All matches\" is one combined list of every tour.",
            "items": {
              "type": "string",
              "enum": [
                "atp-single",
                "wta-single",
                "atp-double",
                "wta-double",
                "all"
              ],
              "enumTitles": [
                "ATP singles (incl. Challenger, ITF men)",
                "WTA singles (incl. WTA 125, ITF women)",
                "ATP doubles",
                "WTA doubles",
                "All matches (every tour in one list)"
              ]
            },
            "default": [
              "atp-single",
              "wta-single"
            ]
          },
          "includeOdds": {
            "title": "Include bookmaker odds (one extra page per match)",
            "type": "boolean",
            "description": "Fetch each match's detail page and add one odds row per bookmaker and market line: current and opening odds, timestamped movement history, Over/Under, Asian handicap and correct score. About 200–300 extra rows per ATP/WTA match — set Maximum results to control cost.",
            "default": false
          },
          "tournamentFilter": {
            "title": "Tournament name contains",
            "type": "string",
            "description": "Keep only matches whose tournament name contains this text (case-insensitive), e.g. \"Shanghai\" or \"challenger\". Leave empty for every tournament."
          },
          "players": {
            "title": "Players",
            "type": "array",
            "description": "Add players as a TennisExplorer slug (sinner-8b8e8), a profile URL, or a name with a space (Jannik Sinner — the top-ranked match is used). A lower-case word without spaces is read as a slug.",
            "items": {
              "type": "string"
            }
          },
          "years": {
            "title": "Seasons",
            "type": "array",
            "description": "Enter the seasons to list matches for (e.g. 2026, 2025), or \"all\" for every season the player has. Empty = current season.",
            "items": {
              "type": "string"
            }
          },
          "includePlayerMatches": {
            "title": "Include the player's matches",
            "type": "boolean",
            "description": "Add one row per match the player played in the chosen seasons (singles, doubles and mixed). Turn off to get only the profile rows.",
            "default": true
          },
          "rankingTour": {
            "title": "Ranking",
            "enum": [
              "atp-men",
              "wta-women"
            ],
            "type": "string",
            "description": "Select the ranking table.",
            "default": "atp-men"
          },
          "rankingYear": {
            "title": "Year-end ranking of season",
            "minimum": 1990,
            "maximum": 2100,
            "type": "integer",
            "description": "Enter a past season to get its year-end ranking. Leave empty for the current ranking."
          },
          "maxRank": {
            "title": "Down to rank",
            "minimum": 0,
            "maximum": 5000,
            "type": "integer",
            "description": "Limit the ranking to the top N players. Set to 0 for the whole table (about 2,000–3,000 players).",
            "default": 100
          },
          "pairs": {
            "title": "Player pairs",
            "type": "array",
            "description": "Add pairs as \"slugA vs slugB\" (zverev-6f768 vs de-minaur) or paste a https://www.tennisexplorer.com/mutual/… URL. The site's head-to-head includes exhibitions and team events.",
            "items": {
              "type": "string"
            }
          },
          "maxResults": {
            "title": "Maximum results",
            "minimum": 0,
            "maximum": 1000000,
            "type": "integer",
            "description": "Stop once this many rows (of any type) are delivered. Set to 0 for no limit. With a limit you may also scrape date ranges longer than 92 days.",
            "default": 0
          },
          "maxConcurrency": {
            "title": "Max concurrency",
            "minimum": 1,
            "maximum": 5,
            "type": "integer",
            "description": "Set how many pages load in parallel. The default is polite and fast enough.",
            "default": 3
          },
          "maxRequestsPerMinute": {
            "title": "Max requests per minute",
            "minimum": 1,
            "maximum": 120,
            "type": "integer",
            "description": "Set the page budget per minute. Requests are spread evenly across the minute.",
            "default": 60
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Not needed — TennisExplorer answers datacenter IPs normally. Enable Apify Proxy only if your runs start failing.",
            "default": {
              "useApifyProxy": false
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}