{
  "openapi": "3.0.1",
  "info": {
    "title": "Tennis Results & Odds Scraper - ATP, WTA, Challenger, ITF",
    "description": "Tennis results and odds scraper: TennisExplorer's matches for the days you pick, with tour, level, tournament, surface, round, both players, set scores with tiebreaks, winner and average odds. Upcoming matches come with odds too. Filter by tour, level, player or surface. $0.95 per 1,000 matches.",
    "version": "0.1",
    "x-build-id": "b7Jjj9bzcmot18Jsp"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/dami_studio~tennis-matches-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-dami_studio-tennis-matches-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/dami_studio~tennis-matches-scraper/runs": {
      "post": {
        "operationId": "runs-sync-dami_studio-tennis-matches-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/dami_studio~tennis-matches-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-dami_studio-tennis-matches-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": {
          "lastDays": {
            "title": "Last days",
            "minimum": 0,
            "maximum": 366,
            "type": "integer",
            "description": "The last N full days of results, ending yesterday. 1 is yesterday only, which suits a daily schedule. Used when From date is empty."
          },
          "upcomingDays": {
            "title": "Upcoming days",
            "minimum": 0,
            "maximum": 7,
            "type": "integer",
            "description": "Today's matches plus the schedule after it: 1 is today only, 2 adds tomorrow. TennisExplorer usually lists the next day or two, with odds. Used when From date is empty. Set beside Last days with a Maximum matches too small for both, the days from today on get up to half of it, so both show."
          },
          "dateFrom": {
            "title": "From date",
            "pattern": "^(\\d{4})-(0[1-9]|1[0-2])-(0[1-9]|[12]\\d|3[01])$",
            "type": "string",
            "description": "The first day, as YYYY-MM-DD, for a fixed range instead of Last days. Past days go back as far as TennisExplorer has results."
          },
          "dateTo": {
            "title": "To date",
            "pattern": "^(\\d{4})-(0[1-9]|1[0-2])-(0[1-9]|[12]\\d|3[01])$",
            "type": "string",
            "description": "The last day. Leave it empty to stop at today. One run covers up to 366 days."
          },
          "playerHistory": {
            "title": "Player history",
            "maxItems": 50,
            "type": "array",
            "description": "Instead of days: links to players' TennisExplorer pages, such as https://www.tennisexplorer.com/player/rybakina/. You get every match each of them played in the years below, singles, doubles and mixed, newest first. When this is filled in, the day fields above aren't used.",
            "items": {
              "type": "string"
            }
          },
          "historyYears": {
            "title": "Years for player history",
            "maxItems": 40,
            "type": "array",
            "description": "Years such as 2025, back to 1990. Leave it empty for this year. Each player and year is one page, up to 500 in a run.",
            "items": {
              "type": "string"
            }
          },
          "matchTypes": {
            "title": "Match types",
            "type": "array",
            "description": "Leave it empty for all four. Men's matches come under ATP and women's under WTA, Challenger and ITF events included.",
            "items": {
              "type": "string",
              "enum": [
                "atp-single",
                "atp-double",
                "wta-single",
                "wta-double"
              ],
              "enumTitles": [
                "Men's singles",
                "Men's doubles",
                "Women's singles",
                "Women's doubles"
              ]
            }
          },
          "levels": {
            "title": "Levels",
            "type": "array",
            "description": "Leave it empty for every level. Challenger and ITF are known from the tournament's name, the rest from TennisExplorer's tour calendar.",
            "items": {
              "type": "string",
              "enum": [
                "tour",
                "challenger",
                "itf",
                "other-lower",
                "exhibition"
              ],
              "enumTitles": [
                "ATP and WTA tour, Grand Slams included",
                "Challenger",
                "ITF",
                "Other lower-level events",
                "Exhibitions"
              ]
            }
          },
          "tournaments": {
            "title": "Tournaments",
            "maxItems": 50,
            "type": "array",
            "description": "Part of a tournament's name as TennisExplorer writes it, such as US Open or Genoa, or a link to the tournament's TennisExplorer page. A match is kept when its tournament matches any of them.",
            "items": {
              "type": "string"
            }
          },
          "players": {
            "title": "Players",
            "maxItems": 50,
            "type": "array",
            "description": "A surname as TennisExplorer writes it, such as Sinner or Rybakina, or a link to the player's TennisExplorer page. A match is kept when either side matches, doubles partners included.",
            "items": {
              "type": "string"
            }
          },
          "surfaces": {
            "title": "Surfaces",
            "type": "array",
            "description": "Leave it empty for any surface. The surface comes from TennisExplorer's tour calendar. Men's ITF matches are listed without their tournament, so a surface filter leaves them out.",
            "items": {
              "type": "string",
              "enum": [
                "hard",
                "clay",
                "grass",
                "indoors"
              ],
              "enumTitles": [
                "Hard",
                "Clay",
                "Grass",
                "Indoors"
              ]
            }
          },
          "statuses": {
            "title": "Status",
            "type": "array",
            "description": "Leave it empty for both. Finished matches carry the score; matches not played yet carry the odds and head to head.",
            "items": {
              "type": "string",
              "enum": [
                "finished",
                "scheduled"
              ],
              "enumTitles": [
                "Finished",
                "Not played yet"
              ]
            }
          },
          "categories": {
            "title": "Tournament categories",
            "type": "array",
            "description": "Leave it empty for every tournament. The category comes from the points the winner gets: 2,000 at a Grand Slam, then 1000, 500, 250 and 125 events. Other events have none, Challenger and ITF included, so this filter leaves their matches out. When few matches are in your categories, the run can stop early and tell you so. Naming the tournaments as well avoids that.",
            "items": {
              "type": "string",
              "enum": [
                "grand-slam",
                "1000",
                "500",
                "250",
                "125"
              ],
              "enumTitles": [
                "Grand Slams",
                "1000 events",
                "500 events",
                "250 events",
                "125 events"
              ]
            }
          },
          "includeOdds": {
            "title": "Average odds",
            "type": "boolean",
            "description": "The average of the bookmakers' prices for each player, as the list shows it. For a finished match these are the last prices before it started.",
            "default": true
          },
          "addRounds": {
            "title": "Round",
            "type": "boolean",
            "description": "Reads each tournament's page once to add the round: final, semifinal, 1. round and so on. Turn it off on long ranges to finish sooner.",
            "default": true
          },
          "includeMatchDetails": {
            "title": "Match details",
            "type": "boolean",
            "description": "Opens each match's own page for the players' full names, rankings, birth dates, height and playing hand, every bookmaker's odds with the opening prices, each player's win-loss by surface for the season and career, and the head-to-head list. That's one more page per match, so a run with details stops at 2,000 matches.",
            "default": false
          },
          "addPlayerCountries": {
            "title": "Player countries",
            "type": "boolean",
            "description": "Reads each player's page once for their country. That's one more page per player, so a busy day takes several minutes longer.",
            "default": false
          },
          "addRanks": {
            "title": "Rank on every row",
            "type": "boolean",
            "description": "Adds each singles player's rank from today's ATP or WTA list, not the rank on the day of the match. Players outside the first 2,000 usually get none. A small run reads less of the list and takes a missing rank from the match's own page, which shows the same rank. Doubles have none. Match details carry the rank already, so this does nothing when they're on.",
            "default": false
          },
          "maxMatches": {
            "title": "Maximum matches",
            "minimum": 1,
            "maximum": 25000,
            "type": "integer",
            "description": "The most matches returned in one run. Each match returned is one charge.",
            "default": 1000
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}