{
  "openapi": "3.0.1",
  "info": {
    "title": "Tennis Scraper — Matches, Point-by-Point, Odds, Rankings",
    "description": "Flashscore tennis (global, flashscore.com): matches, live and final scores, set and tiebreak scores, point-by-point, match statistics, odds, head-to-head and ATP/WTA singles rankings. By day, tour, tournament or match ID; new-matches-only mode. Pay per result, no login, 20 free previews.",
    "version": "0.1",
    "x-build-id": "Awqs4agQWImczMPQO"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/architekture~tennis-data-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-architekture-tennis-data-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/architekture~tennis-data-scraper/runs": {
      "post": {
        "operationId": "runs-sync-architekture-tennis-data-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/architekture~tennis-data-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-architekture-tennis-data-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",
        "required": [
          "mode",
          "billingMode"
        ],
        "properties": {
          "mode": {
            "title": "Operation",
            "enum": [
              "matches",
              "matchDetails",
              "rankings"
            ],
            "type": "string",
            "description": "One actor for match lists, match enrichment and singles rankings.",
            "default": "matches"
          },
          "billingMode": {
            "title": "Preview or paid",
            "enum": [
              "preview",
              "paid"
            ],
            "type": "string",
            "description": "Preview: 20 lifetime attempts per account, one page and at most 10 basic match rows. Paid uses the published event prices. No automatic paid fallback.",
            "default": "preview"
          },
          "maxItems": {
            "title": "Maximum delivered rows",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Data rows per run; unchanged incremental rows and free status rows do not consume this limit.",
            "default": 100
          },
          "dayOffsets": {
            "title": "Days relative to UTC today",
            "maxItems": 15,
            "type": "array",
            "description": "Match lists only. Integers -7 to +7; resumed collections keep their original date anchor. Choose offsets OR dateFrom/dateTo.",
            "items": {
              "type": "integer",
              "minimum": -7,
              "maximum": 7
            }
          },
          "dateFrom": {
            "title": "First date",
            "type": "string",
            "description": "Optional YYYY-MM-DD, within seven days of UTC today. Do not combine with dayOffsets."
          },
          "dateTo": {
            "title": "Last date",
            "type": "string",
            "description": "Optional YYYY-MM-DD, within seven days of UTC today. Do not combine with dayOffsets."
          },
          "tours": {
            "title": "Tour filters",
            "maxItems": 5,
            "type": "array",
            "description": "Match lists only. OR matching: ATP, WTA, Challenger, ITF, Doubles. Empty means all.",
            "items": {
              "type": "string"
            }
          },
          "live": {
            "title": "Live matches only",
            "type": "boolean",
            "description": "Match lists only. Source general state must identify an in-progress match.",
            "default": false
          },
          "tournamentIds": {
            "title": "Tournament IDs",
            "maxItems": 30,
            "type": "array",
            "description": "Match lists only; source tournament IDs, not names.",
            "items": {
              "type": "string"
            }
          },
          "matchIds": {
            "title": "Match IDs",
            "maxItems": 100,
            "type": "array",
            "description": "Detail mode; eight-character Flashscore match IDs, at most 100.",
            "items": {
              "type": "string"
            }
          },
          "matchUrls": {
            "title": "Match URLs",
            "maxItems": 100,
            "type": "array",
            "description": "Detail mode; Flashscore tennis URLs, including URLs with a mid query parameter.",
            "items": {
              "type": "string"
            }
          },
          "tour": {
            "title": "Ranking tour",
            "enum": [
              "ATP",
              "WTA"
            ],
            "type": "string",
            "description": "ATP or WTA singles rankings. Doubles deferred.",
            "default": "ATP"
          },
          "topN": {
            "title": "Ranking rows",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Maximum 100 per tour in v1.",
            "default": 100
          },
          "statistics": {
            "title": "Statistics",
            "type": "boolean",
            "description": "Requested detail section. Missing source data is reported explicitly; failed retrieval prevents a paid detail row.",
            "default": true
          },
          "pointByPoint": {
            "title": "Point history",
            "type": "boolean",
            "description": "Requested detail section. Missing source data is reported explicitly; failed retrieval prevents a paid detail row.",
            "default": true
          },
          "odds": {
            "title": "Odds",
            "type": "boolean",
            "description": "Requested detail section. Missing source data is reported explicitly; failed retrieval prevents a paid detail row.",
            "default": true
          },
          "h2h": {
            "title": "Head-to-head history",
            "type": "boolean",
            "description": "Requested detail section. Missing source data is reported explicitly; failed retrieval prevents a paid detail row.",
            "default": true
          },
          "incrementalMode": {
            "title": "Deliver new IDs only",
            "type": "boolean",
            "description": "Retains a baseline under stateKey across completed runs. No schedules are created.",
            "default": false
          },
          "emitChanges": {
            "title": "Also deliver changed snapshots",
            "type": "boolean",
            "description": "Requires incrementalMode. Changed rows are additional paid results. Off preserves new-ID-only behaviour.",
            "default": false
          },
          "stateKey": {
            "title": "Saved state key",
            "maxLength": 80,
            "type": "string",
            "description": "Required for incrementalMode or continuation. Use a unique key per set of filters. Letters, digits, hyphens and underscores; maximum 80."
          },
          "continuePreviousRun": {
            "title": "Resume saved collection",
            "type": "boolean",
            "description": "Resume an incomplete checkpoint in a fresh run with the same stateKey and inputs. Already delivered rows are skipped.",
            "default": false
          },
          "proxyConfiguration": {
            "title": "Optional proxy",
            "type": "object",
            "description": "No proxy by default. Optional buyer proxy configuration; proxy use has not been included in the measured default costs."
          },
          "feedback": {
            "title": "Feedback for Architekture",
            "maxLength": 2000,
            "type": "string",
            "description": "Optional feedback logged with this run. Does not change collection or output. Do not include secrets."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}