{
  "openapi": "3.0.1",
  "info": {
    "title": "Tennis Odds & Stats Scraper",
    "description": "Tennis scores, stats and odds from Flashscore for ATP, WTA, Challenger and ITF: live matches, results, fixtures and past seasons. Odds from up to 175 bookmakers with opening and closing prices, point-by-point, H2H and form for backtests, player profiles and rankings. First 10 matches free.",
    "version": "0.0",
    "x-build-id": "R9RIgFtusKNSccXFI"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/insanedev~tennis-data/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-insanedev-tennis-data",
        "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/insanedev~tennis-data/runs": {
      "post": {
        "operationId": "runs-sync-insanedev-tennis-data",
        "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/insanedev~tennis-data/run-sync": {
      "post": {
        "operationId": "run-sync-insanedev-tennis-data",
        "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 get",
            "enum": [
              "matches",
              "live",
              "tournament",
              "player",
              "rankings"
            ],
            "type": "string",
            "description": "matches: results, fixtures and live matches by day (up to 7 days back and 7 ahead). live: only matches in play now. tournament: every match of a tournament edition, any year (Flashscore tournament URL). player: a player's recent results (Flashscore player URL). rankings: weekly ATP / WTA singles rankings.",
            "default": "matches"
          },
          "daysBack": {
            "title": "Days back",
            "minimum": 0,
            "maximum": 7,
            "type": "integer",
            "description": "Matches mode: how many past days to include (0 = today only, max 7).",
            "default": 1
          },
          "daysAhead": {
            "title": "Days ahead",
            "minimum": 0,
            "maximum": 7,
            "type": "integer",
            "description": "Matches mode: how many future days of fixtures to include (max 7).",
            "default": 0
          },
          "tours": {
            "title": "Tours",
            "type": "array",
            "description": "Which tours to keep. Values: ATP, WTA, CHALLENGER, WTA_125, ITF_MEN, ITF_WOMEN, TEAMS (Davis Cup, BJK Cup, United Cup), EXHIBITION, JUNIORS, OTHER.",
            "items": {
              "type": "string",
              "enum": [
                "ATP",
                "WTA",
                "CHALLENGER",
                "WTA_125",
                "ITF_MEN",
                "ITF_WOMEN",
                "TEAMS",
                "EXHIBITION",
                "JUNIORS",
                "UTR",
                "OTHER"
              ],
              "enumTitles": [
                "ATP",
                "WTA",
                "ATP Challenger",
                "WTA 125",
                "ITF Men",
                "ITF Women",
                "Team events",
                "Exhibitions",
                "Juniors",
                "UTR",
                "Other"
              ]
            },
            "default": [
              "ATP",
              "WTA",
              "CHALLENGER",
              "WTA_125"
            ]
          },
          "disciplines": {
            "title": "Singles / doubles",
            "type": "array",
            "description": "Keep singles, doubles or both.",
            "items": {
              "type": "string",
              "enum": [
                "singles",
                "doubles"
              ],
              "enumTitles": [
                "Singles",
                "Doubles"
              ]
            },
            "default": [
              "singles",
              "doubles"
            ]
          },
          "statuses": {
            "title": "Match status",
            "type": "array",
            "description": "Keep only these statuses. Empty = all.",
            "items": {
              "type": "string",
              "enum": [
                "scheduled",
                "live",
                "finished",
                "retired",
                "walkover",
                "cancelled",
                "postponed",
                "interrupted",
                "abandoned",
                "awarded"
              ]
            }
          },
          "playerNames": {
            "title": "Player filter",
            "type": "array",
            "description": "Keep only matches with one of these players (e.g. \"Sinner\", \"Swiatek I.\"). Case-insensitive.",
            "items": {
              "type": "string"
            }
          },
          "tournamentNames": {
            "title": "Tournament filter",
            "type": "array",
            "description": "Keep only tournaments whose name contains one of these words (e.g. \"Wimbledon\", \"Ankara\").",
            "items": {
              "type": "string"
            }
          },
          "tournamentUrls": {
            "title": "Tournament URLs (tournament mode)",
            "type": "array",
            "description": "Flashscore tournament pages, any edition, e.g. https://www.flashscore.com/tennis/atp-singles/wimbledon-2015/results/ or https://www.flashscore.com/tennis/atp-singles/stockholm/ (current edition).",
            "items": {
              "type": "string"
            }
          },
          "playerUrls": {
            "title": "Player URLs (player mode)",
            "type": "array",
            "description": "Flashscore player pages, e.g. https://www.flashscore.com/player/sinner-jannik/6HdC3z4H/",
            "items": {
              "type": "string"
            }
          },
          "includeStatistics": {
            "title": "Match statistics",
            "type": "boolean",
            "description": "Aces, double faults, serve and return points, break points, games won, per match and per set.",
            "default": false
          },
          "includePointByPoint": {
            "title": "Point-by-point",
            "type": "boolean",
            "description": "Every game with server, winner, breaks and point sequence, incl. tiebreaks, with break / set / match point flags.",
            "default": false
          },
          "includeH2H": {
            "title": "Head-to-head and recent form",
            "type": "boolean",
            "description": "Previous meetings plus each player's last matches.",
            "default": false
          },
          "h2hMatches": {
            "title": "H2H / form depth",
            "minimum": 1,
            "maximum": 50,
            "type": "integer",
            "description": "How many previous matches to keep in each list.",
            "default": 10
          },
          "includePlayerProfile": {
            "title": "Player profiles",
            "type": "boolean",
            "description": "Age and birth date, current injury and injury history, titles with prize money, and win/loss records per season and surface (hard, clay, grass) with the year-end rank.",
            "default": false
          },
          "includeRanking": {
            "title": "Current ranking",
            "type": "boolean",
            "description": "Add each player's current ATP / WTA rank and points (singles), plus full name and player URL.",
            "default": true
          },
          "includeRound": {
            "title": "Round",
            "type": "boolean",
            "description": "Add the round (\"1/8-finals\", \"Quarter-finals\", \"Final\") from the tournament page.",
            "default": true
          },
          "includeOdds": {
            "title": "Bookmaker odds",
            "type": "boolean",
            "description": "Opening and current (or closing) odds from up to ~175 bookmakers: match winner, sets, games over/under, handicaps, correct score; median, best price, no-vig probability and per-bookmaker margin.",
            "default": false
          },
          "oddsDetail": {
            "title": "Odds detail",
            "enum": [
              "summary",
              "full"
            ],
            "type": "string",
            "description": "summary: one odds block per match (median, best, opening, fair probability). full: also every bookmaker × market line.",
            "default": "summary"
          },
          "oddsCoverage": {
            "title": "Bookmaker coverage",
            "enum": [
              "all",
              "fast"
            ],
            "type": "string",
            "description": "all: every bookmaker region we know (48 regions, about 175 bookmakers; a top match gets 130–160 prices). fast: the 10 biggest regions (about 100 bookmakers), quicker on large runs.",
            "default": "all"
          },
          "oddsCountries": {
            "title": "Bookmaker regions",
            "type": "array",
            "description": "Advanced: your own list of regions instead of the coverage setting. Two-letter country codes, or country:subdivision for US states and Canadian provinces (US:USNJ, CA:CAON). Up to 60.",
            "items": {
              "type": "string"
            }
          },
          "onlyNew": {
            "title": "Only new or changed matches",
            "type": "boolean",
            "description": "For schedules: skip matches this input already delivered with the same status and score. Finished matches are sent once; live ones each time the score changes.",
            "default": false
          },
          "maxMatches": {
            "title": "Max matches",
            "minimum": 1,
            "type": "integer",
            "description": "Upper limit of match rows per run. It also caps the cost: 30 matches with statistics and odds cost about $0.36 after the 10 free ones.",
            "default": 1000
          },
          "rankingTours": {
            "title": "Ranking tours",
            "type": "array",
            "description": "Rankings mode: which tours.",
            "items": {
              "type": "string",
              "enum": [
                "ATP",
                "WTA"
              ]
            },
            "default": [
              "ATP",
              "WTA"
            ]
          },
          "rankingTop": {
            "title": "Ranking depth",
            "minimum": 1,
            "maximum": 3000,
            "type": "integer",
            "description": "Rankings mode: top N players per tour (ATP has about 2,300 ranked players).",
            "default": 100
          },
          "maxConcurrency": {
            "title": "Parallel requests",
            "minimum": 1,
            "maximum": 40,
            "type": "integer",
            "description": "How many requests run at once.",
            "default": 16
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}