{
  "openapi": "3.0.1",
  "info": {
    "title": "Tennis Scraper",
    "description": "Tennis Scraper: Scrape tennis matches on every tour (ATP, WTA, Challenger, ITF, UTR): live scores, results with set-by-set scores, fixtures, match statistics, head-to-head, player profiles and ATP/WTA rankings.",
    "version": "0.1",
    "x-build-id": "LezVDBtZbKb1j3TAC"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/automly~tennis-data-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-automly-tennis-data-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/automly~tennis-data-scraper/runs": {
      "post": {
        "operationId": "runs-sync-automly-tennis-data-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/automly~tennis-data-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-automly-tennis-data-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": {
          "dataType": {
            "title": "What to scrape",
            "enum": [
              "matches",
              "players",
              "rankings"
            ],
            "type": "string",
            "description": "Choose one kind of data per run: matches (results, live scores, fixtures, optional match statistics), player profiles, or rankings.",
            "default": "matches"
          },
          "dateFrom": {
            "title": "From date",
            "type": "string",
            "description": "First day of matches to get (dates are in UTC). Leave empty for today. Through the API you can also send today, yesterday, tomorrow, +3 days or 3 days ago."
          },
          "dateTo": {
            "title": "To date",
            "type": "string",
            "description": "Last day of matches to get. Leave empty for a single day. At most 366 days per run."
          },
          "live": {
            "title": "Live matches",
            "type": "boolean",
            "description": "Get the matches being played right now on every tour, with the current set and game score.",
            "default": false
          },
          "tournaments": {
            "title": "Tournaments",
            "type": "array",
            "description": "Tournament names or IDs, one per line, for example Wimbledon (men's singles), Wimbledon Women, US Open Men Doubles, Beijing. Every match of the tournament's latest edition is returned, including qualifying; set Season for an earlier year.",
            "items": {
              "type": "string"
            }
          },
          "season": {
            "title": "Season (year)",
            "minimum": 1990,
            "maximum": 2100,
            "type": "integer",
            "description": "Year of the tournament edition to get, for example 2025. Leave empty for the latest edition."
          },
          "players": {
            "title": "Players",
            "type": "array",
            "description": "Player names or IDs, one per line (Jannik Sinner, Swiatek). For matches: each player's latest matches and upcoming fixtures. For player profiles: each player's profile.",
            "items": {
              "type": "string"
            }
          },
          "headToHead": {
            "title": "Head-to-head",
            "type": "array",
            "description": "Two players per line as Player A vs Player B, for example Sinner vs Alcaraz. Returns every match the two have played against each other.",
            "items": {
              "type": "string"
            }
          },
          "matchIds": {
            "title": "Match IDs",
            "type": "array",
            "description": "Match IDs (the id field of a match row), one per line, to get those matches again, for example with statistics once they have finished.",
            "items": {
              "type": "string"
            }
          },
          "includeStatistics": {
            "title": "Include match statistics",
            "type": "boolean",
            "description": "Add each finished or live match's statistics for both players: aces, double faults, first and second serve %, points won on serve, break points saved and converted, return points, service games, tiebreaks, plus winners and unforced errors where the tournament tracks them, for the whole match and for each set, with the match duration, court and head-to-head record. Lower tours (ITF, UTR) rarely have statistics: those matches come without them.",
            "default": false
          },
          "tours": {
            "title": "Tours",
            "type": "array",
            "description": "Keep only matches from these tours. Leave empty for every tour.",
            "items": {
              "type": "string",
              "enum": [
                "atp",
                "wta",
                "challenger",
                "wta-125",
                "itf-men",
                "itf-women",
                "utr-men",
                "utr-women",
                "davis-cup",
                "billie-jean-king-cup",
                "united-cup",
                "exhibition",
                "juniors",
                "wheelchairs",
                "legends",
                "other"
              ],
              "enumTitles": [
                "ATP",
                "WTA",
                "ATP Challenger",
                "WTA 125",
                "ITF Men",
                "ITF Women",
                "UTR Men",
                "UTR Women",
                "Davis Cup",
                "Billie Jean King Cup",
                "United Cup",
                "Exhibitions",
                "Juniors",
                "Wheelchair",
                "Legends",
                "Other events"
              ]
            }
          },
          "matchType": {
            "title": "Singles or doubles",
            "enum": [
              "all",
              "singles",
              "doubles"
            ],
            "type": "string",
            "description": "Keep only singles or only doubles matches.",
            "default": "all"
          },
          "status": {
            "title": "Match status",
            "enum": [
              "all",
              "finished",
              "live",
              "upcoming"
            ],
            "type": "string",
            "description": "Keep only finished matches (results, including retirements and walkovers), live matches, or upcoming matches (fixtures).",
            "default": "all"
          },
          "rankings": {
            "title": "Rankings",
            "type": "array",
            "description": "For rankings: the lists to get (top 500 each). For player profiles with no players listed: the profiles of the top-ranked players of these lists.",
            "items": {
              "type": "string",
              "enum": [
                "atp",
                "wta",
                "atp-live",
                "wta-live",
                "utr-men",
                "utr-women"
              ],
              "enumTitles": [
                "ATP Singles",
                "WTA Singles",
                "ATP Live Ranking",
                "WTA Live Ranking",
                "UTR Men",
                "UTR Women"
              ]
            },
            "default": [
              "atp",
              "wta"
            ]
          },
          "maxResults": {
            "title": "Max results",
            "minimum": 0,
            "type": "integer",
            "description": "The most rows to save in this run, across all inputs (you are charged for no more than this); with several rankings it is shared evenly between them. 0 saves all of them (for player profiles from rankings: the top 100 of each ranking).",
            "default": 0
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "The default works for most runs. If results come back empty, try a different proxy option.",
            "default": {
              "useApifyProxy": true
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}