{
  "openapi": "3.0.1",
  "info": {
    "title": "TennisExplorer Results & Bookmaker Odds",
    "description": "Collect dated ATP, WTA, Challenger and ITF match results with set scores and available bookmaker opening and last odds. Inclusive date ranges, fixtures, ESPN cross-checks and saved new-results feeds.",
    "version": "0.1",
    "x-build-id": "fr77DT9eola2XOza2"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/automatic~tennis-results-odds/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-automatic-tennis-results-odds",
        "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/automatic~tennis-results-odds/runs": {
      "post": {
        "operationId": "runs-sync-automatic-tennis-results-odds",
        "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/automatic~tennis-results-odds/run-sync": {
      "post": {
        "operationId": "run-sync-automatic-tennis-results-odds",
        "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",
            "minItems": 1,
            "maxItems": 5,
            "uniqueItems": true,
            "type": "array",
            "description": "Omitted: ATP and WTA. Empty is an error. Lower tiers include only what TennisExplorer lists.",
            "items": {
              "type": "string",
              "enum": [
                "ATP",
                "WTA",
                "Challenger",
                "ITF men",
                "ITF women"
              ]
            }
          },
          "matchTypes": {
            "title": "Match types",
            "minItems": 1,
            "maxItems": 2,
            "uniqueItems": true,
            "type": "array",
            "description": "Omitted: singles. Doubles retain both members of each pair.",
            "items": {
              "type": "string",
              "enum": [
                "singles",
                "doubles"
              ]
            }
          },
          "dateFrom": {
            "title": "Start date (Prague)",
            "type": "string",
            "description": "Inclusive Prague calendar date, YYYY-MM-DD. Supply both dates; maximum 14 days. Dates since 2000 supported as requests, with source-dependent coverage."
          },
          "dateTo": {
            "title": "End date (Prague)",
            "type": "string",
            "description": "Inclusive Prague calendar date, YYYY-MM-DD. Supply both dates; maximum 14 days. Dates since 2000 supported as requests, with source-dependent coverage."
          },
          "lastDays": {
            "title": "Last completed days",
            "minimum": 1,
            "maximum": 14,
            "type": "integer",
            "description": "Alternative to dates: last 1–14 completed Prague days, ending yesterday. Omitted dates and lastDays: yesterday."
          },
          "players": {
            "title": "Players",
            "minItems": 1,
            "maxItems": 50,
            "uniqueItems": true,
            "type": "array",
            "description": "Optional Latin name tokens or native player IDs. Match listed names (surname recommended); omit for all. Empty is an error. Up to 50 unique values of 1–200 characters; duplicates ignoring case and outer whitespace are rejected.",
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200
            }
          },
          "tournaments": {
            "title": "Tournaments",
            "minItems": 1,
            "maxItems": 50,
            "uniqueItems": true,
            "type": "array",
            "description": "Optional listed tournament name substrings or native edition IDs. Omit for all; explicit empty is an error. Up to 50 unique values of 1–200 characters; duplicates ignoring case and outer whitespace are rejected.",
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200
            }
          },
          "includeOdds": {
            "title": "Include bookmaker odds",
            "type": "boolean",
            "description": "Opening and last listed match-winner decimal prices from named books; availability varies."
          },
          "includeFixtures": {
            "title": "Include fixtures",
            "type": "boolean",
            "description": "Allow today/future dates, up to 7 days ahead. Collects scheduled matches and their listed pre-match odds; no live scores. Cannot combine with onlyNewSinceLastRun."
          },
          "enrichWithEspn": {
            "title": "Cross-check with ESPN",
            "type": "boolean",
            "description": "Match by names, date, tour and draw. Ambiguous and absent matches stay explicit."
          },
          "onlyNewSinceLastRun": {
            "title": "Only new or changed results",
            "type": "boolean",
            "description": "First run is a labelled baseline. Later runs deliver only unseen match keys or changed result states/scores. Use the same state key and filters; serialise runs. Results only: includeFixtures must be false. Overlapping platform jobs require external serialization."
          },
          "stateKey": {
            "title": "Feed state key",
            "type": "string",
            "description": "Record key in the named tennis-results-odds-state store. Omitted: derived from filters. 1–64 letters, digits, ! _ . apostrophe ( ) -; requires feed mode."
          },
          "maxResults": {
            "title": "Maximum match records",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Omitted: 20. Range 1–1,000. Stops at 160 attempts, a 64 MB response budget or 780 seconds; OUTPUT gives a continuation date. Large rich backfills require multiple runs."
          },
          "proxyConfiguration": {
            "title": "Optional connection settings",
            "type": "object",
            "description": "Omitted: direct connections. Local runs never initialise Apify Proxy."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}