# Chess.com Player Scraper — Profile & Ratings (`devilscrapes/chess-com-scraper`) Actor

Get Chess.com player profiles, per-game-type ratings and optional recent games in one call. Feed a list of usernames and get combined rows as clean JSON, CSV or Excel — no manual API stitching.

- **URL**: https://apify.com/devilscrapes/chess-com-scraper.md
- **Developed by:** [DevilScrapes](https://apify.com/devilscrapes) (community)
- **Categories:** Developer tools
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

Pay per event

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.
Actors are written with capital "A".

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.
The best way to integrate Actors is as follows.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).

# README

<div align="center">
  <img src=".actor/icon.svg" width="160" alt="Devil Scrapes mark" />

## Chess.com Player Scraper — Profile & Ratings

**💰 $2.00 / 1 000 results**  ·  pay only for results  ·  no credit card to try

*Captchas are our cardio.* 😈

Get Chess.com player profiles, per-game-type ratings and optional recent games in one call. Feed a list of usernames and get combined rows as clean JSON, CSV or Excel — no manual API stitching.

</div>

***

### 🎯 What this scrapes

Chess.com's own Published-Data API splits one player across three or four separate endpoints — profile, per-game-type stats, and (if you want them) a whole month of games. This Actor calls all of them for you and hands back one row per username: profile fields, every rating record the player has (blitz, bullet, rapid, daily, tactics, puzzle rush, FIDE), and an optional recent-games slice, combined and normalised into one clean object.

### 🔥 What we handle for you

- 🛡️ We rotate real-browser fingerprints on every request so the target sees a browser, not a script.
- 🔁 We retry with exponential backoff on rate limits and server errors, honoring `Retry-After`.
- 🌐 We route requests through Apify Proxy and give you a one-click escalation to residential if you ever see blocks.
- 🧱 One bad or renamed username never crashes the run — it's skipped and named in the run summary.
- 🧊 Every row is Pydantic-validated: stable field names, ISO-8601 timestamps, no half-parsed JSON.
- 💰 You pay only for usernames actually processed. No data → no charge beyond the small warm-up fee.

### 💡 Use cases

- Chess streamers and content creators tracking their own rating history and follower counts.
- Coaches monitoring a roster of students' rating progress across game types.
- Chess analytics and stats sites building leaderboards or rating-trend charts.
- Tournament organisers vetting player ratings and activity before seeding a bracket.

### ⚙️ How to use it

1. Click **Try for free** at the top of the page.
2. Paste in the Chess.com usernames you want — the demo run ships with three real accounts prefilled.
3. Toggle **Include recent games** on if you also want the latest month of games (heavier, priced the same).
4. Click **Start**. Output streams into the run's dataset.
5. Export from **Storage → Dataset** as JSON, CSV, or Excel — or fetch via the API.

### 📥 Input

| Field | Type | Required | Default | Notes |
|---|---|:--:|---|---|
| `usernames` | `array` | yes | — | Chess.com usernames, 1-25 chars each, case-insensitive, deduplicated. One row per username. |
| `includeGames` | `boolean` | no | `false` | Also fetch the player's most recent month of games. Off by default — this is the heaviest, most egress-expensive call. |
| `gamesMonth` | `string` | no | — | Optional `YYYY-MM` month. Only used when `includeGames` is on; leave empty to use the most recent month available. |
| `maxItems` | `integer` | no | `100` | Stop after this many usernames. Each username processed is one billed result row. |
| `proxyConfiguration` | `object` | no | `{"useApifyProxy": true}` | Standard Apify proxy pool. Switch to Residential only if you see repeated blocks. |

#### Example input

