{
  "openapi": "3.0.1",
  "info": {
    "title": "Tennis Scraper & Odds API: Live Scores, Results, Stats, ATP WTA",
    "description": "Tennis scraper and tennis data API for every ATP, WTA, Challenger and ITF match: tennis live scores, tennis results and fixtures, match stats, point-by-point, ATP and WTA rankings, H2H, player profiles and tennis odds from 42 bookmakers (opening and closing lines). History since 2009.",
    "version": "0.9",
    "x-build-id": "Y7wwpbz8na4BWCCtn"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/sports-odds-lab~tennis-odds-results/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-sports-odds-lab-tennis-odds-results",
        "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/sports-odds-lab~tennis-odds-results/runs": {
      "post": {
        "operationId": "runs-sync-sports-odds-lab-tennis-odds-results",
        "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/sports-odds-lab~tennis-odds-results/run-sync": {
      "post": {
        "operationId": "run-sync-sports-odds-lab-tennis-odds-results",
        "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",
            "enum": [
              "recent",
              "tournaments",
              "players",
              "rankings"
            ],
            "type": "string",
            "description": "Recent matches: every tour from up to 7 days back to 7 days ahead (upcoming matches with current odds). Tournament history: complete past editions of the tournaments you list in 'Tournament history', odds back to 2009. Player history: every match of the players you list in 'Player history', for the years you choose. Rankings: the current ATP and WTA singles, doubles and race lists (see 'Rankings').",
            "default": "recent"
          },
          "statuses": {
            "title": "Match status",
            "type": "array",
            "description": "Finished includes retirements and walkovers. Live matches come with the server and the points of the current game (run it every few minutes for a live scoreboard). Other = cancelled or postponed.",
            "items": {
              "type": "string",
              "enum": [
                "finished",
                "scheduled",
                "live",
                "other"
              ],
              "enumTitles": [
                "Finished",
                "Scheduled",
                "Live",
                "Cancelled / postponed"
              ]
            },
            "default": [
              "finished",
              "live",
              "scheduled"
            ]
          },
          "daysBack": {
            "title": "Days back",
            "minimum": 0,
            "type": "integer",
            "description": "How many past days to include (0 = today only). Up to 7. Values above 7 are clamped to 7.",
            "default": 1
          },
          "daysAhead": {
            "title": "Days ahead",
            "minimum": 0,
            "type": "integer",
            "description": "How many upcoming days to include. Up to 7. Upcoming matches carry the current prices instead of closing lines. Values above 7 are clamped to 7.",
            "default": 0
          },
          "tours": {
            "title": "Tours",
            "type": "array",
            "description": "Which levels of play to include.",
            "items": {
              "type": "string",
              "enum": [
                "ATP",
                "WTA",
                "CHALLENGER",
                "ITF",
                "TEAMS",
                "OTHER"
              ],
              "enumTitles": [
                "ATP",
                "WTA",
                "Challenger (men and women)",
                "ITF (men and women)",
                "Team events",
                "Other (exhibitions, juniors)"
              ]
            },
            "default": [
              "ATP",
              "WTA",
              "CHALLENGER"
            ]
          },
          "formats": {
            "title": "Formats",
            "type": "array",
            "description": "Singles, doubles or both.",
            "items": {
              "type": "string",
              "enum": [
                "SINGLES",
                "DOUBLES"
              ],
              "enumTitles": [
                "Singles",
                "Doubles"
              ]
            },
            "default": [
              "SINGLES"
            ]
          },
          "tournaments": {
            "title": "Tournaments",
            "type": "array",
            "description": "'Tour: Tournament' as shown on Flashscore — e.g. 'ATP: Wimbledon', 'WTA: French Open', 'ATP: Indian Wells', 'Challenger Men: Genova', 'ITF Women: W15 Monastir' — or the tournament's Flashscore URL. 'ATP: all' = every ATP tournament. Tours: ATP, WTA, ATP Doubles, WTA Doubles, Challenger Men, Challenger Women, ITF Men, ITF Women.",
            "items": {
              "type": "string"
            }
          },
          "years": {
            "title": "Years",
            "type": "array",
            "description": "Optional. Tournament history: editions to scrape. Player history: calendar years. Single years (2024) or ranges (2015-2024). Leave empty to use 'Last editions'.",
            "items": {
              "type": "string"
            }
          },
          "lastYears": {
            "title": "Last editions",
            "minimum": 1,
            "type": "integer",
            "description": "Used when Years is empty. Tournament history: the latest edition of each tournament plus this many minus one before it. Player history: this many calendar years, the current one included.",
            "default": 1
          },
          "players": {
            "title": "Players",
            "type": "array",
            "description": "Player names ('Jannik Sinner', 'Iga Swiatek') or Flashscore player URLs. Every match of each player in the chosen years — main tour, Challenger, ITF and team events (pick them in Tours) — with odds and everything else you switch on. Tip: add ITF to Tours for players who still play ITF events.",
            "items": {
              "type": "string"
            }
          },
          "rankingLists": {
            "title": "Ranking lists",
            "type": "array",
            "description": "Current lists as published on Flashscore: rank, points, country and the player's Flashscore id (the same id as in match rows). A list costs the same as one match, whatever its length.",
            "items": {
              "type": "string",
              "enum": [
                "atp",
                "wta",
                "atp-race",
                "wta-race",
                "atp-doubles",
                "wta-doubles",
                "atp-doubles-race",
                "wta-doubles-race"
              ],
              "enumTitles": [
                "ATP singles",
                "WTA singles",
                "ATP race (points this year)",
                "WTA race (points this year)",
                "ATP doubles",
                "WTA doubles",
                "ATP doubles race",
                "WTA doubles race"
              ]
            },
            "default": [
              "atp",
              "wta"
            ]
          },
          "maxRankingPlayers": {
            "title": "Players per list",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "Top N of each list (the ATP list has about 2,300 players).",
            "default": 100
          },
          "includeQualifying": {
            "title": "Include qualifying",
            "type": "boolean",
            "description": "Qualifying rounds of tournaments (both modes).",
            "default": true
          },
          "includeOdds": {
            "title": "Include odds",
            "type": "boolean",
            "description": "Opening and latest (closing) match-winner odds per bookmaker plus the no-vig consensus.",
            "default": true
          },
          "bookmakers": {
            "title": "Only these bookmakers",
            "type": "array",
            "description": "Optional. Names or parts of names, e.g. bet365, DraftKings, Betfred. Leave empty for all available (up to 42).",
            "items": {
              "type": "string"
            }
          },
          "markets": {
            "title": "Extra markets",
            "type": "array",
            "description": "Match winner is always included. Add total games (over/under, every line), games handicap and set score (correct score): each bookmaker's opening and closing price, a no-vig consensus at the main line and, for finished matches, the result of each bet. Each market adds requests, so runs take longer — the price per match stays the same.",
            "items": {
              "type": "string",
              "enum": [
                "totalGames",
                "gamesHandicap",
                "setScore"
              ],
              "enumTitles": [
                "Total games (over/under)",
                "Games handicap",
                "Set score (correct score)"
              ]
            },
            "default": []
          },
          "onlyWithOdds": {
            "title": "Skip matches without odds",
            "type": "boolean",
            "description": "Do not save (and do not pay for) matches that no bookmaker priced.",
            "default": false
          },
          "includeStats": {
            "title": "Include match statistics",
            "type": "boolean",
            "description": "Aces, double faults, first/second serve points won, break points and more for finished matches (full detail on ATP/WTA/Challenger, partial on ITF).",
            "default": false
          },
          "includePointByPoint": {
            "title": "Include point-by-point",
            "type": "boolean",
            "description": "Every game of finished and live matches: server, winner, breaks and the score before each point (break, set and match points marked), plus every tiebreak point. One extra request per match.",
            "default": false
          },
          "includeH2H": {
            "title": "Head-to-head and recent form",
            "type": "boolean",
            "description": "Singles: the players' previous meetings (all surfaces and this surface, last 10 with scores) and each player's form — last 10 results, wins on this surface, rest days. Counted only from matches played before this one, so past matches carry no look-ahead. One extra request per match.",
            "default": false
          },
          "includeRankings": {
            "title": "Include current rankings",
            "type": "boolean",
            "description": "Current ATP/WTA singles ranking of both players. Recent matches only — past tournament editions don't get it, because today's ranking would be misleading there.",
            "default": true
          },
          "includePlayerProfiles": {
            "title": "Player profiles (height, weight, birth date, playing hand)",
            "type": "boolean",
            "description": "Singles: each player's height, weight, birth date, age at the match, playing hand and best singles/doubles ranking, from TennisExplorer (Flashscore has none of these). Found by name — a player with no exact match gets no profile rather than a guess. Profiles are remembered for 30 days in your account (key-value store 'tennis-player-profiles'), so repeated runs stay fast. Also works in Rankings mode (first 500 players of each list).",
            "default": false
          },
          "maxMatches": {
            "title": "Max matches",
            "minimum": 0,
            "type": "integer",
            "description": "Stop after this many matches (0 = no limit). With a limit the most important matches are kept first: ATP and WTA, then Challenger, team events and ITF.",
            "default": 0
          },
          "onlyChanges": {
            "title": "Only new or changed matches",
            "type": "boolean",
            "description": "Save (and pay for) only matches that are new or changed since the previous run of the same search: a new status, score or live point, or for upcoming matches a price move of 0.5 percentage points, a new bookmaker or a new start time. Each row says changeType 'new' or 'updated'. A match that finished since it was saved live comes once more with its final score. Unchanged matches are neither saved nor charged. Remembered in your account for 21 days (key-value store 'tennis-odds-changes').",
            "default": false
          },
          "historyName": {
            "title": "History name",
            "type": "string",
            "description": "Optional. Each search (its settings, not its days) keeps its own history automatically. Give several schedules the same name to share one history, or a new name to start afresh."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}