{
  "openapi": "3.0.1",
  "info": {
    "title": "Tennis Results & Odds Scraper - ATP, WTA, Challenger, ITF",
    "description": "Every tennis match TennisExplorer lists for the days you pick: tour, level, tournament, surface, round, both players, set scores with tiebreaks, winner, retirements and average odds. Upcoming matches come with odds too. Filter by tour, level, tournament, player or surface.",
    "version": "0.1",
    "x-build-id": "phCNCAr4RWOd3j4Ia"
  },
  "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."
          },
          "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."
          },
          "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"
              ]
            }
          },
          "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, and every bookmaker's odds with the opening prices. 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
          },
          "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
                  }
                }
              },
              "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}