{
  "openapi": "3.0.1",
  "info": {
    "title": "Chess.com Scraper — Players, Games & Leaderboards",
    "description": "Scrape Chess.com by player, title, or country. Extract game PGN, ratings, openings, leaderboards, GM/IM lists, and club rosters. No API key, no login. High volume — thousands of games per run.",
    "version": "1.0",
    "x-build-id": "JnItLvsW9DSR3EZJt"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/logiover~chess-com-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-logiover-chess-com-scraper",
        "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/logiover~chess-com-scraper/runs": {
      "post": {
        "operationId": "runs-sync-logiover-chess-com-scraper",
        "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/logiover~chess-com-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-logiover-chess-com-scraper",
        "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": [
              "leaderboards",
              "playerProfile",
              "playerGames",
              "titledPlayers",
              "countryPlayers"
            ],
            "type": "string",
            "description": "What to scrape. 'leaderboards' works with no other input and returns the top players across every category.",
            "default": "leaderboards"
          },
          "usernames": {
            "title": "Usernames",
            "type": "array",
            "description": "Chess.com usernames for the 'playerGames' or 'playerProfile' modes.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "months": {
            "title": "Months (YYYY/MM)",
            "type": "array",
            "description": "Months to fetch games for (format: YYYY/MM). Leave empty to fetch last month.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "title": {
            "title": "Title Code",
            "enum": [
              "GM",
              "WGM",
              "IM",
              "WIM",
              "FM",
              "WFM",
              "NM",
              "WNM",
              "CM",
              "WCM"
            ],
            "type": "string",
            "description": "Chess title for the 'titledPlayers' mode.",
            "default": "GM"
          },
          "country": {
            "title": "Country",
            "enum": [
              "US",
              "IN",
              "RU",
              "DE",
              "GB",
              "FR",
              "ES",
              "IT",
              "NL",
              "PL",
              "UA",
              "TR",
              "BR",
              "AR",
              "CA",
              "AU",
              "CN",
              "JP",
              "KR",
              "PH",
              "ID",
              "VN",
              "MX",
              "CO",
              "PE",
              "CL",
              "VE",
              "NO",
              "SE",
              "FI",
              "DK",
              "IS",
              "IE",
              "PT",
              "BE",
              "CH",
              "AT",
              "CZ",
              "SK",
              "HU",
              "RO",
              "BG",
              "GR",
              "RS",
              "HR",
              "SI",
              "BA",
              "MK",
              "AL",
              "ME",
              "BY",
              "LT",
              "LV",
              "EE",
              "GE",
              "AM",
              "AZ",
              "KZ",
              "UZ",
              "IR",
              "IL",
              "SA",
              "AE",
              "EG",
              "MA",
              "DZ",
              "TN",
              "ZA",
              "NG",
              "KE",
              "TH",
              "MY",
              "SG",
              "PK",
              "BD",
              "LK",
              "NP",
              "NZ",
              "CU",
              "UY",
              "PY",
              "BO",
              "EC",
              "CR",
              "PA",
              "GT",
              "DO",
              "MD",
              "CY",
              "LU",
              "MT",
              "QA",
              "KW",
              "JO",
              "LB",
              "IQ",
              "SY",
              "MN"
            ],
            "type": "string",
            "description": "Country for the 'countryPlayers' mode (2-letter ISO code).",
            "default": "US"
          },
          "clubId": {
            "title": "Club ID/URL-ID",
            "type": "string",
            "description": "Chess.com club URL-id (e.g. chess-com-developer-community). Reserved for club members mode.",
            "default": ""
          },
          "maxResults": {
            "title": "Max Results",
            "minimum": 0,
            "type": "integer",
            "description": "Maximum number of rows to return (0 = unlimited). Keeps empty-input runs fast; raise to pull more.",
            "default": 1000
          },
          "proxyConfig": {
            "title": "Proxy Configuration",
            "type": "object",
            "description": "Apify proxy settings. Uses automatic proxy selection by default, with a direct-connection fallback for this clean public API.",
            "default": {
              "useApifyProxy": true
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}