{
  "openapi": "3.0.1",
  "info": {
    "title": "Tennis Scraper API",
    "description": "Tennis match data from Flashscore. Type a tournament or player name, paste a link, or collect by day. Scores with tiebreaks, statistics with counts, set durations, point-by-point, form and head-to-head. From $1 per 1,000 matches.",
    "version": "0.1",
    "x-build-id": "Ed4b8C80zVI5HfMKm"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/cleanscrape~tennis-match-data/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-cleanscrape-tennis-match-data",
        "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/cleanscrape~tennis-match-data/runs": {
      "post": {
        "operationId": "runs-sync-cleanscrape-tennis-match-data",
        "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/cleanscrape~tennis-match-data/run-sync": {
      "post": {
        "operationId": "run-sync-cleanscrape-tennis-match-data",
        "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": {
          "targets": {
            "title": "Tournaments, players or matches",
            "type": "array",
            "description": "Type a name or paste a Flashscore link, one per line. For example: Wimbledon 2025, Sinner, Swiatek 2026, US Open women, or a match link. Leave the list empty to collect matches by day instead.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "dayRange": {
            "title": "Days (when the list above is empty)",
            "enum": [
              "yesterday",
              "today",
              "tomorrow",
              "last-3-days",
              "last-7-days",
              "next-3-days",
              "next-7-days",
              "custom"
            ],
            "type": "string",
            "description": "All matches Flashscore lists for these days (UTC), from 7 days back to 7 days ahead.",
            "default": "yesterday"
          },
          "maxResults": {
            "title": "Maximum matches",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Total for the run, shared evenly across the lines in your list. Start small to check the output. Fewer matches may be available.",
            "default": 50
          },
          "tours": {
            "title": "Tours",
            "type": "array",
            "description": "Used for days, and to choose the draws when you type a tournament name (Wimbledon gives the ATP and WTA singles). A pasted tournament link or a player is not limited by tour.",
            "items": {
              "type": "string",
              "enum": [
                "atp",
                "wta",
                "challenger-men",
                "challenger-women",
                "itf-men",
                "itf-women",
                "juniors",
                "team-events",
                "exhibition",
                "other"
              ],
              "enumTitles": [
                "ATP",
                "WTA",
                "Challenger (men)",
                "Challenger (women)",
                "ITF (men)",
                "ITF (women)",
                "Juniors",
                "Team events (Davis Cup, BJK Cup, United Cup)",
                "Exhibitions",
                "Other"
              ]
            },
            "default": [
              "atp",
              "wta"
            ]
          },
          "matchType": {
            "title": "Match type",
            "enum": [
              "singles",
              "doubles",
              "singles-and-doubles"
            ],
            "type": "string",
            "description": "Used for days, players and tournament names. Typing \"doubles\" with a tournament name also works.",
            "default": "singles"
          },
          "statuses": {
            "title": "Match status",
            "type": "array",
            "description": "Match links are always returned. Each saved match shows its exact status.",
            "items": {
              "type": "string",
              "enum": [
                "finished",
                "scheduled",
                "live"
              ],
              "enumTitles": [
                "Finished (includes retirements, walkovers and cancellations)",
                "Scheduled",
                "Live"
              ]
            },
            "default": [
              "finished"
            ]
          },
          "startDate": {
            "title": "Custom start date",
            "type": "string",
            "description": "With Days set to Custom dates. Within the last 7 days or the next 7 days (UTC)."
          },
          "endDate": {
            "title": "Custom end date",
            "type": "string",
            "description": "Optional. Defaults to the start date."
          },
          "seasons": {
            "title": "Editions per tournament",
            "minimum": 1,
            "maximum": 40,
            "type": "integer",
            "description": "For a tournament without a year: 1 is the latest edition, 5 adds the four before it. With a year (Wimbledon 2024) only that edition is collected.",
            "default": 1
          },
          "includeQualifying": {
            "title": "Include qualifying",
            "type": "boolean",
            "description": "Qualifying matches are marked in the Qualifying and Round columns.",
            "default": true
          },
          "since": {
            "title": "Player matches since",
            "type": "string",
            "description": "For players. Only matches on or after this date. A year after the name (Sinner 2025) also works. Without either, the newest matches come first until Maximum matches is reached."
          },
          "statistics": {
            "title": "Match statistics",
            "type": "boolean",
            "description": "Aces, double faults, serve and return points with counts, break points and games; for bigger events also winners, unforced errors, net points, serve speed and distance. Per match and per set.",
            "default": true
          },
          "setDetails": {
            "title": "Set durations and umpire",
            "type": "boolean",
            "description": "Duration of each set and the match, tiebreak points and the chair umpire.",
            "default": true
          },
          "pointByPoint": {
            "title": "Point-by-point",
            "type": "boolean",
            "description": "Every game with server and hold or break, and each point with break, set and match points marked. Best exported as JSON.",
            "default": false
          },
          "formAndH2H": {
            "title": "Form and head-to-head",
            "type": "boolean",
            "description": "Head-to-head record and each player's latest matches, overall and on this surface. Most useful before a match.",
            "default": false
          },
          "formMatches": {
            "title": "Form matches per player",
            "minimum": 1,
            "maximum": 50,
            "type": "integer",
            "description": "How many recent matches to include for each player when Form and head-to-head is on.",
            "default": 10
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}