{
  "openapi": "3.0.1",
  "info": {
    "title": "Tennis Scraper API: ATP WTA ITF Results, Stats, Rankings, H2H",
    "description": "Tennis data API for completed ATP, WTA and ITF singles matches. Query tennis results by tournament, match stats, head-to-head records, player stats and tennis rankings. Hourly updates, stable player IDs and a change feed. Coverage varies by tour and is expanding; no live scores.",
    "version": "0.0",
    "x-build-id": "lUawVgHg0iF8D94QK"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/shelvick~tennis-data-index/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-shelvick-tennis-data-index",
        "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/shelvick~tennis-data-index/runs": {
      "post": {
        "operationId": "runs-sync-shelvick-tennis-data-index",
        "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/shelvick~tennis-data-index/run-sync": {
      "post": {
        "operationId": "run-sync-shelvick-tennis-data-index",
        "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": "Mode",
            "enum": [
              "matches",
              "h2h",
              "player_stats",
              "rankings",
              "changes"
            ],
            "type": "string",
            "description": "Choose match rows, head-to-head results, player aggregates, rankings or a revision feed. Values: matches, h2h, player_stats, rankings, changes. Default matches; h2h requires two player IDs and player_stats requires one. Select one mode per run; for example matches for a tournament-sized query.",
            "default": "matches"
          },
          "tour": {
            "title": "Tour",
            "type": "string",
            "description": "Scope the query to atp, wta, challenger or itf; omit for no tour filter. Challenger events are indexed under the ATP tour, so selecting challenger currently returns ATP main tour as well; the run reports this. Use one tour to narrow a season or tournament query; for example atp."
          },
          "dateFrom": {
            "title": "Datefrom",
            "type": "string",
            "description": "Set the inclusive start of the match date window using YYYY-MM-DD. Optional match-history filter; omit for no lower bound, and do not set it after dateTo. A tournament query typically spans a few weeks; for example 2025-06-23. Rankings use rankingDate instead."
          },
          "dateTo": {
            "title": "Dateto",
            "type": "string",
            "description": "Set the inclusive end of the match date window using YYYY-MM-DD. Optional match-history filter; omit for no upper bound, and do not set it before dateFrom. A tournament query typically spans a few weeks; for example 2025-07-14. Rankings use rankingDate instead."
          },
          "tournamentId": {
            "title": "Tournamentid",
            "type": "string",
            "description": "Restrict match history to one tournament using its source-prefixed index ID. Use an ID rather than a tournament name; omit for no tournament filter. Combine with dates to select one edition, typically a few weeks; for example atp:540 for Wimbledon."
          },
          "surface": {
            "title": "Surface",
            "type": "string",
            "description": "Restrict match history to the surface label held in the index. Matched exactly and case-sensitively against the stored label, which is lowercase: grass, hard, clay or carpet; omit for no surface filter. Labels depend on source coverage. Use one surface for a tournament or season comparison; for example grass."
          },
          "rounds": {
            "title": "Rounds",
            "type": "array",
            "description": "Restrict match history to one or more draw rounds rather than the full draw. Values: R128, R64, R32, R16, QF, SF, F, RR, Q1, Q2, Q3. Empty means no round filter; availability depends on the draw. Typically select one to three rounds; for example [\"SF\", \"F\"].",
            "items": {
              "type": "string"
            }
          },
          "stage": {
            "title": "Stage",
            "type": "string",
            "description": "Restrict match history to the main draw or qualifying stage. Values: main, qual; omit for both where indexed. This filter does not add unavailable qualifying coverage. Select one stage for a tournament-sized query; for example main."
          },
          "statuses": {
            "title": "Statuses",
            "type": "array",
            "description": "Select which match statuses count in the query; completed and retired are the default. Values: completed, retired, walkover, default, bye, scheduled, in_progress, cancelled. Availability depends on the source; this is not a live-score feed. player_stats requires the default pair. Typically use [\"completed\", \"retired\"].",
            "items": {
              "type": "string"
            },
            "default": [
              "completed",
              "retired"
            ]
          },
          "playerA": {
            "title": "Playera",
            "type": "string",
            "description": "Identify the first player in a head-to-head query using a source-prefixed index player ID. Required only for h2h together with a different playerB; names are not IDs. Supply one ID for the entire comparison, for example atp:s0ag."
          },
          "playerB": {
            "title": "Playerb",
            "type": "string",
            "description": "Identify the second player in a head-to-head query using a source-prefixed index player ID. Required only for h2h together with a different playerA; names are not IDs. Supply one opponent for the entire comparison, for example atp:a0e2."
          },
          "player": {
            "title": "Player",
            "type": "string",
            "description": "Identify the player whose match statistics should be aggregated using an index player ID. Required for player_stats; names are not IDs and statistics depend on source availability. Supply one player per aggregate query, for example wta:326408."
          },
          "opponentRankMin": {
            "title": "Opponentrankmin",
            "minimum": 1,
            "type": "integer",
            "description": "Set the lowest numeric opponent rank included in a player statistics query. Positive integer, player_stats only; omit for no lower bound and keep it at or below opponentRankMax. This filters by available opponent ranks, not ranking points. Typically pair 1 with a maximum of 10; for example 1."
          },
          "opponentRankMax": {
            "title": "Opponentrankmax",
            "minimum": 1,
            "type": "integer",
            "description": "Set the highest numeric opponent rank included in a player statistics query. Positive integer, player_stats only; omit for no upper bound and keep it at or above opponentRankMin. Rank 1 is strongest; unranked opponents lack a numeric rank. Typically use a top-ten or top-hundred cutoff; for example 10."
          },
          "rankingDate": {
            "title": "Rankingdate",
            "type": "string",
            "description": "Select a rankings snapshot by its ISO date in YYYY-MM-DD form. Optional rankings-mode selector, not a match-date filter; only indexed snapshots can be returned. Use one snapshot per query, for example 2025-07-14, with rankMax to bound its size."
          },
          "rankMax": {
            "title": "Rankmax",
            "minimum": 1,
            "type": "integer",
            "description": "Limit rankings results to the top N players — rankMax 100 returns positions 1 to 100. Positive integer used in rankings mode; omit for no rank cutoff. This is not a row budget and ties may affect counts. Typically request the top 100; for example 100."
          },
          "since": {
            "title": "Since",
            "minimum": 0,
            "type": "integer",
            "description": "Resume the changes feed after a nonnegative integer revision number. Used in changes mode, not as a date or a match-page cursor. Copy the run summary resume_cursor here when resume_field is since; keep the same filters. Use one checkpoint per incremental run, for example 0 for an initial feed."
          },
          "cursor": {
            "title": "Cursor",
            "type": "string",
            "description": "Continue a truncated paginated query using the opaque cursor from its run summary. Copy resume_cursor here only when resume_field is cursor; do not construct or edit the token. Keep the original mode and filters. Supply one token per continuation; for example the exact resume_cursor from your preceding run."
          },
          "limit": {
            "title": "Limit",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "Cap the number of billable data rows delivered in a run to control query size. Integer from 1 to 100000, default 5000; a six-figure history pull can take most of the run's time budget, so raise the run timeout with it; the maximum run charge can stop delivery sooner. Free notices explain truncation and the summary supplies continuation details. A tournament query typically needs hundreds of rows; for example 500.",
            "default": 5000
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}