{
  "openapi": "3.0.1",
  "info": {
    "title": "Flashscore Tennis Scraper & API: Live Scores, Stats, H2H & Odds",
    "description": "Flashscore tennis data API: fixtures, live scores and results for ATP, WTA, Challenger and ITF matches, with optional match stats, point-by-point, head-to-head (H2H) and betting odds. From $1.50 per 1,000 matches.",
    "version": "0.1",
    "x-build-id": "uBM9LNSB0UGcvzYOE"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/devarq~tennis-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-devarq-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/devarq~tennis-scraper/runs": {
      "post": {
        "operationId": "runs-sync-devarq-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/devarq~tennis-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-devarq-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": {
          "mode": {
            "title": "Mode",
            "enum": [
              "matches",
              "match",
              "player"
            ],
            "type": "string",
            "description": "matches = fixtures/live/results for a date or range (default). match = specific matches by ID or URL, always with stats and point-by-point. player = one player's recent results and upcoming matches.",
            "default": "matches"
          },
          "player": {
            "title": "Player",
            "type": "string",
            "description": "Player mode: the player to look up (name like Sinner, or a Flashscore player URL). Matches mode: optional filter on player name."
          },
          "matchIds": {
            "title": "Match IDs or URLs",
            "type": "array",
            "description": "Match mode only. Flashscore match IDs (e.g. ldWaJXYa) or match URLs, one per item.",
            "items": {
              "type": "string"
            }
          },
          "date": {
            "title": "Date",
            "type": "string",
            "description": "Matches mode only. YYYY-MM-DD, today, tomorrow, yesterday, or an offset such as -3 or +2 (within 7 days of today). Days are UTC calendar days.",
            "default": "today"
          },
          "dateFrom": {
            "title": "Date from",
            "type": "string",
            "description": "Matches mode only. Range start (same formats as date), within 7 days of today."
          },
          "dateTo": {
            "title": "Date to",
            "type": "string",
            "description": "Matches mode only. Range end (same formats as date), within 7 days of today."
          },
          "tours": {
            "title": "Tours",
            "type": "array",
            "description": "Matches mode only. Tours to include, e.g. [\"ATP\", \"WTA\"]. Also: Challenger, Challenger Men, Challenger Women, ITF, ITF Men, ITF Women, Grand Slam, Davis Cup, Billie Jean King Cup, Teams, Other (juniors, wheelchair, exhibitions). Default: ATP and WTA.",
            "default": [
              "ATP",
              "WTA"
            ],
            "items": {
              "type": "string"
            }
          },
          "matchType": {
            "title": "Match type",
            "enum": [
              "singles",
              "doubles"
            ],
            "type": "string",
            "description": "Matches mode only. singles (default) or doubles.",
            "default": "singles"
          },
          "status": {
            "title": "Status",
            "type": "array",
            "description": "Matches and player modes. Statuses to include: scheduled, live (includes suspended matches), finished (played to the end or retired), cancelled (walkovers, cancellations, postponements). Empty = all.",
            "items": {
              "type": "string"
            }
          },
          "tournament": {
            "title": "Tournament",
            "type": "string",
            "description": "Matches and player modes. Only tournaments whose name contains this text (case-insensitive)."
          },
          "maxItems": {
            "title": "Max results",
            "minimum": 0,
            "type": "integer",
            "description": "All modes. Maximum matches returned after filters. 0 = no limit (your maximum charge per run still applies).",
            "default": 200
          },
          "includeStats": {
            "title": "Match statistics",
            "type": "boolean",
            "description": "All modes. Add match and per-set statistics (charged only when the match has them). Always on in match mode.",
            "default": false
          },
          "includePointByPoint": {
            "title": "Point by point",
            "type": "boolean",
            "description": "All modes. Add every game and point with breaks marked (charged only when available). Always on in match mode.",
            "default": false
          },
          "includeH2H": {
            "title": "Head to head",
            "type": "boolean",
            "description": "All modes. Add head-to-head record, per-surface record and recent form.",
            "default": false
          },
          "includeOdds": {
            "title": "Pre-match odds",
            "type": "boolean",
            "description": "All modes. Add pre-match home/away bookmaker odds when available.",
            "default": false
          },
          "onlyChanges": {
            "title": "Only changes",
            "type": "boolean",
            "description": "All modes. On repeated runs with identical input, return only matches whose status or score changed. Use with a schedule.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}