{
  "openapi": "3.0.1",
  "info": {
    "title": "Tennis Match Stats Scraper: ATP, WTA, ITF & Challenger",
    "description": "Tennis results, live scores and fixtures for ATP, WTA, Challenger and ITF from Flashscore, with full match statistics (aces, double faults, serve %, break points, winners, errors) for every match in bulk. Monitor mode returns only newly finished matches. No start fee.",
    "version": "0.1",
    "x-build-id": "OyEuWiHVPj50MS4Bc"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/moonweil~tennis-match-stats/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-moonweil-tennis-match-stats",
        "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/moonweil~tennis-match-stats/runs": {
      "post": {
        "operationId": "runs-sync-moonweil-tennis-match-stats",
        "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/moonweil~tennis-match-stats/run-sync": {
      "post": {
        "operationId": "run-sync-moonweil-tennis-match-stats",
        "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": {
          "daysBack": {
            "title": "Days back",
            "minimum": 0,
            "maximum": 7,
            "type": "integer",
            "description": "How many past days to include, counted in UTC (0 = today only, 1 = yesterday and today, up to 7). Flashscore keeps match lists for the last 7 days.",
            "default": 1
          },
          "daysAhead": {
            "title": "Days ahead",
            "minimum": 0,
            "maximum": 7,
            "type": "integer",
            "description": "How many future days of fixtures to include (0 = none, up to 7). Use with the 'Scheduled' status to get the order of play.",
            "default": 0
          },
          "statuses": {
            "title": "Match status",
            "type": "array",
            "description": "Only return matches in these states. Leave empty for all. 'Live' is the score at the moment the run reads it, not a stream.",
            "items": {
              "type": "string",
              "enum": [
                "finished",
                "live",
                "scheduled",
                "postponed",
                "cancelled"
              ],
              "enumTitles": [
                "Finished (results)",
                "Live (score at run time)",
                "Scheduled (fixtures)",
                "Postponed",
                "Cancelled"
              ]
            }
          },
          "tours": {
            "title": "Tours",
            "type": "array",
            "description": "Only return matches from these tours. Leave empty for every tour.",
            "items": {
              "type": "string",
              "enum": [
                "atp",
                "wta",
                "challenger",
                "itf-men",
                "itf-women",
                "other"
              ],
              "enumTitles": [
                "ATP",
                "WTA (incl. WTA 125)",
                "ATP Challenger",
                "ITF Men",
                "ITF Women",
                "Other (exhibitions, juniors, UTR, team events)"
              ]
            }
          },
          "eventTypes": {
            "title": "Singles or doubles",
            "type": "array",
            "description": "Only return these event types. Leave empty for all.",
            "items": {
              "type": "string",
              "enum": [
                "singles",
                "doubles",
                "mixed"
              ],
              "enumTitles": [
                "Singles",
                "Doubles",
                "Mixed doubles"
              ]
            }
          },
          "tournaments": {
            "title": "Tournaments",
            "type": "array",
            "description": "Optional. Only matches whose tournament name contains one of these words, e.g. \"Wimbledon\", \"Finals\", \"Antalya\". Not case- or accent-sensitive.",
            "items": {
              "type": "string"
            }
          },
          "players": {
            "title": "Players",
            "type": "array",
            "description": "Optional. Only matches with a player whose name contains one of these words, e.g. \"Alcaraz\", \"Sabalenka\". Flashscore writes names as \"Alcaraz C.\", so the surname is enough. Not case- or accent-sensitive.",
            "items": {
              "type": "string"
            }
          },
          "includeStats": {
            "title": "Include match statistics",
            "type": "boolean",
            "description": "Add the match statistics (aces, double faults, 1st serve %, serve and return points won, break points saved and converted, winners, unforced errors, net points, games won) and the match duration for finished and live matches. Charged as a separate 'match statistics' event only when statistics exist.",
            "default": true
          },
          "includeSetStats": {
            "title": "Include per-set statistics",
            "type": "boolean",
            "description": "Also return the same statistics for each set (statsBySet). Comes from the same request, so it costs nothing extra.",
            "default": false
          },
          "maxMatches": {
            "title": "Max matches",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Upper limit of matches returned per run, earliest start time first. You pay per delivered match, so this also caps the cost. A busy tennis day has 300-700 matches across all tours.",
            "default": 200
          },
          "monitorName": {
            "title": "Monitor name",
            "type": "string",
            "description": "Optional. A name for this feed (e.g. \"atp-results\"). With 'Only new finished matches' on, the actor remembers which matches it has delivered under this name."
          },
          "onlyNew": {
            "title": "Only new finished matches",
            "type": "boolean",
            "description": "Return only finished matches that an earlier run with the same monitor name has not delivered yet. Schedule it every few hours to get each result exactly once. Needs a monitor name.",
            "default": false
          },
          "maxConcurrency": {
            "title": "Max concurrency",
            "minimum": 1,
            "maximum": 8,
            "type": "integer",
            "description": "How many matches are fetched in parallel.",
            "default": 4
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Apify Proxy (datacenter) works. Change only if you need a specific country.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}