{
  "openapi": "3.0.1",
  "info": {
    "title": "Tennis Scraper — Flashscore, SofaScore & TennisExplorer",
    "description": "Scrape tennis fixtures, results, per-bookmaker odds history, match statistics, player profiles, head-to-head records and ATP/WTA rankings from Flashscore, SofaScore and TennisExplorer.",
    "version": "1.0",
    "x-build-id": "dZIK9jPrKVFGQDeog"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/seemuapps~flashscore-sofascore-tennis-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-seemuapps-flashscore-sofascore-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/seemuapps~flashscore-sofascore-tennis-scraper/runs": {
      "post": {
        "operationId": "runs-sync-seemuapps-flashscore-sofascore-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/seemuapps~flashscore-sofascore-tennis-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-seemuapps-flashscore-sofascore-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": {
          "source": {
            "title": "Data source",
            "enum": [
              "tennisexplorer",
              "flashscore",
              "sofascore",
              "all"
            ],
            "type": "string",
            "description": "Which site to read. TennisExplorer: fixtures, results, per-bookmaker odds history, player profiles, head-to-head, rankings, player search — no proxy needed. Flashscore: one request per day of fixtures/results (±7 days) with surfaces and set scores — no proxy needed. SofaScore: live matches, match statistics, point-by-point, odds, player profiles and rankings — uses a residential proxy automatically because its API blocks datacenter IPs. \"All sources\" runs every source that supports the chosen mode and splits the row budget evenly.",
            "default": "tennisexplorer"
          },
          "mode": {
            "title": "Mode",
            "enum": [
              "fixtures",
              "results",
              "matchDetails",
              "players",
              "h2h",
              "rankings",
              "searchPlayers"
            ],
            "type": "string",
            "description": "fixtures = upcoming matches with odds (today by default; SofaScore returns its live feed), results = finished matches with scores and closing odds (yesterday by default), matchDetails = deep per-match records (TennisExplorer: per-bookmaker odds history; SofaScore: statistics, point-by-point, odds), players = player profiles, h2h = head-to-head records (TennisExplorer), rankings = ATP/WTA tables, searchPlayers = find players and their slugs/ids by name.",
            "default": "fixtures"
          },
          "startUrls": {
            "title": "TennisExplorer URLs (optional — overrides Mode)",
            "type": "array",
            "description": "Any tennisexplorer.com URLs: /matches/, /next/, /results/, /match-detail/?id=…, /player/{slug}/, /mutual/{a}/{b}/, /ranking/… or /list-players/…. Each URL is auto-classified and routed to the right parser. Leave empty to use Mode instead.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "tourType": {
            "title": "Tour / discipline",
            "enum": [
              "all",
              "atp-single",
              "wta-single",
              "atp-double",
              "wta-double"
            ],
            "type": "string",
            "description": "Which tournaments to include: both tours, or a single tour, singles or doubles.",
            "default": "all"
          },
          "dateFrom": {
            "title": "Date from (YYYY-MM-DD)",
            "type": "string",
            "description": "First day to scrape. Defaults: fixtures = today, results = yesterday. Fixtures for past dates are served from the results pages. Flashscore covers today ±7 days."
          },
          "dateTo": {
            "title": "Date to (YYYY-MM-DD)",
            "type": "string",
            "description": "Last day, inclusive. Defaults to Date from (a single day). Ranges are capped at 62 days per run."
          },
          "matchIds": {
            "title": "Match IDs",
            "type": "array",
            "description": "TennisExplorer numeric match ids (e.g. 3290771) or /match-detail/?id=… URLs — take them from the matchId field of fixtures/results rows. With source = SofaScore, pass SofaScore event ids instead.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "includeOddsHistory": {
            "title": "Include odds history (line movement)",
            "type": "boolean",
            "description": "Keep the full per-bookmaker odds movement — every price change with timestamp plus the opening price — on match-detail rows, across Home/Away, Over/Under, Asian Handicap and Correct Score. Turn off for lighter rows with current + opening odds only.",
            "default": true
          },
          "includeRecentForm": {
            "title": "Include recent form",
            "type": "boolean",
            "description": "Keep each player's recent-matches block on match-detail rows.",
            "default": true
          },
          "playerSlugs": {
            "title": "Player slugs or URLs",
            "type": "array",
            "description": "For the players mode: TennisExplorer slugs like djokovic or full /player/… URLs (find slugs with the searchPlayers mode). With source = SofaScore, pass SofaScore team ids, slugs like alcaraz-carlos, or player names.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "h2hPairs": {
            "title": "Head-to-head pairs",
            "type": "array",
            "description": "For the h2h mode. One pair per line: djokovic vs alcaraz-5ab70, djokovic, alcaraz-5ab70 or a full /mutual/…/…/ URL.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "searchQuery": {
            "title": "Player search query",
            "type": "string",
            "description": "For the searchPlayers mode: part of a player's name, case-insensitive (e.g. alcaraz). Returns matching players with their slugs/ids and current rank."
          },
          "rankingTour": {
            "title": "Ranking table",
            "enum": [
              "atp-men",
              "wta-women"
            ],
            "type": "string",
            "description": "Which ranking to walk in rankings mode.",
            "default": "atp-men"
          },
          "rankingDate": {
            "title": "Ranking snapshot date (YYYY-MM-DD)",
            "type": "string",
            "description": "Historical weekly snapshot to read (Mondays), TennisExplorer only. Leave empty for the latest ranking."
          },
          "maxItems": {
            "title": "Maximum results",
            "minimum": 1,
            "type": "integer",
            "description": "Global cap on dataset rows for the run. You are billed per row, so this is your spend guard.",
            "default": 200
          },
          "maxConcurrency": {
            "title": "Max concurrency",
            "minimum": 1,
            "maximum": 50,
            "type": "integer",
            "description": "Parallel page fetches. 10 is a good default; raise it for large matchDetails batches.",
            "default": 10
          },
          "proxy": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "TennisExplorer and Flashscore are served fine over a direct connection, so no proxy is used for them unless you configure one here. SofaScore always goes through a residential proxy (yours if configured, otherwise Apify residential)."
          },
          "sofaMaxTournaments": {
            "title": "SofaScore: max tournaments per day",
            "minimum": 1,
            "maximum": 200,
            "type": "integer",
            "description": "Reserved for SofaScore day fan-out. Currently SofaScore fixtures return the live feed in a single request, so this setting has no effect.",
            "default": 20
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}