{
  "openapi": "3.0.1",
  "info": {
    "title": "Tennis Scraper - Matches, Live Scores, Results, H2H & Rankings",
    "description": "ATP, WTA, Challenger and ITF tennis data with no login: schedule, live scores with the server and game points, results with set-by-set scores, serve and return statistics, point by point, head-to-head records and ATP or WTA rankings. One row per match. From $0.005/run + $0.002/match.",
    "version": "0.1",
    "x-build-id": "mJP3n8aDgv0DDNkJW"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/orbots~tennis-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-orbots-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/orbots~tennis-scraper/runs": {
      "post": {
        "operationId": "runs-sync-orbots-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/orbots~tennis-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-orbots-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": "What to collect",
            "enum": [
              "schedule",
              "live",
              "results",
              "all",
              "match",
              "h2h",
              "rankings"
            ],
            "type": "string",
            "description": "Schedule = matches not finished yet (upcoming and in play). Live = matches in play right now, with the current set, game and server. Results = finished matches with set-by-set scores. All = every match of the day whatever its status. Match = statistics and point by point of the match IDs in \"matchIds\". H2H = head-to-head record of the player pairs in \"pairs\". Rankings = the ATP or WTA ranking.",
            "default": "schedule"
          },
          "dateFrom": {
            "title": "From date",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
            "type": "string",
            "description": "First day to collect, YYYY-MM-DD, UTC. Leave empty for today. The schedule covers what is already scheduled (today and, once the order of play is out, tomorrow); results cover the last 7 days from Flashscore and any older date (back to the 1990s) from TennisExplorer."
          },
          "dateTo": {
            "title": "To date",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
            "type": "string",
            "description": "Last day to collect, inclusive. Leave empty for a single day. At most 31 days per run."
          },
          "tours": {
            "title": "Tours",
            "type": "array",
            "description": "Keep only these tours. Teams = Davis Cup, Billie Jean King Cup and similar. Leave empty for all of them (ITF alone is often half of a day).",
            "items": {
              "type": "string",
              "enum": [
                "ATP",
                "WTA",
                "Challenger",
                "ITF",
                "Teams"
              ],
              "enumTitles": [
                "ATP",
                "WTA",
                "Challenger (men and women)",
                "ITF (men and women)",
                "Teams (Davis Cup, BJK Cup, Laver Cup)"
              ]
            },
            "default": [
              "ATP",
              "WTA",
              "Challenger",
              "Teams"
            ]
          },
          "matchType": {
            "title": "Singles or doubles",
            "enum": [
              "singles",
              "doubles",
              "all"
            ],
            "type": "string",
            "description": "Singles only, doubles only, or both.",
            "default": "singles"
          },
          "tournament": {
            "title": "Tournament filter",
            "type": "string",
            "description": "Keep only tournaments whose name contains this text (case-insensitive), for example \"US Open\" or \"Chengdu\"."
          },
          "players": {
            "title": "Player filter",
            "type": "array",
            "description": "Keep only matches where one of these names appears (case-insensitive, partial match), for example \"Alcaraz\". One name per line.",
            "items": {
              "type": "string"
            }
          },
          "maxMatches": {
            "title": "Max matches",
            "minimum": 1,
            "type": "integer",
            "description": "Hard cap on match rows per run. The Actor stops at exactly this number and never charges beyond it. Leave empty for no cap.",
            "default": 500
          },
          "includeDetails": {
            "title": "Include statistics and point by point",
            "type": "boolean",
            "description": "For every match row from Flashscore: serve and return statistics per set, the full point-by-point log of every game (server, break points, winner) and set durations. Three extra requests per match, charged as a match-detail event. Match mode always includes them.",
            "default": false
          },
          "includeH2h": {
            "title": "Include head-to-head on every match",
            "type": "boolean",
            "description": "For every match row from Flashscore: the last matches of both players and every previous meeting between them. One extra request per match, charged as an h2h event.",
            "default": false
          },
          "matchIds": {
            "title": "Match IDs or URLs (match mode)",
            "type": "array",
            "description": "Flashscore match IDs (the match_id of any row this Actor delivered, such as M3TdTTy8) or Flashscore match URLs. One per line.",
            "items": {
              "type": "string"
            }
          },
          "pairs": {
            "title": "Player pairs (H2H mode)",
            "type": "array",
            "description": "One pair per line, written as \"Alcaraz vs Sinner\" or \"Swiatek - Sabalenka\". Names are looked up on TennisExplorer; use the surname plus the first name when a surname is shared.",
            "items": {
              "type": "string"
            }
          },
          "rankingTour": {
            "title": "Ranking (rankings mode)",
            "enum": [
              "atp",
              "wta",
              "both"
            ],
            "type": "string",
            "description": "ATP (men) or WTA (women) singles ranking, or both.",
            "default": "atp"
          },
          "rankingTop": {
            "title": "Ranking depth (rankings mode)",
            "minimum": 1,
            "maximum": 2000,
            "type": "integer",
            "description": "How many players to return from the top, up to 2000.",
            "default": 100
          },
          "rankingDate": {
            "title": "Ranking date (rankings mode)",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
            "type": "string",
            "description": "A past ranking edition, YYYY-MM-DD (editions are published on Mondays). Leave empty for the current ranking."
          },
          "onlyNew": {
            "title": "Only matches that are new or changed since earlier runs",
            "type": "boolean",
            "description": "Built for schedules. The Actor remembers the status and score it delivered for each match and returns only matches that are new or changed (started, score moved, finished), so a run every hour reports what happened instead of repeating the whole day and charging for it again. History is kept for 30 days in your own account.",
            "default": false
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Not required: both sources answer Apify servers directly. Enable a proxy only if your runs start getting throttled.",
            "default": {
              "useApifyProxy": 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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}