{
  "openapi": "3.0.1",
  "info": {
    "title": "Lichess Scraper · Players, Games, Ratings & Tournaments",
    "description": "Scrape Lichess player profiles, 13 game variant rating leaderboards (bullet, blitz, rapid, classical, chess960, ultraBullet, etc.), FIDE titles, total games, play time, and profile metadata. Fast HTTP API scraper charging per returned record with tiered pricing.",
    "version": "1.0",
    "x-build-id": "P09ddsYEMyXw0A2aO"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/reapx~lichess-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-reapx-lichess-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/reapx~lichess-scraper/runs": {
      "post": {
        "operationId": "runs-sync-reapx-lichess-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/reapx~lichess-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-reapx-lichess-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",
        "required": [
          "maxItems"
        ],
        "properties": {
          "perfType": {
            "title": "Performance Variant",
            "enum": [
              "bullet",
              "blitz",
              "rapid",
              "classical",
              "ultraBullet",
              "crazyhouse",
              "chess960",
              "kingOfTheHill",
              "threeCheck",
              "antichess",
              "atomic",
              "horde",
              "racingKings",
              "all"
            ],
            "type": "string",
            "description": "<b>Game variant filter.</b> Select the Lichess game mode or variant leaderboard to scrape top players from (e.g. bullet, blitz, rapid, classical, chess960, ultraBullet).<br><br><b>Consequence:</b> Determines which leaderboard is scraped. Selecting 'all' checks leaderboards across all 13 supported variants.<br><br><b>Empty/Default:</b> Defaults to <code>bullet</code>."
          },
          "titleFilter": {
            "title": "Title Filter",
            "enum": [
              "all",
              "GM",
              "WGM",
              "IM",
              "WIM",
              "FM",
              "WFM",
              "CM",
              "WCM",
              "BOT"
            ],
            "type": "string",
            "description": "<b>Title filter.</b> Filter player profiles by official FIDE or Lichess title (e.g., Grandmaster GM, Woman Grandmaster WGM, International Master IM, FIDE Master FM, or BOT).<br><br><b>Consequence:</b> Restricts returned player rows to only accounts possessing the specified title.<br><br><b>Empty/Default:</b> Leave as <code>all</code> to return all players regardless of title."
          },
          "countryFilter": {
            "title": "Country Filter (ISO Code)",
            "pattern": "^[A-Z]{2}$|^$",
            "type": "string",
            "description": "<b>Country filter.</b> Filter players by their ISO two-letter country code (e.g. US, NO, IN, FR, DE, ES, RU, CN).<br><br><b>Consequence:</b> Filters player profile results to players matching the given country.<br><br><b>Empty:</b> Leave empty (default) to include players from all countries without restriction."
          },
          "minRating": {
            "title": "Minimum Rating",
            "minimum": 0,
            "maximum": 4000,
            "type": "integer",
            "description": "<b>Minimum rating limit.</b> Minimum rating threshold in the selected variant for players to be included in the dataset.<br><br><b>Consequence:</b> Higher values filter out lower-rated players, reducing total rows returned and lowering run cost.<br><br><b>Empty/Default:</b> Set to <code>0</code> for no minimum threshold.",
            "default": 0
          },
          "maxRating": {
            "title": "Maximum Rating",
            "minimum": 0,
            "maximum": 4000,
            "type": "integer",
            "description": "<b>Maximum rating limit.</b> Maximum rating ceiling for players to be included in the dataset.<br><br><b>Consequence:</b> Excludes players rated above this threshold.<br><br><b>Empty/Default:</b> Set to <code>4000</code> for no upper rating ceiling.<br><br>The higher the number, the longer the run takes and the more you are charged, because you pay per row returned.",
            "default": 4000
          },
          "usernames": {
            "title": "Specific Usernames",
            "type": "array",
            "description": "<b>Target Lichess usernames.</b> Specific Lichess handles/usernames to scrape directly.<br><br><b>Consequence:</b> If provided, the scraper fetches full profile and game stats for these exact users instead of scanning leaderboards.<br><br><b>Empty:</b> Leave empty (default) to discover top players via leaderboards.",
            "items": {
              "type": "string"
            }
          },
          "teamId": {
            "title": "Lichess Team ID",
            "type": "string",
            "description": "<b>Lichess Team ID.</b> Optional Lichess team ID (slug) to fetch members from (e.g. <code>titled-players</code> or <code>all-grandmasters</code>).<br><br><b>Consequence:</b> Scrapes members belonging to the specified team.<br><br><b>Empty:</b> Leave empty (default) to scrape main platform leaderboards."
          },
          "maxItems": {
            "title": "Maximum Players Limit",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "<b>Maximum player records to return.</b> Hard cap on the total number of player records scraped and returned in the dataset.<br><br><b>Consequence:</b> The higher the limit, the longer the run takes and the more pay-per-event records are charged.<br><br><b>Empty/Default:</b> Defaults to <code>100</code> players.<br><br>The higher the number, the longer the run takes and the more you are charged, because you pay per row returned.",
            "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
                  }
                }
              },
              "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}