{
  "openapi": "3.0.1",
  "info": {
    "title": "Tennis Scraper & Odds API — ATP, WTA, ITF Results, Live Scores",
    "description": "Tennis scraper and odds API: results, live scores and fixtures for ATP, WTA, Challenger and ITF, with opening and current betting odds from many bookmakers, match stats, H2H and Grand Slam archives. Tennis data from $1 per 1,000 matches.",
    "version": "0.1",
    "x-build-id": "FvTCAicjCTpP66xkJ"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/griffie~tennis-results-odds-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-griffie-tennis-results-odds-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/griffie~tennis-results-odds-scraper/runs": {
      "post": {
        "operationId": "runs-sync-griffie-tennis-results-odds-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/griffie~tennis-results-odds-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-griffie-tennis-results-odds-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",
            "enum": [
              "byDate",
              "tournamentArchive"
            ],
            "type": "string",
            "description": "<b>By date</b>: results, live scores and fixtures for any day from 7 days ago to 7 days ahead, across every tour. <b>Tournament archive</b>: every match of a past or current tournament edition from its Flashscore results page (e.g. Wimbledon 2024).",
            "default": "byDate"
          },
          "dayOffsets": {
            "title": "Days (relative to today)",
            "type": "array",
            "description": "Day offsets from today: <code>-1</code> = yesterday, <code>0</code> = today, <code>1</code> = tomorrow. Range −7 to +7. Combine several, e.g. <code>-2, -1, 0</code>. Used in 'By date' mode. Empty = today.",
            "items": {
              "type": "string"
            },
            "default": [
              "0"
            ]
          },
          "dateFrom": {
            "title": "Date from (optional)",
            "type": "string",
            "description": "Alternative to day offsets: first calendar day (YYYY-MM-DD). Clipped to the −7…+7 day window. Use 'Tournament archive' for older seasons."
          },
          "dateTo": {
            "title": "Date to (optional)",
            "type": "string",
            "description": "Last calendar day (YYYY-MM-DD), inclusive."
          },
          "timezoneOffset": {
            "title": "Day boundary time zone (UTC offset, hours)",
            "minimum": -12,
            "maximum": 14,
            "type": "integer",
            "description": "Which time zone defines 'a day'. 0 = UTC days, -5 = US Eastern (winter), 1 = Central Europe, 10 = Sydney. Match times are always returned in ISO UTC.",
            "default": 0
          },
          "tournamentUrls": {
            "title": "Tournament archive URLs",
            "type": "array",
            "description": "Flashscore tennis tournament pages, for example <code>https://www.flashscore.com/tennis/atp-singles/wimbledon-2024/results/</code> or <code>https://www.flashscore.com/tennis/wta-singles/australian-open/results/</code>. '/results/' is added automatically. Used in 'Tournament archive' mode; all 'Show more' pages are followed.",
            "items": {
              "type": "string"
            },
            "default": []
          },
          "tours": {
            "title": "Tours",
            "type": "array",
            "description": "Keep only these tours. Empty = all tours. TEAMS covers Davis Cup / Billie Jean King Cup / United Cup ties; OTHER covers exhibitions, juniors, wheelchair and similar events.",
            "items": {
              "type": "string",
              "enum": [
                "ATP",
                "WTA",
                "CHALLENGER",
                "WTA125",
                "ITF_MEN",
                "ITF_WOMEN",
                "TEAMS",
                "OTHER"
              ],
              "enumTitles": [
                "ATP Tour",
                "WTA Tour",
                "ATP Challenger",
                "WTA 125 (Challenger women)",
                "ITF Men",
                "ITF Women",
                "Team events (Davis Cup, BJK Cup…)",
                "Other (exhibitions, juniors…)"
              ]
            },
            "default": []
          },
          "matchTypes": {
            "title": "Singles / doubles",
            "enum": [
              "all",
              "singles",
              "doubles"
            ],
            "type": "string",
            "description": "Keep singles only, doubles only (incl. mixed) or both.",
            "default": "all"
          },
          "status": {
            "title": "Match status",
            "type": "array",
            "description": "Keep only matches in these states. Empty = all. 'finished' includes retirements and walkovers (see resultType).",
            "items": {
              "type": "string",
              "enum": [
                "finished",
                "live",
                "scheduled",
                "interrupted",
                "cancelled",
                "postponed",
                "delayed"
              ],
              "enumTitles": [
                "Finished (results)",
                "Live now",
                "Scheduled (fixtures)",
                "Interrupted / suspended",
                "Cancelled",
                "Postponed",
                "Delayed"
              ]
            },
            "default": []
          },
          "includeQualifying": {
            "title": "Include qualifying matches",
            "type": "boolean",
            "description": "Turn off to keep main-draw matches only.",
            "default": true
          },
          "tournamentNameContains": {
            "title": "Tournament name contains",
            "type": "array",
            "description": "Keep tournaments whose name contains any of these words (case and accent insensitive), e.g. 'Davis Cup', 'Paris', 'M25'.",
            "items": {
              "type": "string"
            },
            "default": []
          },
          "playerNames": {
            "title": "Players",
            "type": "array",
            "description": "Keep matches involving any of these players. Full names or surnames work, e.g. 'Jannik Sinner', 'Swiatek'. Doubles partners are searched too.",
            "items": {
              "type": "string"
            },
            "default": []
          },
          "fallbackToAllTours": {
            "title": "Fall back to all tours if the chosen tours have no matches",
            "type": "boolean",
            "description": "In the off-season ATP/WTA days can be empty. When on, an empty tour selection falls back to every tour (logged and flagged in RUN_SUMMARY) instead of returning nothing.",
            "default": true
          },
          "includeOdds": {
            "title": "Add betting odds (opening + current, many bookmakers)",
            "type": "boolean",
            "description": "Adds pre-match opening and current prices from every bookmaker Flashscore lists for the chosen region, plus a consensus summary (average, best price, implied probability, drift, favourite won). Charged per match that returns odds.",
            "default": false
          },
          "oddsMarkets": {
            "title": "Odds markets",
            "type": "array",
            "description": "HOME_AWAY = match winner (and set winner). Also available: total games over/under, games handicap and correct score.",
            "items": {
              "type": "string",
              "enum": [
                "HOME_AWAY",
                "OVER_UNDER",
                "ASIAN_HANDICAP",
                "CORRECT_SCORE"
              ],
              "enumTitles": [
                "Match / set winner",
                "Total games over/under",
                "Games handicap",
                "Correct score (sets)"
              ]
            },
            "default": [
              "HOME_AWAY"
            ]
          },
          "oddsScopes": {
            "title": "Odds periods",
            "type": "array",
            "description": "Full match and/or individual sets. Empty = all periods offered.",
            "items": {
              "type": "string",
              "enum": [
                "FULL_TIME",
                "FIRST_SET",
                "SECOND_SET",
                "THIRD_SET"
              ],
              "enumTitles": [
                "Full match",
                "1st set",
                "2nd set",
                "3rd set"
              ]
            },
            "default": []
          },
          "geoIpCode": {
            "title": "Bookmaker region (country code)",
            "type": "string",
            "description": "Two-letter country code that decides which bookmakers are returned, e.g. GB (bet365, William Hill, Betfred…), US (DraftKings, FanDuel, BetMGM…), DE, AU, IT, CA.",
            "default": "GB"
          },
          "geoIpSubdivisionCode": {
            "title": "Bookmaker sub-region (optional)",
            "type": "string",
            "description": "Optional state/region code, e.g. USNJ or USNY for US state books, GBENG for England."
          },
          "includeStats": {
            "title": "Add match statistics",
            "type": "boolean",
            "description": "Aces, double faults, 1st/2nd serve %, break points saved/converted, return points, winners, unforced errors, net points, total points and games, plus set and match duration. Finished and live matches only.",
            "default": false
          },
          "includeSetStats": {
            "title": "Include per-set statistics",
            "type": "boolean",
            "description": "Adds the same statistics broken down by set (setStats). Requires 'Add match statistics'.",
            "default": false
          },
          "includeH2H": {
            "title": "Add head-to-head and recent form",
            "type": "boolean",
            "description": "Previous meetings between the two players with an H2H tally, plus each player's most recent matches (all surfaces).",
            "default": false
          },
          "h2hLimit": {
            "title": "Recent matches per player",
            "minimum": 1,
            "maximum": 50,
            "type": "integer",
            "description": "How many recent matches to keep per player in the H2H block (meetings keep at least 10).",
            "default": 5
          },
          "maxMatches": {
            "title": "Maximum matches",
            "minimum": 0,
            "maximum": 50000,
            "type": "integer",
            "description": "Stop after this many matches (after filters). 0 = no limit. A full day across all tours is roughly 100–600 matches.",
            "default": 200
          },
          "maxConcurrency": {
            "title": "Parallel requests",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "Matches enriched in parallel (odds/stats/H2H). Keep it modest to stay polite.",
            "default": 6
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Apify datacenter proxy is enough. If the proxy fails the Actor automatically continues on a direct connection.",
            "default": {
              "useApifyProxy": true
            }
          },
          "debugLog": {
            "title": "Debug log",
            "type": "boolean",
            "description": "Print per-request diagnostics.",
            "default": 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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}