{
  "openapi": "3.0.1",
  "info": {
    "title": "WTA Singles, Doubles & Race Rankings Finder",
    "description": "Get the official WTA singles, doubles, or Race to the Finals rankings with points, nationality, and player profile links, filterable by player name.",
    "version": "1.0",
    "x-build-id": "SoLkS2bfHeLPFw327"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/dataspryva~wta-singles-doubles-and-race-rankings-finder/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-dataspryva-wta-singles-doubles-and-race-rankings-finder",
        "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/dataspryva~wta-singles-doubles-and-race-rankings-finder/runs": {
      "post": {
        "operationId": "runs-sync-dataspryva-wta-singles-doubles-and-race-rankings-finder",
        "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/dataspryva~wta-singles-doubles-and-race-rankings-finder/run-sync": {
      "post": {
        "operationId": "run-sync-dataspryva-wta-singles-doubles-and-race-rankings-finder",
        "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",
        "required": [
          "mode"
        ],
        "properties": {
          "mode": {
            "title": "What to scrape",
            "enum": [
              "rankings",
              "profiles",
              "matches",
              "tournaments",
              "players"
            ],
            "type": "string",
            "description": "Choose rankings, player profiles, match history, or the tournament calendar.",
            "default": "rankings"
          },
          "rankingType": {
            "title": "Ranking table",
            "enum": [
              "singles",
              "doubles",
              "raceSingles",
              "raceDoubles",
              "race"
            ],
            "type": "string",
            "description": "Singles, doubles, Race to the WTA Finals singles, or Race to the WTA Finals doubles. Also used to resolve names in profiles and matches modes.",
            "default": "singles"
          },
          "rankingDate": {
            "title": "Ranking date (optional)",
            "type": "string",
            "description": "Historical rankings as of a Monday from 2001 onward. Leave empty for the latest published rankings."
          },
          "searchQuery": {
            "title": "Player name (optional)",
            "type": "string",
            "description": "Filter rankings by name, or resolve players for profiles and matches modes."
          },
          "nationality": {
            "title": "Nationality (optional)",
            "type": "string",
            "description": "Three-letter country code such as USA, POL, or KAZ."
          },
          "playerIds": {
            "title": "Player IDs or profile URLs (optional)",
            "type": "array",
            "description": "Profiles and matches modes. Paste WTA player IDs or profile URLs, one per line or comma-separated.",
            "items": {
              "type": "string"
            }
          },
          "year": {
            "title": "Season (optional)",
            "minimum": 1970,
            "maximum": 2100,
            "type": "integer",
            "description": "Matches mode only. Limit match history to one season, for example 2026."
          },
          "fromDate": {
            "title": "From date",
            "type": "string",
            "description": "Tournaments mode. Start of the calendar window; leave empty for the last 7 days."
          },
          "toDate": {
            "title": "To date",
            "type": "string",
            "description": "Tournaments mode. End of the calendar window; leave empty for the next 14 days."
          },
          "level": {
            "title": "Tournament level",
            "enum": [
              "all",
              "Grand Slam",
              "WTA 1000",
              "WTA 500",
              "WTA 250",
              "WTA 125",
              "Finals",
              "ITF"
            ],
            "type": "string",
            "description": "Tournaments mode. Filter by WTA tournament tier.",
            "default": "all"
          },
          "surface": {
            "title": "Surface",
            "enum": [
              "all",
              "Hard",
              "Clay",
              "Grass",
              "Carpet"
            ],
            "type": "string",
            "description": "Tournaments mode. Filter by court surface.",
            "default": "all"
          },
          "includeTournamentMatches": {
            "title": "Include tournament matches",
            "type": "boolean",
            "description": "Tournaments mode. Add the match list for every returned tournament.",
            "default": false
          },
          "includeRankingHistory": {
            "title": "Include ranking history",
            "type": "boolean",
            "description": "Player profiles mode. Add up to 52 weeks of singles, doubles and Race ranking history.",
            "default": false
          },
          "maxItems": {
            "title": "Maximum records",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Stop after this many records. Each ranking table has at most about 1,800 players.",
            "default": 50
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}