{
  "openapi": "3.0.1",
  "info": {
    "title": "Sofascore Tennis Scraper — ATP & WTA Set Scores",
    "description": "Scrape ATP, WTA, Challenger and ITF tennis from Sofascore. Every match returns the set-by-set score with tiebreaks, both players with country, live ranking and seed, plus surface, round, tier, duration and winner. Live, finished and upcoming draws. No API key or login — runs on the free plan.",
    "version": "1.0",
    "x-build-id": "2nmQKijgkgsEhYThZ"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/incognito_mode~sofascore-tennis-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-incognito_mode-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/incognito_mode~sofascore-tennis-scraper/runs": {
      "post": {
        "operationId": "runs-sync-incognito_mode-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/incognito_mode~sofascore-tennis-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-incognito_mode-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": {
          "tours": {
            "title": "Tours",
            "type": "array",
            "description": "Which tours to scrape. THIS IS THE MAIN COST CONTROL. A single tennis day carries around 150 tournaments, but only about 6 of them are ATP or WTA — the other 96% is the ITF and UTR development circuit. Leaving this on ATP + WTA makes a run roughly 20x cheaper and faster than scraping everything. Grand Slams are ATP/WTA events, so they are already included; there is no separate Grand Slam tour.",
            "items": {
              "type": "string",
              "enum": [
                "atp",
                "wta",
                "challenger",
                "wta-125",
                "itf-men",
                "itf-women",
                "utr-men",
                "utr-women",
                "davis-cup",
                "billie-jean-king-cup",
                "united-cup",
                "exhibition",
                "international"
              ],
              "enumTitles": [
                "ATP (men, incl. Grand Slams)",
                "WTA (women, incl. Grand Slams)",
                "Challenger",
                "WTA 125",
                "ITF Men",
                "ITF Women",
                "UTR Men",
                "UTR Women",
                "Davis Cup",
                "Billie Jean King Cup",
                "United Cup",
                "Exhibition",
                "International"
              ]
            },
            "default": [
              "atp",
              "wta"
            ]
          },
          "matchType": {
            "title": "Match type",
            "enum": [
              "singles",
              "doubles",
              "all"
            ],
            "type": "string",
            "description": "Singles only, doubles only, or both. Doubles draws are separate tournaments on most tours, so choosing \"Singles\" also skips fetching them — about a quarter of a day's tournaments. Davis Cup, United Cup and Billie Jean King Cup ties mix both in one tournament and are classified per match.",
            "default": "singles"
          },
          "liveOnly": {
            "title": "Live matches only",
            "type": "boolean",
            "description": "Fetch only matches currently in progress (one fast call, always \"now\" — no date range needed). Live rows carry the running set score and the current game point. Turn off to fetch a daily schedule instead, using Date from / Date to below.",
            "default": false
          },
          "dateFrom": {
            "title": "Date from",
            "type": "string",
            "description": "First date to fetch (YYYY-MM-DD). Defaults to today (UTC). Future dates work and return the published draw — players, seeds, rankings and round, with the score fields empty. Ignored when \"Live matches only\" is on."
          },
          "dateTo": {
            "title": "Date to",
            "type": "string",
            "description": "Last date to fetch (YYYY-MM-DD), inclusive. Defaults to \"Date from\". Max 31 days per run. Ignored when \"Live matches only\" is on."
          },
          "tournamentIds": {
            "title": "Tournament IDs (advanced)",
            "type": "array",
            "description": "Sofascore unique-tournament IDs to fetch directly for the date range, e.g. [2449, 2601] for the US Open men's and women's draws (the ID is in the tournament's Sofascore URL). Skips discovery entirely, so a run stays fast and predictable across a wide date range. The Tours filter is NOT applied to these — naming a Challenger draw returns it whatever Tours says — but Match type still is, so set it to \"Singles and doubles\" if you are pointing at a doubles draw. Ignored when \"Live matches only\" is on.",
            "items": {
              "type": "integer"
            }
          },
          "maxTournamentsPerDate": {
            "title": "Max tournaments per date",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "When \"Tournament IDs\" is empty, how many of the matching tournaments (ranked by Sofascore follower count) to fetch matches for on each date. Only tournaments that pass the Tours filter are counted, so the default is generous for ATP + WTA and only starts binding if you add the ITF or UTR circuits.",
            "default": 30
          },
          "maxDiscoveryPages": {
            "title": "Max tournament-discovery pages",
            "minimum": 1,
            "maximum": 50,
            "type": "integer",
            "description": "How deep to page through the tournament-discovery step on each date. A whole tennis day fits in 2 pages (about 150 tournaments), so the default already sees every tournament — unlike football, where it would be a ranked sample. Raise it only if Sofascore expands the calendar. Ignored when \"Tournament IDs\" is set.",
            "default": 2
          },
          "maxItems": {
            "title": "Maximum items",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "Hard cap on how many matches are stored in the dataset. The run stops as soon as it is reached.",
            "default": 500
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Leave off. Every request calls Sofascore directly first, which costs nothing, and most runs never need anything else. If Sofascore does block an IP, the Actor escalates on its own: first to a datacenter proxy (included in every Apify plan, free tier included), rotating a few IPs, and only then to a residential one if your plan has them. No residential add-on is required. Set this only to pin a specific proxy configuration from the start — for example to scrape from a particular country.",
            "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
                  }
                }
              },
              "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}