{
  "openapi": "3.0.1",
  "info": {
    "title": "Tennis Match Scraper - Scores, Odds, H2H & Form",
    "description": "Tennis match intel with betting context: scores, rankings, form, H2H, odds & point-by-point. ATP/WTA/Challenger/ITF.",
    "version": "0.2",
    "x-build-id": "cFjgEi4KGqdq3zXxb"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/teamkamkod~tennis-match-intel/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-teamkamkod-tennis-match-intel",
        "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/teamkamkod~tennis-match-intel/runs": {
      "post": {
        "operationId": "runs-sync-teamkamkod-tennis-match-intel",
        "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/teamkamkod~tennis-match-intel/run-sync": {
      "post": {
        "operationId": "run-sync-teamkamkod-tennis-match-intel",
        "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",
        "required": [
          "mode"
        ],
        "properties": {
          "mode": {
            "title": "Mode",
            "enum": [
              "list",
              "match"
            ],
            "type": "string",
            "description": "List every match of a day (lightweight, filterable, $0.001/match) or fetch one complete match report ($0.007).",
            "default": "list"
          },
          "date": {
            "title": "Anchor date",
            "pattern": "^(\\d{4})-(0[1-9]|1[0-2])-(0[1-9]|[12]\\d|3[01])$",
            "type": "string",
            "description": "Which day to list. Leave empty for today. Offsets below are relative to this date."
          },
          "dayOffsets": {
            "title": "Include nearby days",
            "type": "array",
            "description": "Also fetch the days before/after the anchor date. Default: today only.",
            "items": {
              "type": "string",
              "enum": [
                "-3",
                "-2",
                "-1",
                "0",
                "1",
                "2",
                "3"
              ],
              "enumTitles": [
                "3 days before",
                "2 days before",
                "1 day before",
                "The anchor day itself (default: today)",
                "1 day after",
                "2 days after",
                "3 days after"
              ]
            }
          },
          "matchStatuses": {
            "title": "Match statuses",
            "type": "array",
            "description": "Only return matches in these states. Leave empty for all.",
            "items": {
              "type": "string",
              "enum": [
                "finished",
                "live",
                "scheduled"
              ],
              "enumTitles": [
                "Finished",
                "Live",
                "Scheduled"
              ]
            }
          },
          "tours": {
            "title": "Tours",
            "type": "array",
            "description": "Restrict to specific circuits. Empty = all tours active that day.",
            "items": {
              "type": "string",
              "enum": [
                "atp",
                "wta",
                "challenger",
                "itf"
              ],
              "enumTitles": [
                "ATP (men)",
                "WTA (women)",
                "Challenger",
                "ITF"
              ]
            }
          },
          "tournaments": {
            "title": "Tournament name contains",
            "type": "array",
            "description": "Free-text filter on the tournament/event name (case-insensitive). Example: US Open, Wimbledon.",
            "items": {
              "type": "string"
            }
          },
          "maxMatches": {
            "title": "Max matches",
            "minimum": 1,
            "maximum": 2000,
            "type": "integer",
            "description": "Upper limit on the number of matches returned. The list itself is always parsed fully; this caps the output.",
            "default": 500
          },
          "enrich": {
            "title": "Enrich every match ($0.007/match)",
            "type": "boolean",
            "description": "Visit each match page and merge rankings, stats, venue, round, each player's last 20 matches, head-to-head, odds and point-by-point (~10 s/match extra). Billed as match-intel per enriched match.",
            "default": false
          },
          "matchId": {
            "title": "Match ID",
            "pattern": "^[A-Za-z0-9]{8}$",
            "type": "string",
            "description": "8-character match id from a mode=list run (field match_id). Billed once as match-intel ($0.007)."
          },
          "matchUrl": {
            "title": "…or paste the match URL",
            "pattern": "^https?://.*flashscore\\.com/match/.*$",
            "type": "string",
            "description": "Full Flashscore match URL as an alternative to the match id (https://www.flashscore.com/match/tennis/<id>/)."
          },
          "surfaces": {
            "title": "Form by surface",
            "type": "boolean",
            "description": "mode=match only: also capture each player's last matches filtered by CLAY, GRASS and HARD (adds ~30 s on the match page).",
            "default": false
          },
          "pageUrl": {
            "title": "Custom section URL",
            "pattern": "^https?://.*flashscore\\.com/.*$",
            "type": "string",
            "description": "mode=list only: override the section to scrape (default: https://www.flashscore.com/tennis/). Rarely needed."
          }
        }
      },
      "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
                  }
                }
              },
              "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}