{
  "openapi": "3.0.1",
  "info": {
    "title": "Tennis Data API: Live Scores, ATP WTA ITF Results & Rankings",
    "description": "Tennis data API and sports data API: tennis live scores for today's ATP and WTA matches (ITF opt-in), plus tennis match results (ATP results, WTA results, ITF results), match stats, tennis head to head records, tennis player stats and rankings. Search players and tournaments by name.",
    "version": "0.0",
    "x-build-id": "wZAys44HAg7oYnDkm"
  },
  "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": [
              "live",
              "matches",
              "h2h",
              "player_stats",
              "rankings",
              "changes",
              "lookup"
            ],
            "type": "string",
            "description": "Choose the live board, completed match rows, head-to-head results, player aggregates, rankings, a revision feed or an ID lookup. Values: live, matches, h2h, player_stats, rankings, changes, lookup. Default live, which returns the matches on court now and needs no other field; rows update within about a minute of the tours publishing them, and live rows carry no data charge. A tour with nothing on court is a quiet day, not a failure: the run summary reports each tour's status and match count, and only a tour that failed adds a notice. h2h requires two players, player_stats requires one, and lookup requires query. Select one mode per run. Names are accepted directly: put a player or tournament name in player, playerA, playerB or tournamentId and the run resolves it itself, so lookup is only needed when a name is ambiguous or you want to browse IDs; for example h2h with playerA Jannik Sinner and playerB Carlos Alcaraz.",
            "default": "live"
          },
          "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. In live mode, omitting this returns the ATP and WTA boards together and itf is opt-in, because ITF alone outnumbers both. 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 by index ID, or an exact tournament name. Supply either the source-prefixed index ID or an exact tournament name — for example atp:560 or US Open. Omit for no tournament filter; combine with dates to select one edition. A name matching several tournaments comes back as a free notice listing the IDs, so add tour to narrow it."
          },
          "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 a completed-history query; completed and retired are the default. Values: completed, retired, walkover, default, bye, scheduled, in_progress, cancelled. Availability depends on the source. player_stats requires the default pair. Live mode ignores this field and reports its own state on every row: scheduled, live, completed, retired, walkover or suspended. 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 by index ID, or an exact player name. Supply either the source-prefixed index ID or an exact player name — for example atp:s0ag or Jannik Sinner. Required only for h2h together with a different playerB. A name that matches several indexed players comes back as a free ambiguous_name notice listing the IDs; mode lookup searches names directly."
          },
          "playerB": {
            "title": "Playerb",
            "type": "string",
            "description": "Identify the second player in a head-to-head query by index ID, or an exact player name. Supply either the source-prefixed index ID or an exact player name — for example atp:s0ag or Jannik Sinner. Required only for h2h together with a different playerA. A name that matches several indexed players comes back as a free ambiguous_name notice listing the IDs; mode lookup searches names directly."
          },
          "player": {
            "title": "Player",
            "type": "string",
            "description": "Identify the player whose match statistics should be aggregated by index ID, or an exact player name. Supply either the source-prefixed index ID or an exact player name — for example wta:326408 or Iga Swiatek. Required for player_stats; an ambiguous name comes back as a free notice listing the IDs. ITF results carry no match statistics, so an ITF player's aggregate holds the win-loss record only."
          },
          "query": {
            "title": "Query",
            "type": "string",
            "description": "Search indexed player and tournament names for the text you type, in lookup mode. Required for lookup and rejected in every other mode, where a name goes straight into playerA, playerB, player or tournamentId. Matching ignores case and accents and needs no wildcards; for example Sinner."
          },
          "lookupKind": {
            "title": "Lookupkind",
            "enum": [
              "players",
              "tournaments",
              "all"
            ],
            "type": "string",
            "description": "Choose which catalogue lookup mode searches. Values: players, tournaments, all; default all, which searches both and returns up to 25 candidates of each. Used in lookup mode only. For example players when you need a head-to-head ID.",
            "default": "all"
          },
          "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."
          },
          "order": {
            "title": "Order",
            "enum": [
              "newest",
              "oldest"
            ],
            "type": "string",
            "description": "Choose the date order for matches and h2h rows: newest (default) returns newest-first, oldest returns oldest-first. Other modes ignore this field. A cursor keeps the order it was issued with; keep the same order when continuing. For example, use oldest to read a season from its beginning.",
            "default": "newest"
          },
          "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 data rows delivered in a run to control query size. Integer from 1 to 100000, default 5000 (the form pre-fills 500, which suits one tournament); live rows are free but still count against this cap; 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
                  },
                  "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}