{
  "openapi": "3.0.1",
  "info": {
    "title": "Tennis Data Scraper (SofaScore + Tennis Abstract)",
    "description": "Tennis Data Scraper (SofaScore + Tennis Abstract) SD - Tennis Data Scraper (SofaScore + Tennis Abstract) is a sports data tool that extracts live scores, schedules, point-by-point, match stats, odds, ATP/WTA rankings, Elo ratings and full player match histories.",
    "version": "1.0",
    "x-build-id": "tTl6S1a5uhSMgEU1x"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/neuro-scraper~tennis-data-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-neuro-scraper-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/neuro-scraper~tennis-data-scraper/runs": {
      "post": {
        "operationId": "runs-sync-neuro-scraper-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/neuro-scraper~tennis-data-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-neuro-scraper-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",
        "properties": {
          "mode": {
            "title": "Mode",
            "enum": [
              "schedule",
              "liveMatches",
              "playerMatches",
              "playerMatchHistory",
              "playerDetails",
              "pointByPoint",
              "tournaments",
              "tournamentSeasons",
              "tournamentMatches",
              "tournamentDetails",
              "rankings",
              "eloRatings",
              "search"
            ],
            "type": "string",
            "description": "What to get. schedule = every match on the chosen days (upcoming, live and played); liveMatches = matches on court now; playerMatches = a player's matches, newest first (SofaScore); playerMatchHistory = an ATP player's whole career with serve and return stats per match (Tennis Abstract; its women's match lists sit in files its robots.txt disallows, so use playerMatches for WTA players); playerDetails = profile, ranking, Elo, seasons, titles, head-to-heads (SofaScore + Tennis Abstract); pointByPoint = one row per match with every point, statistics and sets; tournaments = tournaments on a day; tournamentSeasons / tournamentMatches / tournamentDetails = a tournament's seasons, matches or champions and draw; rankings = official ATP / WTA ranking; eloRatings = Tennis Abstract Elo table; search = find player and tournament ids by name.",
            "default": "schedule"
          },
          "dates": {
            "title": "Days (schedule, tournaments)",
            "type": "array",
            "description": "Days as YYYY-MM-DD in UTC, e.g. 2026-10-08. Empty = today (UTC). Days back / Days ahead widen every day listed here.",
            "items": {
              "type": "string"
            }
          },
          "daysBack": {
            "title": "Days back",
            "minimum": 0,
            "maximum": 14,
            "type": "integer",
            "description": "Also include this many days before each day (0-14). 1 = yesterday's results as well.",
            "default": 0
          },
          "days": {
            "title": "Days ahead",
            "minimum": 0,
            "maximum": 14,
            "type": "integer",
            "description": "Also include this many days after each day (0-14). 6 = a whole tournament week.",
            "default": 0
          },
          "status": {
            "title": "Keep only (match status)",
            "enum": [
              "any",
              "upcoming",
              "live",
              "finished",
              "notPlayed"
            ],
            "type": "string",
            "description": "Filter match rows by state. Played includes retirements and walkovers; Not played = cancelled, postponed, interrupted.",
            "default": "any"
          },
          "matchType": {
            "title": "Match types",
            "type": "array",
            "description": "Keep only these formats. Empty = all.",
            "items": {
              "type": "string",
              "enum": [
                "singles",
                "doubles",
                "mixedDoubles"
              ],
              "enumTitles": [
                "Singles",
                "Doubles",
                "Mixed doubles"
              ]
            },
            "default": []
          },
          "gender": {
            "title": "Genders",
            "type": "array",
            "description": "Keep only men's, women's or mixed matches. Empty = all.",
            "items": {
              "type": "string",
              "enum": [
                "male",
                "female",
                "mixed"
              ],
              "enumTitles": [
                "Men",
                "Women",
                "Mixed"
              ]
            },
            "default": []
          },
          "tournamentLevel": {
            "title": "Tournament levels",
            "type": "array",
            "description": "Keep only these levels (read from each tournament's tour and ranking points). Empty = all.",
            "items": {
              "type": "string",
              "enum": [
                "grandSlam",
                "atp1000",
                "atp500",
                "atp250",
                "wta1000",
                "wta500",
                "wta250",
                "wta125",
                "challenger",
                "itf",
                "davisCup",
                "others"
              ],
              "enumTitles": [
                "Grand Slam",
                "ATP 1000",
                "ATP 500",
                "ATP 250",
                "WTA 1000",
                "WTA 500",
                "WTA 250",
                "WTA 125",
                "Challenger",
                "ITF",
                "Davis Cup / Billie Jean King Cup",
                "Others"
              ]
            },
            "default": []
          },
          "tournaments": {
            "title": "Only these tournaments",
            "type": "array",
            "description": "Keep only matches whose tournament or tour name contains one of these (not case-sensitive), e.g. Shanghai, Wimbledon, Challenger.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "players": {
            "title": "Only these players",
            "type": "array",
            "description": "Keep only matches where a player's name contains one of these (not case-sensitive), e.g. Sinner. A surname is enough.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "playerIds": {
            "title": "Player ids or links (SofaScore)",
            "type": "array",
            "description": "SofaScore player ids or links, e.g. 206570 or https://www.sofascore.com/tennis/player/sinner-jannik/206570. Used by playerMatches, playerDetails and playerMatchHistory. Find ids with the search mode.",
            "items": {
              "type": "string"
            }
          },
          "playerNames": {
            "title": "Player names or Tennis Abstract slugs",
            "type": "array",
            "description": "Names (Jannik Sinner), Tennis Abstract slugs (JannikSinner) or Tennis Abstract player links. Used by playerMatchHistory, playerDetails and playerMatches (names are looked up on SofaScore).",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "matchIds": {
            "title": "Match ids or links (pointByPoint)",
            "type": "array",
            "description": "SofaScore match ids or links with #id:, e.g. 16385361 or https://www.sofascore.com/tennis/match/jannik-sinner-alexander-zverev/xyz#id:16385361. The matchId column of every match mode holds them.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "tournamentIds": {
            "title": "Tournament ids or links",
            "type": "array",
            "description": "SofaScore unique-tournament ids or links, e.g. 2361 (Wimbledon men) or https://www.sofascore.com/tournament/tennis/atp/wimbledon/2361. Used by tournamentSeasons, tournamentMatches and tournamentDetails.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "seasonId": {
            "title": "Season id",
            "minimum": 1,
            "type": "integer",
            "description": "Optional SofaScore season id (from tournamentSeasons). Empty = the newest season of each tournament."
          },
          "query": {
            "title": "Name to search (search mode)",
            "type": "string",
            "description": "Player or tournament name, e.g. Alcaraz or Roland Garros. Returns the ids to paste into the fields above.",
            "default": ""
          },
          "rankingTour": {
            "title": "Tour (rankings, eloRatings)",
            "enum": [
              "both",
              "atp",
              "wta"
            ],
            "type": "string",
            "description": "Which list to read.",
            "default": "both"
          },
          "rankingTop": {
            "title": "Ranking rows per tour",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "How many players from the top of each list (SofaScore publishes 500, Tennis Abstract Elo about 550).",
            "default": 100
          },
          "newestFirst": {
            "title": "Most recent first (playerMatchHistory)",
            "type": "boolean",
            "description": "Start the Tennis Abstract career list from the latest match (on) or from the first match of the career (off).",
            "default": true
          },
          "includeStatistics": {
            "title": "Add match statistics",
            "type": "boolean",
            "description": "Aces, double faults, first and second serve, break points, points and games won - whole match and per set. One extra request per started match.",
            "default": false
          },
          "includePointByPoint": {
            "title": "Add point by point",
            "type": "boolean",
            "description": "Every game of every set with server, game winner and point sequence. One extra request per started match. Always on in pointByPoint mode.",
            "default": false
          },
          "includeOdds": {
            "title": "Add betting odds",
            "type": "boolean",
            "description": "Match-winner odds (fractional and decimal, opening and current) from the bookmaker SofaScore shows for the odds country. One extra request per match.",
            "default": false
          },
          "includeHeadToHead": {
            "title": "Add head-to-head",
            "type": "boolean",
            "description": "SofaScore's head-to-head record of the two players (wins each). It covers recent meetings only: Sinner v Zverev showed 10-0 where the full career is 11-4 (measured 2026-10-09); full-career head-to-heads are in playerDetails. One extra request per match.",
            "default": false
          },
          "oddsCountry": {
            "title": "Odds country",
            "type": "string",
            "description": "Two-letter country code whose bookmaker SofaScore uses for odds, e.g. US, GB, DE.",
            "default": "US"
          },
          "maxMatches": {
            "title": "Maximum rows per run",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "Cap on all rows of the run in every mode (matches, players, rankings ...). The main control over what a run costs.",
            "default": 50
          },
          "maxMatchesPerPlayer": {
            "title": "Matches per player",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "playerMatches: matches per player, followed page by page (30 per SofaScore page). playerMatchHistory: career rows per player. playerDetails: length of recentResults.",
            "default": 30
          },
          "maxMatchesPerTournament": {
            "title": "Matches per tournament",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "tournamentMatches and tournamentDetails: matches per tournament season, followed page by page (played matches first, then upcoming).",
            "default": 100
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Residential proxy is the default; SofaScore's edge rejects non-browser clients and has blocked datacenter IPs in public reports.",
            "default": {
              "useApifyProxy": true,
              "apifyProxyGroups": [
                "RESIDENTIAL"
              ]
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}