{
  "openapi": "3.0.1",
  "info": {
    "title": "Tennis Abstract Match History Scraper - Stats, H2H, New Matches",
    "description": "For tennis bettors, modelers and analysts: every ATP singles match on a player's Tennis Abstract page - score, round, surface, opponent, ranks, aces, serve points, break points. Djokovic: 1,516 matches. Filter by date, surface, level or opponent; get head-to-heads and only new matches.",
    "version": "0.1",
    "x-build-id": "t7yfIeO3SoDjHc59r"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/neverempty~tennis-abstract-match-history/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-neverempty-tennis-abstract-match-history",
        "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/neverempty~tennis-abstract-match-history/runs": {
      "post": {
        "operationId": "runs-sync-neverempty-tennis-abstract-match-history",
        "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/neverempty~tennis-abstract-match-history/run-sync": {
      "post": {
        "operationId": "run-sync-neverempty-tennis-abstract-match-history",
        "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": {
          "players": {
            "title": "Players",
            "type": "array",
            "description": "ATP players whose match history you want, one per line: full name (Jannik Sinner), Tennis Abstract id (JannikSinner) or player page URL. Accents and case do not matter (novak djokovič finds Novak Djokovic). A name that fits several men (Sinner fits Jannik and Martin Sinner) or none comes back as a free row that lists the candidates or says so. Women are not available: Tennis Abstract keeps women's match histories in files its robots.txt asks crawlers not to read. Leave empty (and head-to-head empty) for a 10-match sample of Jannik Sinner.",
            "items": {
              "type": "string"
            }
          },
          "headToHead": {
            "title": "Head-to-head",
            "type": "array",
            "description": "Pairs of players, one per line, written as \"Player A vs Player B\". Each line returns one head-to-head row (meetings, wins for each player, wins by surface, last meeting) followed by every meeting as a match row, seen from Player A. As on Tennis Abstract, meetings and wins include walkovers (counted in the walkovers column). Date, surface and level filters apply; opponents and results filters do not.",
            "items": {
              "type": "string"
            }
          },
          "dateFrom": {
            "title": "From date",
            "pattern": "^(\\d{4}-\\d{2}-\\d{2})?$",
            "type": "string",
            "description": "Only matches from tournaments that started on or after this date (YYYY-MM-DD). Tennis Abstract dates every match with its tournament's start date."
          },
          "dateTo": {
            "title": "To date",
            "pattern": "^(\\d{4}-\\d{2}-\\d{2})?$",
            "type": "string",
            "description": "Only matches from tournaments that started on or before this date (YYYY-MM-DD)."
          },
          "surfaces": {
            "title": "Surfaces",
            "type": "array",
            "description": "Only matches on these surfaces. Leave empty for all.",
            "items": {
              "type": "string",
              "enum": [
                "hard",
                "clay",
                "grass",
                "carpet"
              ],
              "enumTitles": [
                "Hard",
                "Clay",
                "Grass",
                "Carpet"
              ]
            }
          },
          "levels": {
            "title": "Tournament levels",
            "type": "array",
            "description": "Only matches at these tournament levels, as Tennis Abstract codes them. 'Other tour-level' is Tennis Abstract's catch-all for ATP 250/500 events, United Cup and Laver Cup, and in some years it also holds the Tour Finals or the Olympics. Leave empty for all.",
            "items": {
              "type": "string",
              "enum": [
                "grand-slam",
                "masters",
                "tour-finals",
                "olympics",
                "davis-cup",
                "other-tour-level",
                "challenger",
                "futures",
                "qualifying",
                "juniors"
              ],
              "enumTitles": [
                "Grand Slam",
                "Masters 1000",
                "Tour Finals",
                "Olympics",
                "Davis Cup",
                "Other tour-level",
                "Challenger",
                "ITF Futures",
                "Qualifying",
                "Juniors"
              ]
            }
          },
          "opponents": {
            "title": "Opponents",
            "type": "array",
            "description": "Only matches against these opponents, one per line. A line matches an opponent whose name contains all its words, ignoring accents and case (Zverev matches Alexander and Mischa Zverev).",
            "items": {
              "type": "string"
            }
          },
          "results": {
            "title": "Results",
            "type": "array",
            "description": "Only won or only lost matches. Leave empty for both.",
            "items": {
              "type": "string",
              "enum": [
                "won",
                "lost"
              ],
              "enumTitles": [
                "Won",
                "Lost"
              ]
            }
          },
          "maxMatchesPerPlayer": {
            "title": "Matches per player",
            "minimum": 0,
            "maximum": 10000,
            "type": "integer",
            "description": "Newest matching matches returned per player. 0 returns the whole career (Novak Djokovic: 1,516 matches on 21 Sep 2026). Leave empty for 100. In monitoring mode it only limits the first check of a player; later checks return every new match."
          },
          "monitoringMode": {
            "title": "Only new matches (monitoring)",
            "type": "boolean",
            "description": "Remember the matches already seen for each player (per set of filters) and return only matches Tennis Abstract adds later. The first check of a player returns the newest matches (see 'Matches per player') and records the rest as known. Every player checked costs a small check fee, with or without new matches. Do not put the same players and filters in two schedules that run at the same time: the memory has no atomic update, so overlapping runs can overwrite each other.",
            "default": false
          },
          "resetMonitoringState": {
            "title": "Forget remembered matches",
            "type": "boolean",
            "description": "Start monitoring from scratch for this set of filters: the next check of each player is treated as a first check.",
            "default": false
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}