{
  "openapi": "3.0.1",
  "info": {
    "title": "Tennis Scraper: Results, Odds, Rankings, Players",
    "description": "Tennis results, fixtures, tournaments, player history, head-to-head and rankings from public TennisExplorer pages. ATP, WTA, Challenger and ITF matches with set scores and average pre-match odds. No proxy, no login.",
    "version": "0.1",
    "x-build-id": "efE87D7R7Fk5DFXo6"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/zerolag~tennis-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-zerolag-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/zerolag~tennis-scraper/runs": {
      "post": {
        "operationId": "runs-sync-zerolag-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/zerolag~tennis-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-zerolag-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",
        "required": [
          "mode"
        ],
        "properties": {
          "mode": {
            "title": "What to get",
            "enum": [
              "results",
              "fixtures",
              "tournament",
              "player",
              "headToHead",
              "rankings",
              "calendar"
            ],
            "type": "string",
            "description": "Pick one job. Each mode reads only the fields in its own section below.",
            "default": "results"
          },
          "dateFrom": {
            "title": "First day",
            "type": "string",
            "description": "For match results and upcoming matches. Pick a date or a length: <code>7 days</code> counts back from today for results and forward for upcoming matches. With no date, results come from the latest day with matches, and upcoming matches start today."
          },
          "dateTo": {
            "title": "Last day",
            "type": "string",
            "description": "With no date, results run up to today and upcoming matches cover two days."
          },
          "includeRoundAndSurface": {
            "title": "Add round, surface and prize money",
            "type": "boolean",
            "description": "Day pages do not show these, so the run reads each tournament page once. Turn it off for a faster run with fewer fields.",
            "default": true
          },
          "tournaments": {
            "title": "Tournaments",
            "type": "array",
            "description": "For the tournament mode: names such as <code>Wimbledon</code>, or a link such as <code>https://www.tennisexplorer.com/wimbledon/2024/atp-men/</code>. For results, upcoming matches and player history: keep only tournaments whose name contains one of these words.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "includeQualifying": {
            "title": "Include qualifying",
            "type": "boolean",
            "description": "For the tournament mode with a tournament name. Adds the qualifying draw.",
            "default": false
          },
          "players": {
            "title": "Players",
            "type": "array",
            "description": "For the player mode: names such as <code>Jannik Sinner</code>, or a link such as <code>https://www.tennisexplorer.com/player/sinner-8b8e8/</code>.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "matchups": {
            "title": "Matchups",
            "type": "array",
            "description": "For the head-to-head mode. One pair per line: <code>Carlos Alcaraz vs Jannik Sinner</code>.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "yearFrom": {
            "title": "First year",
            "minimum": 1990,
            "type": "integer",
            "description": "For tournaments, players, head-to-head and the calendar. Tournaments and the calendar default to this year. Players and head-to-head default to the whole career."
          },
          "yearTo": {
            "title": "Last year",
            "minimum": 1990,
            "type": "integer",
            "description": "Same as the first year when you want one season."
          },
          "rankingType": {
            "title": "Ranking type",
            "enum": [
              "singles",
              "doubles",
              "race"
            ],
            "type": "string",
            "description": "For the rankings mode.",
            "default": "singles"
          },
          "rankingDate": {
            "title": "Ranking date",
            "type": "string",
            "description": "For the rankings mode. Leave empty for the latest list. Lists go back to 1998."
          },
          "tours": {
            "title": "Tours",
            "type": "array",
            "description": "Keep only these tours. Leave empty for all. In the rankings mode use ATP or WTA to choose the list.",
            "items": {
              "type": "string",
              "enum": [
                "atp",
                "wta",
                "challenger",
                "itf",
                "utr"
              ],
              "enumTitles": [
                "ATP",
                "WTA",
                "Challenger",
                "ITF",
                "UTR Pro Tennis"
              ]
            },
            "default": []
          },
          "formats": {
            "title": "Formats",
            "type": "array",
            "description": "Which matches to keep. Leave empty for all formats. Mixed doubles appear in results, upcoming matches and player history.",
            "items": {
              "type": "string",
              "enum": [
                "singles",
                "doubles",
                "mixed"
              ],
              "enumTitles": [
                "Singles",
                "Doubles",
                "Mixed doubles"
              ]
            },
            "default": [
              "singles"
            ]
          },
          "surfaces": {
            "title": "Surfaces",
            "type": "array",
            "description": "Keep only these surfaces. Leave empty for all.",
            "items": {
              "type": "string",
              "enum": [
                "hard",
                "clay",
                "grass",
                "indoors"
              ],
              "enumTitles": [
                "Hard",
                "Clay",
                "Grass",
                "Indoors"
              ]
            },
            "default": []
          },
          "maxItems": {
            "title": "Maximum results",
            "minimum": 1,
            "type": "integer",
            "description": "The run stops after saving this many results. You pay only for saved results.",
            "default": 1000
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}