{
  "openapi": "3.0.1",
  "info": {
    "title": "Tennis Scraper & Odds API | Live Scores, Results, H2H | $1/1k",
    "description": "Tennis results, fixtures and betting odds for ATP, WTA, Challenger and ITF: scores with tie-breaks, round, surface, H2H, odds from 15+ bookmakers with opening prices and line movement, player match history, and rankings.",
    "version": "1.0",
    "x-build-id": "wHqv2mhXfNdpNtfsj"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/trev0n~tennis-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-trev0n-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/trev0n~tennis-scraper/runs": {
      "post": {
        "operationId": "runs-sync-trev0n-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/trev0n~tennis-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-trev0n-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": {
          "dateFrom": {
            "title": "From date",
            "type": "string",
            "description": "First day of matches (UTC): YYYY-MM-DD, \"today\", \"yesterday\", \"tomorrow\", or a day offset such as \"-7\". Past days return results, today and later return the schedule. Leave empty to skip match lists when you only want players or rankings (with nothing else set, yesterday is used)."
          },
          "dateTo": {
            "title": "To date",
            "type": "string",
            "description": "Last day (inclusive), same formats as From date. Empty = the same day as From date. Up to 400 days per run.",
            "default": ""
          },
          "tours": {
            "title": "Tours",
            "type": "array",
            "description": "Which match lists to read. Challengers, ITF and UTR events are part of these lists; narrow them down with Tournament levels.",
            "items": {
              "type": "string",
              "enum": [
                "atp-single",
                "wta-single",
                "atp-double",
                "wta-double"
              ],
              "enumTitles": [
                "ATP (men) singles",
                "WTA (women) singles",
                "ATP (men) doubles",
                "WTA (women) doubles"
              ]
            },
            "default": [
              "atp-single"
            ]
          },
          "levels": {
            "title": "Tournament levels",
            "type": "array",
            "description": "Keep only these levels. Empty = all. Main tour covers Grand Slams, ATP, WTA and the Finals.",
            "items": {
              "type": "string",
              "enum": [
                "main",
                "challenger",
                "itf",
                "utr",
                "team",
                "other"
              ],
              "enumTitles": [
                "Main tour (Grand Slam, ATP, WTA)",
                "Challenger",
                "ITF / Futures",
                "UTR Pro Tennis Series",
                "Team events (Davis Cup, BJK Cup, United Cup)",
                "Other (WTA 125 and unlabelled events)"
              ]
            },
            "default": []
          },
          "statuses": {
            "title": "Match status",
            "type": "array",
            "description": "Keep only matches with these statuses. Empty = all. Retired and walkover are worked out from the score.",
            "items": {
              "type": "string",
              "enum": [
                "finished",
                "retired",
                "walkover",
                "live",
                "scheduled"
              ],
              "enumTitles": [
                "Finished",
                "Retired",
                "Walkover",
                "Live",
                "Scheduled (upcoming)"
              ]
            },
            "default": []
          },
          "playerFilter": {
            "title": "Only matches of player",
            "type": "string",
            "description": "Keep only matches whose player names contain this text, e.g. \"Sinner\" or \"Swiatek\".",
            "default": ""
          },
          "includeMatchDetails": {
            "title": "Add match details & bookmaker odds",
            "type": "boolean",
            "description": "Open every match page and add round, surface, both players' rank, birth date, height, weight and playing hand, the head-to-head record, and odds from every listed bookmaker with opening prices. One extra page per match, billed as a match-details event.",
            "default": false
          },
          "oddsMarkets": {
            "title": "Odds markets",
            "type": "array",
            "description": "Which odds tables to add when match details are on.",
            "items": {
              "type": "string",
              "enum": [
                "homeAway",
                "overUnder",
                "asianHandicap",
                "correctScore"
              ],
              "enumTitles": [
                "Match winner (home/away)",
                "Over/Under (sets and games)",
                "Asian handicap (sets and games)",
                "Correct score"
              ]
            },
            "default": [
              "homeAway"
            ]
          },
          "includeOddsMovement": {
            "title": "Include odds movement",
            "type": "boolean",
            "description": "Add the timestamped history of every price change for each bookmaker's match-winner odds, from opening to the last update.",
            "default": false
          },
          "detailConcurrency": {
            "title": "Match pages in parallel",
            "minimum": 1,
            "maximum": 15,
            "type": "integer",
            "description": "How many match pages load at the same time.",
            "default": 5
          },
          "players": {
            "title": "Players",
            "type": "array",
            "description": "Player names (\"Jannik Sinner\", \"Iga Swiatek\") or player page URLs. Each one returns a profile with win/loss by season and surface, plus the player's matches.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "playerSeasons": {
            "title": "Player seasons",
            "type": "array",
            "description": "Seasons of match history to read, e.g. \"2025\", \"2024\", or \"all\" for the whole career. Empty = the current season.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "includePlayerMatches": {
            "title": "Include player match history",
            "type": "boolean",
            "description": "Also output every singles, doubles and mixed match on the player pages, with round, surface, score and odds.",
            "default": true
          },
          "rankings": {
            "title": "Rankings",
            "type": "array",
            "description": "Ranking lists to output.",
            "items": {
              "type": "string",
              "enum": [
                "atp-singles",
                "wta-singles",
                "atp-doubles",
                "wta-doubles",
                "atp-race",
                "wta-race"
              ],
              "enumTitles": [
                "ATP singles",
                "WTA singles",
                "ATP doubles",
                "WTA doubles",
                "ATP race",
                "WTA race"
              ]
            },
            "default": []
          },
          "rankingDate": {
            "title": "Ranking week",
            "type": "string",
            "description": "A past ranking week as YYYY-MM-DD (the nearest published week is used). Empty = the current ranking.",
            "default": ""
          },
          "maxRankingPositions": {
            "title": "Ranking positions",
            "minimum": 1,
            "maximum": 3000,
            "type": "integer",
            "description": "How many positions to read from each ranking (50 per page).",
            "default": 100
          },
          "startUrls": {
            "title": "Start URLs",
            "type": "array",
            "description": "Any tennisexplorer.com page: a day's match list or results, a tournament page, a match page, a player page or a ranking page.",
            "default": [],
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "maxResults": {
            "title": "Maximum matches",
            "minimum": 0,
            "type": "integer",
            "description": "Stop after this many matches (counted after filters). 0 = no limit. Player profiles and ranking rows are not counted.",
            "default": 100
          },
          "maxConcurrency": {
            "title": "Pages in parallel",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "How many list, player and ranking pages load at the same time.",
            "default": 5
          },
          "incrementalMode": {
            "title": "Incremental monitoring",
            "type": "boolean",
            "description": "Remember what previous runs saw and emit only new matches and matches whose status, score or odds changed. Schedule it every hour to track results and line moves while paying only for what changed.",
            "default": false
          },
          "stateKey": {
            "title": "Monitoring state key",
            "type": "string",
            "description": "Name the baseline this run compares against. Leave empty to derive one from the input.",
            "default": ""
          },
          "emitUnchanged": {
            "title": "Also emit unchanged matches",
            "type": "boolean",
            "description": "Also emit matches that have not changed since the previous run.",
            "default": false
          },
          "emitExpired": {
            "title": "Emit disappeared matches",
            "type": "boolean",
            "description": "Emit a record for matches seen before that are no longer in the lists (for example a moving date window).",
            "default": false
          },
          "proxyFallback": {
            "title": "Switch to residential proxies when blocked",
            "type": "boolean",
            "description": "If the site starts refusing requests, the rest of the run continues through Apify residential proxies instead of losing results.",
            "default": true
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "No proxy is the default and the fastest, cheapest setting.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}