{
  "openapi": "3.0.1",
  "info": {
    "title": "Tennis Scraper: Live Scores, Results, Stats & Odds",
    "description": "Tennis live scores, results and fixtures for ATP, WTA, Challenger and ITF from Flashscore, with optional match statistics, point-by-point, head-to-head, rankings and bookmaker odds from about 30 countries.",
    "version": "0.1",
    "x-build-id": "uaIMnkPNqTP8PoJmc"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/keelwright~tennis-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-keelwright-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/keelwright~tennis-scraper/runs": {
      "post": {
        "operationId": "runs-sync-keelwright-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/keelwright~tennis-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-keelwright-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",
        "properties": {
          "daysBack": {
            "title": "Past days",
            "minimum": 0,
            "maximum": 7,
            "type": "integer",
            "description": "How many days before today (UTC) to include. 0 means today only. Results are available for the last 7 days.",
            "default": 0
          },
          "daysAhead": {
            "title": "Upcoming days",
            "minimum": 0,
            "maximum": 7,
            "type": "integer",
            "description": "How many days after today to include, for fixtures. Order of play is usually published one or two days ahead.",
            "default": 0
          },
          "statuses": {
            "title": "Match status",
            "type": "array",
            "description": "Only matches with these statuses. Leave empty for all. Choose only \"Live\" for in-play matches (yesterday's late matches that are still going are included).",
            "items": {
              "type": "string",
              "enum": [
                "scheduled",
                "live",
                "finished",
                "interrupted",
                "postponed",
                "cancelled",
                "abandoned"
              ],
              "enumTitles": [
                "Scheduled",
                "Live",
                "Finished (incl. retirements and walkovers)",
                "Interrupted / suspended",
                "Postponed",
                "Cancelled",
                "Abandoned"
              ]
            },
            "default": []
          },
          "tours": {
            "title": "Tours",
            "type": "array",
            "description": "Only these tours. Leave empty for all.",
            "items": {
              "type": "string",
              "enum": [
                "atp",
                "wta",
                "challenger-men",
                "challenger-women",
                "itf-men",
                "itf-women",
                "exhibition",
                "team",
                "other"
              ],
              "enumTitles": [
                "ATP",
                "WTA",
                "Challenger (men)",
                "Challenger (women)",
                "ITF (men)",
                "ITF (women)",
                "Exhibition",
                "Team events (Davis Cup, Billie Jean King Cup)",
                "Other"
              ]
            },
            "default": []
          },
          "matchTypes": {
            "title": "Singles or doubles",
            "type": "array",
            "description": "Only singles, only doubles, or team ties. Leave empty for all.",
            "items": {
              "type": "string",
              "enum": [
                "singles",
                "doubles",
                "team"
              ],
              "enumTitles": [
                "Singles",
                "Doubles",
                "Team ties"
              ]
            },
            "default": []
          },
          "players": {
            "title": "Players",
            "type": "array",
            "description": "Only matches with at least one of these players. Type a surname (Sinner) or a full name (Jannik Sinner). Leave empty for all players.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "tournaments": {
            "title": "Tournaments",
            "type": "array",
            "description": "Only tournaments whose name contains one of these words, for example Wimbledon, Shanghai or M15 Monastir. Leave empty for all.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "matchUrls": {
            "title": "Match URLs or ids",
            "type": "array",
            "description": "Flashscore tennis match URLs (any Flashscore domain) or 8-character match ids. When set, the days and filters above are not used.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "includeMatchInfo": {
            "title": "Rankings, round and duration",
            "type": "boolean",
            "description": "Each player's current ATP/WTA ranking and full name, the round (e.g. Quarter-finals), the match duration and each set's duration.",
            "default": false
          },
          "includeStatistics": {
            "title": "Match statistics",
            "type": "boolean",
            "description": "Aces, double faults, first serve %, points won on serve and return, break points, winners, unforced errors and more, for the match and for each set.",
            "default": false
          },
          "includePointByPoint": {
            "title": "Point-by-point",
            "type": "boolean",
            "description": "Every game with the server, who won it, breaks of serve and each point's score, with break, set and match points marked, plus tiebreak points.",
            "default": false
          },
          "includeHeadToHead": {
            "title": "Head-to-head and recent form",
            "type": "boolean",
            "description": "Earlier meetings of the two players and each player's last 10 matches.",
            "default": false
          },
          "includeOdds": {
            "title": "Bookmaker odds",
            "type": "boolean",
            "description": "Pre-match odds with opening prices from the bookmakers in the countries below, plus the best and average price and the implied win probability.",
            "default": false
          },
          "oddsMarkets": {
            "title": "Odds markets",
            "enum": [
              "matchWinner",
              "all"
            ],
            "type": "string",
            "description": "Match winner only, or every market Flashscore lists: set winner, total games, game and set handicaps, correct score, odd/even.",
            "default": "matchWinner"
          },
          "oddsCountries": {
            "title": "Bookmakers from",
            "type": "array",
            "description": "Bookmakers differ by country. The United Kingdom has the most (about 20). Pick several to compare more bookmakers; each extra country adds one request per match.",
            "items": {
              "type": "string",
              "enum": [
                "GB",
                "IT",
                "ES",
                "FR",
                "IE",
                "SE",
                "MX",
                "ZA",
                "CA-ON",
                "CA-QC",
                "DE",
                "RO",
                "AR",
                "CO",
                "DK",
                "PL",
                "US-NJ",
                "US-NY",
                "US-AZ",
                "GR",
                "AT",
                "CZ",
                "NG",
                "PT",
                "AU",
                "CH",
                "NL",
                "IN",
                "JP",
                "KE",
                "TR"
              ],
              "enumTitles": [
                "United Kingdom",
                "Italy",
                "Spain",
                "France",
                "Ireland",
                "Sweden",
                "Mexico",
                "South Africa",
                "Canada (Ontario)",
                "Canada (other provinces)",
                "Germany",
                "Romania",
                "Argentina",
                "Colombia",
                "Denmark",
                "Poland",
                "USA (New Jersey)",
                "USA (New York)",
                "USA (Arizona)",
                "Greece",
                "Austria",
                "Czechia",
                "Nigeria",
                "Portugal",
                "Australia",
                "Switzerland",
                "Netherlands",
                "India",
                "Japan",
                "Kenya",
                "Turkey"
              ]
            },
            "default": [
              "GB"
            ]
          },
          "onlyChanged": {
            "title": "Only new or changed matches",
            "type": "boolean",
            "description": "Save only matches that are new or whose status or score changed since the previous run with the same settings. Use it with a schedule (for example every 5 minutes) to follow live scores without paying for unchanged rows.",
            "default": false
          },
          "maxItems": {
            "title": "Max results",
            "minimum": 0,
            "type": "integer",
            "description": "Stop after this many matches. 0 means no limit. A busy day has 400-600 matches across all tours.",
            "default": 1000
          },
          "maxConcurrency": {
            "title": "Max concurrency",
            "minimum": 1,
            "maximum": 50,
            "type": "integer",
            "description": "How many matches are loaded at the same time when extra data is on.",
            "default": 10
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Not needed in most cases: Flashscore answers Apify's servers directly. Turn it on only if runs start failing with \"blocked\".",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}