{
  "openapi": "3.0.1",
  "info": {
    "title": "Tennis Scores & Results API: ATP, WTA Rankings, Challenger, ITF",
    "description": "Tennis scores, results, fixtures and order of play for ATP, WTA, Challenger and ITF tournaments, plus ATP and WTA rankings and the tournament calendar. Set-by-set scores with tie-breaks, seeds, rounds, surface, retirements and walkovers. Filter by tour, date, tournament or player; monitor mode.",
    "version": "0.1",
    "x-build-id": "ELGViLChe3sJnaK4B"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/localwire~tennis-data/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-localwire-tennis-data",
        "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/localwire~tennis-data/runs": {
      "post": {
        "operationId": "runs-sync-localwire-tennis-data",
        "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/localwire~tennis-data/run-sync": {
      "post": {
        "operationId": "run-sync-localwire-tennis-data",
        "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": "What to get",
            "enum": [
              "results",
              "fixtures",
              "live",
              "matches",
              "rankings",
              "tournaments"
            ],
            "type": "string",
            "description": "results: finished matches (including retirements and walkovers). fixtures: scheduled matches / order of play. live: ATP and WTA matches in play right now, with the score so far (one snapshot per run). matches: everything in the date range, whatever its status. rankings: the ATP and WTA singles rankings (top 150 each). tournaments: the tournament calendar. results if left out.",
            "default": "results"
          },
          "tours": {
            "title": "Tours",
            "type": "array",
            "description": "atp and wta cover every tour-level tournament including the four Grand Slams (and WTA 125 events), for any date range. challenger and itf cover the tournaments being played this week (results and fixtures). Rankings and live scores exist for atp and wta only. atp and wta if left out.",
            "items": {
              "type": "string",
              "enum": [
                "atp",
                "wta",
                "challenger",
                "itf"
              ],
              "enumTitles": [
                "ATP (men's tour and Grand Slams)",
                "WTA (women's tour and Grand Slams)",
                "Challenger (this week's tournaments)",
                "ITF World Tennis Tour (this week's tournaments)"
              ]
            },
            "default": [
              "atp",
              "wta"
            ]
          },
          "eventType": {
            "title": "Singles or doubles",
            "enum": [
              "singles",
              "doubles",
              "all"
            ],
            "type": "string",
            "description": "singles, doubles (mixed doubles count as doubles), or all. singles if left out.",
            "default": "singles"
          },
          "daysBack": {
            "title": "From N days ago",
            "minimum": 0,
            "maximum": 365,
            "type": "integer",
            "description": "Start of the date range, counted back from today (UTC). 1 means yesterday and today. Used by results, matches and tournaments; ignored when 'From date' is set. Tennis has an off-season from late November through December, so raise this if a run comes back empty then.",
            "default": 1
          },
          "daysAhead": {
            "title": "Up to N days ahead",
            "minimum": 0,
            "maximum": 365,
            "type": "integer",
            "description": "End of the date range, counted forward from today (UTC). Used by fixtures, matches and tournaments; ignored when 'To date' is set. Order of play is usually published a day ahead; for a calendar of coming tournaments use 60 or more.",
            "default": 2
          },
          "dateFrom": {
            "title": "From date",
            "type": "string",
            "description": "First day of the range, e.g. 2026-06-22. ATP and WTA results go back years. A range may span at most 366 days."
          },
          "dateTo": {
            "title": "To date",
            "type": "string",
            "description": "Last day of the range (inclusive), e.g. 2026-07-12."
          },
          "tournaments": {
            "title": "Tournament name contains",
            "type": "array",
            "description": "Keep only tournaments whose name contains ANY of these, e.g. Wimbledon, US Open, Finals. Not case-sensitive. Set the dates to cover the tournament.",
            "items": {
              "type": "string"
            }
          },
          "players": {
            "title": "Player name contains",
            "type": "array",
            "description": "Keep only matches (or ranking rows) where a player's name contains ANY of these, e.g. Sinner, Gauff. Not case-sensitive. Challenger and ITF names are abbreviated (\"Borg L.\"), so use the surname.",
            "items": {
              "type": "string"
            }
          },
          "includeQualifying": {
            "title": "Include qualifying matches",
            "type": "boolean",
            "description": "Untick to keep main-draw matches only.",
            "default": true
          },
          "addRankings": {
            "title": "Add current rankings to players",
            "type": "boolean",
            "description": "Adds each singles player's current ATP or WTA ranking (top 150) to ATP and WTA matches from the last two weeks onwards. Costs nothing extra: one more request per tour.",
            "default": true
          },
          "dataSource": {
            "title": "Source for ATP and WTA matches",
            "enum": [
              "auto",
              "flashscore"
            ],
            "type": "string",
            "description": "auto: ATP and WTA from ESPN (any date range, full names, seeds, courts; no surface). flashscore: this week's ATP and WTA tournaments from Flashscore instead, with the court surface on every match but abbreviated names and no seeds. Challenger and ITF always come from Flashscore. Live scores and rankings always come from ESPN.",
            "default": "auto"
          },
          "tournamentUrls": {
            "title": "Flashscore tournament URLs",
            "type": "array",
            "description": "Read these tournament pages instead of the tours above, e.g. https://www.flashscore.com/tennis/atp-singles/wimbledon/ or https://www.flashscore.com/tennis/challenger-men-singles/knoxville/. Each page is the tournament's current edition and names its own draw, so 'Singles or doubles' is ignored. The date range still applies: set 'From N days ago' to 21 for a whole tournament.",
            "items": {
              "type": "string"
            }
          },
          "monitorMode": {
            "title": "Monitor mode: only what is new",
            "type": "boolean",
            "description": "Remember what was returned and return only matches not seen in earlier runs. Schedule the Actor (e.g. every 30 minutes with mode results) for a feed of new results with no duplicates. Works with results, fixtures, live and matches.",
            "default": false
          },
          "monitorStoreName": {
            "title": "Monitor name",
            "type": "string",
            "description": "Name of the key-value store that remembers returned matches. Use a different name for each separate monitor. Letters, digits and hyphens.",
            "default": "tennis-data-monitor"
          },
          "maxResults": {
            "title": "Maximum results",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "Stop after this many records. For rankings it is shared between the tours: 100 gives the top 50 of each, 300 the full top 150 of both.",
            "default": 100
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}