{
  "openapi": "3.0.1",
  "info": {
    "title": "Tennis Point-by-Point & Odds Timeline",
    "description": "Point-level tennis match data (every point, server, break/set/match points) plus timestamped bookmaker odds snapshots for ATP, WTA, Challenger and ITF matches. Data tool for analytics and research - not a results scraper.",
    "version": "0.1",
    "x-build-id": "VmltrWEHSXxiZi5GR"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/humin93~flashscore-tennis-pbp/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-humin93-flashscore-tennis-pbp",
        "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/humin93~flashscore-tennis-pbp/runs": {
      "post": {
        "operationId": "runs-sync-humin93-flashscore-tennis-pbp",
        "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/humin93~flashscore-tennis-pbp/run-sync": {
      "post": {
        "operationId": "run-sync-humin93-flashscore-tennis-pbp",
        "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": [
              "point_by_point",
              "odds_snapshot",
              "both"
            ],
            "type": "string",
            "description": "What to collect per match. <b>point_by_point</b>: full set/game/point sequences (server, score progression, break/set/match points). <b>odds_snapshot</b>: timestamped snapshot of all bookmakers' pre-match odds (current + opening values) - schedule repeated runs to build an odds movement timeline. <b>both</b>: one record per match with both sections.",
            "default": "both"
          },
          "matchIds": {
            "title": "Match IDs",
            "type": "array",
            "description": "Specific Flashscore match IDs (the 8-character code in match URLs, e.g. <code>.../match/tennis/.../?mid=xYnEsNM6</code> → <code>xYnEsNM6</code>). When provided, day discovery is skipped and metadata (tournament, round, rankings) is read from each match page.",
            "items": {
              "type": "string"
            }
          },
          "dayOffset": {
            "title": "Day offset (auto-discovery)",
            "minimum": -7,
            "maximum": 7,
            "type": "integer",
            "description": "Used when no match IDs are given: collect matches from this day. <code>0</code> = today, <code>-1</code> = yesterday, <code>1</code> = tomorrow. Range -7 to 7.",
            "default": 0
          },
          "tours": {
            "title": "Tour filter (auto-discovery)",
            "type": "array",
            "description": "Which tennis tours to include when auto-discovering matches.",
            "items": {
              "type": "string",
              "enum": [
                "atp",
                "wta",
                "challenger",
                "itf",
                "other"
              ],
              "enumTitles": [
                "ATP",
                "WTA",
                "Challenger",
                "ITF",
                "Other (exhibitions, UTS, ...)"
              ]
            },
            "default": [
              "atp",
              "wta",
              "challenger"
            ]
          },
          "includeDoubles": {
            "title": "Include doubles",
            "type": "boolean",
            "description": "Include doubles matches in auto-discovery (point-by-point coverage is rarer for doubles).",
            "default": false
          },
          "statusFilter": {
            "title": "Match status filter (auto-discovery)",
            "enum": [
              "all",
              "finished",
              "live",
              "scheduled"
            ],
            "type": "string",
            "description": "Only process matches in this state. <b>finished</b> gives complete point-by-point data; <b>live</b>/<b>scheduled</b> are most useful for odds snapshots.",
            "default": "all"
          },
          "maxMatches": {
            "title": "Max matches",
            "minimum": 1,
            "maximum": 200,
            "type": "integer",
            "description": "Maximum number of matches to process in this run.",
            "default": 20
          },
          "geoIpCode": {
            "title": "Odds region: country code",
            "type": "string",
            "description": "The odds endpoint requires a region and returns that region's bookmaker portfolio (this mirrors what the website sends). Default <code>US</code>.",
            "default": "US"
          },
          "geoIpSubdivisionCode": {
            "title": "Odds region: subdivision code",
            "type": "string",
            "description": "Region subdivision code accompanying the country code, e.g. <code>USNY</code> for US / New York.",
            "default": "USNY"
          },
          "requestDelayMs": {
            "title": "Delay between requests (ms)",
            "minimum": 250,
            "maximum": 10000,
            "type": "integer",
            "description": "Polite delay between consecutive HTTP requests (plus random jitter). Keep at 500ms or higher.",
            "default": 600
          },
          "maxRetries": {
            "title": "Max retries per request",
            "minimum": 0,
            "maximum": 8,
            "type": "integer",
            "description": "Retries with exponential backoff on 429/5xx/network errors. 403 responses are never retried or bypassed.",
            "default": 3
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}