{
  "openapi": "3.0.1",
  "info": {
    "title": "SofaScore Tennis Scraper: Live Scores, Stats & Odds",
    "description": "Tennis data from SofaScore for betting models and analysts: every ATP, WTA, Challenger and ITF match by day, live, tournament or player, with set and tiebreak scores, rankings and surface. Optional serve stats, point-by-point and odds. Pay only for results.",
    "version": "1.0",
    "x-build-id": "ggPecY4vyNLNgEIE9"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/axlymxp~sofascore-tennis-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-axlymxp-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/axlymxp~sofascore-tennis-scraper/runs": {
      "post": {
        "operationId": "runs-sync-axlymxp-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/axlymxp~sofascore-tennis-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-axlymxp-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": {
          "mode": {
            "title": "What to scrape",
            "enum": [
              "matches",
              "rankings",
              "players"
            ],
            "type": "string",
            "description": "Matches (by day, live, tournament, player or match), ATP/WTA rankings, or player profiles.",
            "default": "matches"
          },
          "dates": {
            "title": "Days",
            "type": "array",
            "description": "UTC days to collect every match of: YYYY-MM-DD or relative values today, yesterday, tomorrow, +2, -3. Used when no live/tournament/player/match source is given, defaults to today.",
            "items": {
              "type": "string"
            }
          },
          "liveOnly": {
            "title": "Live matches only",
            "type": "boolean",
            "description": "Only matches in progress right now (one request, ideal for frequent schedules). Other sources are ignored.",
            "default": false
          },
          "tournaments": {
            "title": "Tournaments",
            "type": "array",
            "description": "Sofascore tournament URLs, ids or names (e.g. 'Wimbledon', https://www.sofascore.com/tennis/tournament/atp/wimbledon/2361). Returns the current season's fixtures and results.",
            "items": {
              "type": "string"
            }
          },
          "players": {
            "title": "Players",
            "type": "array",
            "description": "Player URLs, ids or names (e.g. 'Jannik Sinner', https://www.sofascore.com/tennis/player/sinner-jannik/206570). Matches mode: their recent results and upcoming matches. Players mode: their profiles.",
            "items": {
              "type": "string"
            }
          },
          "matchIds": {
            "title": "Match URLs or ids",
            "type": "array",
            "description": "Specific matches, e.g. https://www.sofascore.com/tennis/match/sinner-alcaraz/abc#id:12345678 or 12345678.",
            "items": {
              "type": "string"
            }
          },
          "tours": {
            "title": "Tours",
            "type": "array",
            "description": "Keep only these tours. Empty = all.",
            "items": {
              "type": "string",
              "enum": [
                "ATP",
                "WTA",
                "Challenger",
                "ITF Men",
                "ITF Women",
                "UTR Men",
                "UTR Women",
                "Other"
              ],
              "enumTitles": [
                "ATP",
                "WTA",
                "Challenger",
                "ITF Men",
                "ITF Women",
                "UTR Men",
                "UTR Women",
                "Other (Davis Cup, exhibitions, ...)"
              ]
            }
          },
          "matchType": {
            "title": "Singles / doubles",
            "enum": [
              "all",
              "singles",
              "doubles"
            ],
            "type": "string",
            "description": "Keep singles, doubles or both.",
            "default": "all"
          },
          "statuses": {
            "title": "Match status",
            "type": "array",
            "description": "Keep only these statuses. Empty = all.",
            "items": {
              "type": "string",
              "enum": [
                "notstarted",
                "inprogress",
                "finished",
                "interrupted",
                "postponed",
                "canceled",
                "other"
              ],
              "enumTitles": [
                "Not started",
                "In progress",
                "Finished",
                "Interrupted",
                "Postponed",
                "Canceled",
                "Other (retired, walkover, ...)"
              ]
            }
          },
          "includeStatistics": {
            "title": "Match statistics",
            "type": "boolean",
            "description": "Aces, double faults, 1st/2nd serve %, break points, return points, tiebreaks... per match and per set.",
            "default": false
          },
          "includePointByPoint": {
            "title": "Point-by-point",
            "type": "boolean",
            "description": "Every game in order with server, winner, break flag, game score and the point sequence.",
            "default": false
          },
          "includeOdds": {
            "title": "Odds",
            "type": "boolean",
            "description": "Bookmaker odds (decimal and fractional, opening and current): match winner, first set winner, total games...",
            "default": false
          },
          "includeMomentum": {
            "title": "Momentum",
            "type": "boolean",
            "description": "Sofascore 'tennis power' momentum value per game.",
            "default": false
          },
          "rankings": {
            "title": "Rankings",
            "type": "array",
            "description": "Rankings mode: which rankings to return.",
            "items": {
              "type": "string",
              "enum": [
                "atp",
                "wta"
              ],
              "enumTitles": [
                "ATP singles",
                "WTA singles"
              ]
            },
            "default": [
              "atp",
              "wta"
            ]
          },
          "rankingsLimit": {
            "title": "Top N per ranking",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "How many ranked players per ranking (max 500). 'Max rows' also applies.",
            "default": 100
          },
          "maxItems": {
            "title": "Max rows",
            "minimum": 1,
            "maximum": 50000,
            "type": "integer",
            "description": "Maximum number of rows to return. You are charged per row.",
            "default": 1000
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Default (Apify Proxy, automatic) tries datacenter IPs and switches to residential when Sofascore challenges them. Pick a group only if you want to force it.",
            "default": {
              "useApifyProxy": true
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}