{
  "openapi": "3.0.1",
  "info": {
    "title": "Tennis Scores, Stats & Rankings Scraper",
    "description": "Tennis results, fixtures and live scores for ATP, WTA, Challenger and ITF with set-by-set scores, optional match stats (aces, double faults, serve %, break points), surface and seeds, plus ATP/WTA singles and doubles rankings in one clean schema.",
    "version": "1.0",
    "x-build-id": "23yG17ZAy7CUwdeAg"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/frank_conifer_af4~tennis-scores-stats-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-frank_conifer_af4-tennis-scores-stats-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/frank_conifer_af4~tennis-scores-stats-scraper/runs": {
      "post": {
        "operationId": "runs-sync-frank_conifer_af4-tennis-scores-stats-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/frank_conifer_af4~tennis-scores-stats-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-frank_conifer_af4-tennis-scores-stats-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",
            "type": "array",
            "description": "One or more of: results (completed matches with scores), fixtures (scheduled matches with both players known), live (matches in progress right now) and rankings (ATP/WTA ranking lists). Each match row is one charged event; each ranking row is one cheaper event.",
            "items": {
              "type": "string",
              "enum": [
                "results",
                "fixtures",
                "live",
                "rankings"
              ],
              "enumTitles": [
                "Results (completed matches)",
                "Fixtures (scheduled matches)",
                "Live scores",
                "Rankings"
              ]
            },
            "default": [
              "results"
            ]
          },
          "tours": {
            "title": "Tours",
            "type": "array",
            "description": "atp = ATP Tour and Grand Slams (men). wta = WTA Tour, WTA 125 and Grand Slams (women). challenger = ATP Challenger Tour. itf = ITF World Tennis Tour (M15-M25, W15-W100). Challenger and ITF matches are available for the last 7 and next 7 days. Rankings are available for atp and wta.",
            "items": {
              "type": "string",
              "enum": [
                "atp",
                "wta",
                "challenger",
                "itf"
              ],
              "enumTitles": [
                "ATP Tour + Grand Slams (men)",
                "WTA Tour + WTA 125 + Grand Slams (women)",
                "ATP Challenger Tour",
                "ITF World Tennis Tour (men and women)"
              ]
            },
            "default": [
              "atp",
              "wta"
            ]
          },
          "dateFrom": {
            "title": "From date",
            "type": "string",
            "description": "First day (UTC) for results and fixtures. Accepts YYYY-MM-DD, today, yesterday, tomorrow or an offset in days such as -3 or +2. Empty: results default to yesterday, fixtures to today. ATP/WTA results go back years; the range can be up to 31 days per run."
          },
          "dateTo": {
            "title": "To date",
            "type": "string",
            "description": "Last day (UTC), same formats. Empty: results end yesterday (or today when From date is set), fixtures end two days after the start. Longer ranges mean more requests and more match rows."
          },
          "fallbackToLatestResults": {
            "title": "Off-season fallback",
            "type": "boolean",
            "description": "If no completed matches exist in the date range (off-season, rest days), return the most recent completed match day instead of nothing. It only kicks in when the range itself is empty, not when your player or tournament filters remove everything.",
            "default": true
          },
          "includeDoubles": {
            "title": "Include doubles",
            "type": "boolean",
            "description": "Also return doubles and Grand Slam mixed doubles matches. Off: singles only. Doubles roughly add 40% more match rows (and cost).",
            "default": false
          },
          "tournaments": {
            "title": "Tournament name contains (any)",
            "type": "array",
            "description": "Keep only matches whose tournament name or location contains one of these texts (case-insensitive), e.g. Wimbledon, Shanghai, Monastir. Empty: all tournaments.",
            "items": {
              "type": "string"
            }
          },
          "players": {
            "title": "Player names (any)",
            "type": "array",
            "description": "Keep only matches with one of these players (and only these players in rankings). Full or partial names work, e.g. Sinner, Iga Swiatek, Alcaraz. Accents and case are ignored, and Jannik Sinner also matches the short form Sinner J.",
            "items": {
              "type": "string"
            }
          },
          "includeMatchStats": {
            "title": "Include match stats and duration",
            "type": "boolean",
            "description": "Adds per-player statistics (aces, double faults, first-serve %, points won on first and second serve, break points saved and converted, winners, unforced errors, net points, service and return games) plus match and set durations for completed and live matches of the last 7 days. Makes 2 extra requests per match, so runs are slower. Not charged extra.",
            "default": false
          },
          "maxMatches": {
            "title": "Max match rows",
            "minimum": 1,
            "maximum": 50000,
            "type": "integer",
            "description": "Upper limit of match rows per run (after filters). Each match row is one charged event, so this caps your cost. Matches are returned in start-time order.",
            "default": 1000
          },
          "rankingsType": {
            "title": "Rankings type",
            "enum": [
              "singles",
              "doubles",
              "both"
            ],
            "type": "string",
            "description": "Singles, doubles or both. Used only when rankings is selected.",
            "default": "singles"
          },
          "maxRankingRows": {
            "title": "Ranking rows per list",
            "minimum": 1,
            "maximum": 2000,
            "type": "integer",
            "description": "How many places to return per ranking list (top N), e.g. 100 for the top 100. Each row is one ranking-row event. With a player filter, the top N is searched and only matching players are returned.",
            "default": 100
          },
          "onlyNewResults": {
            "title": "Only new results (monitoring)",
            "type": "boolean",
            "description": "Remember delivered completed matches in a named key-value store and skip them on the next runs, so a scheduled run returns (and charges) only results that are new since the last run. Fixtures, live matches and rankings are always returned. Tip: use From date -1 so each run covers yesterday and today.",
            "default": false
          },
          "stateStoreName": {
            "title": "State store name",
            "type": "string",
            "description": "Name of the key-value store that keeps already delivered result IDs for Only new results. Use a different name per schedule if you run several independent monitors.",
            "default": "tennis-scores-state"
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Optional. The sources are public JSON feeds that normally work without a proxy; Apify Proxy (datacenter) helps if a feed starts rate-limiting."
          },
          "maxConcurrency": {
            "title": "Max concurrency",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "Parallel requests (mostly for match stats). Each source is additionally rate-limited per host, so higher values only help with stats on large date ranges.",
            "default": 4
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}