```json
{
  "usernames": ["hikaru", "magnuscarlsen", "fabianocaruana"],
  "includeGames": false,
  "maxItems": 100,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

### 📤 Output

Every row is one dataset item — one username, fully combined.

| Field | Type | Notes |
|---|---|---|
| `username` | `string` | Normalised (lowercased) username, as requested. |
| `player_id` | `integer` | Chess.com internal player id. |
| `profile_url` | `string` | Public profile URL on chess.com. |
| `followers` | `integer` | Follower count. |
| `country_code` | `string` | Two-letter country code. |
| `last_online` / `joined` | `string` | ISO-8601 UTC timestamps. |
| `is_streamer` / `verified` / `league` | mixed | Account flags and league name. |
| `stats_chess_blitz`, `stats_chess_bullet`, `stats_chess_rapid`, … | `object` | `null` | One rating record per game type the player has played; `null` if never played. |
| `games_month_fetched` | `string` | `YYYY-MM` actually fetched; `null` unless `includeGames` was on. |
| `recent_games` | `array` | Populated only when `includeGames` is on. |
| `scraped_at` | `string` | ISO-8601 UTC timestamp at fetch time. |

#### Example output

```json
{
  "username": "hikaru",
  "player_id": 15448422,
  "profile_url": "https://www.chess.com/member/hikaru",
  "followers": 1250000,
  "country_code": "US",
  "league": "Legend",
  "stats_chess_blitz": {
    "last_rating": 3320,
    "best_rating": 3378,
    "wins": 9800,
    "losses": 3100,
    "draws": 450
  },
  "games_month_fetched": null,
  "recent_games": [],
  "scraped_at": "2026-09-04T06:20:00Z"
}
```

### 💰 Pricing

Pay-Per-Event — you pay only when these events fire:

| Event | USD | What it is |
|---|---:|---|
| `actor-start` | $0.20 | One-off warm-up charge per run |
| `result` | $0.002 | Per username processed (profile + stats + optional games) |

Example: 1 000 usernames at the rates above ≈ **$2.20**. No subscription, no minimum, no card to start — Apify gives every new account $5 of free credit.

### 🚧 Limitations

- Games fetch caps at one month per username per run — full multi-month backfill isn't in scope.
- Requests are throttled to stay courteous to a free public API, so a large `includeGames` run takes real time.
- Club, tournament, and leaderboard data are out of scope — this Actor is player-focused only.

### ❓ FAQ

**Do I need an API key?**

No. Chess.com's Published-Data API is public and keyless, so a run needs no credentials from you.

**What happens if a username doesn't exist?**

It's skipped, logged, and named in the run's status message. The run still finishes successfully — a batch of unknown usernames is a completed check, not a failure.

**A username I know is real still came back skipped — why?**

Two different things can produce a skip, and both are treated the same way: the username genuinely doesn't exist (renamed/deleted account), or Chess.com's own API returns a not-found response for one specific sub-endpoint on an otherwise-valid account — rare, but it happens on their side independent of anything we send. Either way we skip that one username, name it in the run's status message, and keep going — it never blocks the rest of your list.

**Why is `includeGames` off by default?**

Fetching a full month of games (with PGN move text) is the heaviest call this Actor makes. Leaving it off keeps a plain profile+ratings run fast and cheap; turn it on when you actually need the games.

### 💬 Your feedback

Spotted a bug, hit a weird edge case, or need a new field? Open an
issue on the Actor's **Issues** tab on Apify Console — we ship
fixes weekly and we read every report.

***

<div align="center">

Built by **[Devil Scrapes](https://apify.com/DevilScrapes)** 😈 — a small fleet of
opinionated public-data Actors. Honest pricing, real engineering, zero fine print.

</div>

# Actor input Schema

## `usernames` (type: `array`):

Chess.com usernames to look up (1-25 chars each, case-insensitive, deduplicated). One dataset row per username.

## `includeGames` (type: `boolean`):

When on, also fetch the player's most recent month of games (heaviest, most egress-expensive call). Off by default to keep a plain profile+stats run cheap.

## `gamesMonth` (type: `string`):

Optional <code>YYYY-MM</code> month to fetch games for. Only used when "Include recent games" is on. Leave empty to use the most recent month available.

## `maxItems` (type: `integer`):

Stop after this many usernames. Each username processed is one billed result row.

## `proxyConfiguration` (type: `object`):

Chess.com's Published-Data API is a public JSON API — the standard Apify proxy pool is sufficient. Only switch to Residential if you see repeated blocks.

## Actor input object example

```json
{
  "usernames": [
    "hikaru",
    "magnuscarlsen",
    "fabianocaruana"
  ],
  "includeGames": true,
  "gamesMonth": "2026-08",
  "maxItems": 5,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

# Actor output Schema

## `datasetItems` (type: `string`):

All dataset items as JSON.

## `datasetItemsCsv` (type: `string`):

Same data exported to CSV.

## `datasetView` (type: `string`):

Open the run dataset in the Console.

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "usernames": [
        "hikaru",
        "magnuscarlsen",
        "fabianocaruana"
    ],
    "includeGames": true,
    "gamesMonth": "2026-08",
    "maxItems": 5,
    "proxyConfiguration": {
        "useApifyProxy": true
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("devilscrapes/chess-com-scraper").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "usernames": [
        "hikaru",
        "magnuscarlsen",
        "fabianocaruana",
    ],
    "includeGames": True,
    "gamesMonth": "2026-08",
    "maxItems": 5,
    "proxyConfiguration": { "useApifyProxy": True },
}

# Run the Actor and wait for it to finish
run = client.actor("devilscrapes/chess-com-scraper").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "usernames": [
    "hikaru",
    "magnuscarlsen",
    "fabianocaruana"
  ],
  "includeGames": true,
  "gamesMonth": "2026-08",
  "maxItems": 5,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}' |
apify call devilscrapes/chess-com-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,devilscrapes/chess-com-scraper"
        }
    }
}

```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/4a0TWcrjetPdQLNgB/builds/QB294OsBLbzj3284N/openapi.json
