# Chess.com API

> Returns Chess.com player profiles, ratings and records, monthly games, game archives, titled player lists and country names.

Category: Sports & Gaming. Region: global. 16 endpoints at `https://api.hoshime.com/v1/chesscom/<endpoint>`, `GET` with query parameters, answering `{data, meta}` (see https://hoshime.com/docs/responses.md). Reference: https://hoshime.com/docs/platforms/chesscom
## GET /v1/chesscom/player

A Chess.com player's profile: name, title, country, followers and last activity.

Scope: `social:read` · Units: 1 · Cached: 60 min

| Parameter | Type | Required | Description |
|---|---|---|---|
| `username` | string | yes | Chess.com username. (e.g. hikaru) |
| `tunnel` | string | no | Id or name of one of your tunnels: the call reads the source from the machine that runs `hoshime tunnel`, through its own connection. Fails with 409 tunnel_unavailable when no machine is connected. Cannot be combined with proxy. |
| `proxy` | string | no | Your own http:// or https:// proxy, such as http://user:pass@proxy.example.com:8080, on a public address. The call reads the source only through it. |
| `profileId` | string | no | Browser profile whose login the call sends (its cookies), so the source answers as that account. Without tunnel or proxy it leaves through the profile's own residential IP. Needs the browser:read scope. Data read logged in is for your account only. |

Response data fields: `country` (string), `followers` (integer (int64)), `id` (string), `joinedAt` (string), `lastOnlineAt` (string), `league` (string), `location` (string), `name` (string), `status` (string), `title` (string), `url` (string), `username` (string)

```bash
curl "https://api.hoshime.com/v1/chesscom/player?username=hikaru" -H "Authorization: Bearer $HOSHIME_TOKEN"
```

## GET /v1/chesscom/stats

A Chess.com player's current and best rating in each game mode, with the win, loss and draw record.

Scope: `social:read` · Units: 1 · Cached: 30 min

| Parameter | Type | Required | Description |
|---|---|---|---|
| `username` | string | yes | Chess.com username. (e.g. hikaru) |
| `tunnel` | string | no | Id or name of one of your tunnels: the call reads the source from the machine that runs `hoshime tunnel`, through its own connection. Fails with 409 tunnel_unavailable when no machine is connected. Cannot be combined with proxy. |
| `proxy` | string | no | Your own http:// or https:// proxy, such as http://user:pass@proxy.example.com:8080, on a public address. The call reads the source only through it. |
| `profileId` | string | no | Browser profile whose login the call sends (its cookies), so the source answers as that account. Without tunnel or proxy it leaves through the profile's own residential IP. Needs the browser:read scope. Data read logged in is for your account only. |

Response data fields: `modes` (map)

```bash
curl "https://api.hoshime.com/v1/chesscom/stats?username=hikaru" -H "Authorization: Bearer $HOSHIME_TOKEN"
```

## GET /v1/chesscom/games

The games a player finished in one month: players, results, ratings and time control.

Scope: `social:read` · Units: 1 · Cached: 60 min · Paginated: cursor

| Parameter | Type | Required | Description |
|---|---|---|---|
| `username` | string | yes | Chess.com username. (e.g. hikaru) |
| `year` | integer | yes | Year, such as 2024. (e.g. 2024) |
| `month` | integer | yes | Month, from 1 to 12. (e.g. 1) |
| `tunnel` | string | no | Id or name of one of your tunnels: the call reads the source from the machine that runs `hoshime tunnel`, through its own connection. Fails with 409 tunnel_unavailable when no machine is connected. Cannot be combined with proxy. |
| `proxy` | string | no | Your own http:// or https:// proxy, such as http://user:pass@proxy.example.com:8080, on a public address. The call reads the source only through it. |
| `profileId` | string | no | Browser profile whose login the call sends (its cookies), so the source answers as that account. Without tunnel or proxy it leaves through the profile's own residential IP. Needs the browser:read scope. Data read logged in is for your account only. |

Response data fields: `black` (GamePlayer), `black.rating` (integer (int64)), `black.result` (string), `black.username` (string), `endedAt` (string), `rules` (string), `timeClass` (string), `url` (string), `white` (GamePlayer), `white.rating` (integer (int64)), `white.result` (string), `white.username` (string)

```bash
curl "https://api.hoshime.com/v1/chesscom/games?username=hikaru&year=2024&month=1" -H "Authorization: Bearer $HOSHIME_TOKEN"
```

## GET /v1/chesscom/archives

The monthly game archives of a player, oldest first. Use games with a year and month to read one.

Scope: `social:read` · Units: 1 · Cached: 60 min · Paginated: cursor

| Parameter | Type | Required | Description |
|---|---|---|---|
| `username` | string | yes | Chess.com username. (e.g. hikaru) |
| `tunnel` | string | no | Id or name of one of your tunnels: the call reads the source from the machine that runs `hoshime tunnel`, through its own connection. Fails with 409 tunnel_unavailable when no machine is connected. Cannot be combined with proxy. |
| `proxy` | string | no | Your own http:// or https:// proxy, such as http://user:pass@proxy.example.com:8080, on a public address. The call reads the source only through it. |
| `profileId` | string | no | Browser profile whose login the call sends (its cookies), so the source answers as that account. Without tunnel or proxy it leaves through the profile's own residential IP. Needs the browser:read scope. Data read logged in is for your account only. |

Response data fields: `month` (integer (int64)), `url` (string), `year` (integer (int64))

```bash
curl "https://api.hoshime.com/v1/chesscom/archives?username=hikaru" -H "Authorization: Bearer $HOSHIME_TOKEN"
```

## GET /v1/chesscom/titled

Usernames of the players who hold a title, such as GM for grandmasters.

Scope: `social:read` · Units: 1 · Cached: 360 min · Paginated: cursor

| Parameter | Type | Required | Description |
|---|---|---|---|
| `title` | string | yes | Title code, such as GM. (one of GM, WGM, IM, WIM, FM, WFM, NM, WCM, WNM, CM; e.g. GM) |
| `tunnel` | string | no | Id or name of one of your tunnels: the call reads the source from the machine that runs `hoshime tunnel`, through its own connection. Fails with 409 tunnel_unavailable when no machine is connected. Cannot be combined with proxy. |
| `proxy` | string | no | Your own http:// or https:// proxy, such as http://user:pass@proxy.example.com:8080, on a public address. The call reads the source only through it. |
| `profileId` | string | no | Browser profile whose login the call sends (its cookies), so the source answers as that account. Without tunnel or proxy it leaves through the profile's own residential IP. Needs the browser:read scope. Data read logged in is for your account only. |

Response data fields: `username` (string)

```bash
curl "https://api.hoshime.com/v1/chesscom/titled?title=GM" -H "Authorization: Bearer $HOSHIME_TOKEN"
```

## GET /v1/chesscom/country

A country of Chess.com by its two-letter code: its name.

Scope: `social:read` · Units: 1 · Cached: 1440 min

| Parameter | Type | Required | Description |
|---|---|---|---|
| `code` | string | yes | Two-letter country code, such as US or ID. (e.g. US) |
| `tunnel` | string | no | Id or name of one of your tunnels: the call reads the source from the machine that runs `hoshime tunnel`, through its own connection. Fails with 409 tunnel_unavailable when no machine is connected. Cannot be combined with proxy. |
| `proxy` | string | no | Your own http:// or https:// proxy, such as http://user:pass@proxy.example.com:8080, on a public address. The call reads the source only through it. |
| `profileId` | string | no | Browser profile whose login the call sends (its cookies), so the source answers as that account. Without tunnel or proxy it leaves through the profile's own residential IP. Needs the browser:read scope. Data read logged in is for your account only. |

Response data fields: `code` (string), `name` (string)

```bash
curl "https://api.hoshime.com/v1/chesscom/country?code=US" -H "Authorization: Bearer $HOSHIME_TOKEN"
```

## GET /v1/chesscom/countryPlayers

Usernames of the players who live in a country, in alphabetical order.

Scope: `social:read` · Units: 1 · Cached: 360 min · Paginated: cursor

| Parameter | Type | Required | Description |
|---|---|---|---|
| `code` | string | yes | Two-letter country code, such as US or ID. (e.g. US) |
| `tunnel` | string | no | Id or name of one of your tunnels: the call reads the source from the machine that runs `hoshime tunnel`, through its own connection. Fails with 409 tunnel_unavailable when no machine is connected. Cannot be combined with proxy. |
| `proxy` | string | no | Your own http:// or https:// proxy, such as http://user:pass@proxy.example.com:8080, on a public address. The call reads the source only through it. |
| `profileId` | string | no | Browser profile whose login the call sends (its cookies), so the source answers as that account. Without tunnel or proxy it leaves through the profile's own residential IP. Needs the browser:read scope. Data read logged in is for your account only. |

Response data fields: `username` (string)

```bash
curl "https://api.hoshime.com/v1/chesscom/countryPlayers?code=US" -H "Authorization: Bearer $HOSHIME_TOKEN"
```

## GET /v1/chesscom/leaderboards

The top players of every Chess.com leaderboard: daily, rapid, blitz, bullet, tactics and more.

Scope: `social:read` · Units: 1 · Cached: 30 min · Paginated: cursor

| Parameter | Type | Required | Description |
|---|---|---|---|
| `tunnel` | string | no | Id or name of one of your tunnels: the call reads the source from the machine that runs `hoshime tunnel`, through its own connection. Fails with 409 tunnel_unavailable when no machine is connected. Cannot be combined with proxy. |
| `proxy` | string | no | Your own http:// or https:// proxy, such as http://user:pass@proxy.example.com:8080, on a public address. The call reads the source only through it. |
| `profileId` | string | no | Browser profile whose login the call sends (its cookies), so the source answers as that account. Without tunnel or proxy it leaves through the profile's own residential IP. Needs the browser:read scope. Data read logged in is for your account only. |

Response data fields: `category` (string), `country` (string), `name` (string), `rank` (integer (int64)), `score` (integer (int64)), `title` (string), `url` (string), `username` (string)

```bash
curl "https://api.hoshime.com/v1/chesscom/leaderboards" -H "Authorization: Bearer $HOSHIME_TOKEN"
```

## GET /v1/chesscom/streamers

Chess.com streamers with their Twitch or YouTube channel and whether they are live now.

Scope: `social:read` · Units: 1 · Cached: 5 min · Paginated: cursor

| Parameter | Type | Required | Description |
|---|---|---|---|
| `tunnel` | string | no | Id or name of one of your tunnels: the call reads the source from the machine that runs `hoshime tunnel`, through its own connection. Fails with 409 tunnel_unavailable when no machine is connected. Cannot be combined with proxy. |
| `proxy` | string | no | Your own http:// or https:// proxy, such as http://user:pass@proxy.example.com:8080, on a public address. The call reads the source only through it. |
| `profileId` | string | no | Browser profile whose login the call sends (its cookies), so the source answers as that account. Without tunnel or proxy it leaves through the profile's own residential IP. Needs the browser:read scope. Data read logged in is for your account only. |

Response data fields: `avatar` (string), `isCommunityStreamer` (boolean), `isLive` (boolean), `twitchUrl` (string), `url` (string), `username` (string)

```bash
curl "https://api.hoshime.com/v1/chesscom/streamers" -H "Authorization: Bearer $HOSHIME_TOKEN"
```

## GET /v1/chesscom/dailyPuzzle

Chess.com's puzzle of the day: its title, position in FEN and PGN, and the page to solve it.

Scope: `social:read` · Units: 1 · Cached: 30 min

| Parameter | Type | Required | Description |
|---|---|---|---|
| `tunnel` | string | no | Id or name of one of your tunnels: the call reads the source from the machine that runs `hoshime tunnel`, through its own connection. Fails with 409 tunnel_unavailable when no machine is connected. Cannot be combined with proxy. |
| `proxy` | string | no | Your own http:// or https:// proxy, such as http://user:pass@proxy.example.com:8080, on a public address. The call reads the source only through it. |
| `profileId` | string | no | Browser profile whose login the call sends (its cookies), so the source answers as that account. Without tunnel or proxy it leaves through the profile's own residential IP. Needs the browser:read scope. Data read logged in is for your account only. |

Response data fields: `fen` (string), `image` (string), `pgn` (string), `publishedAt` (string), `title` (string), `url` (string)

```bash
curl "https://api.hoshime.com/v1/chesscom/dailyPuzzle" -H "Authorization: Bearer $HOSHIME_TOKEN"
```

## GET /v1/chesscom/randomPuzzle

A random puzzle from Chess.com's daily puzzle archive, with its position and PGN.

Scope: `social:read` · Units: 1

| Parameter | Type | Required | Description |
|---|---|---|---|
| `tunnel` | string | no | Id or name of one of your tunnels: the call reads the source from the machine that runs `hoshime tunnel`, through its own connection. Fails with 409 tunnel_unavailable when no machine is connected. Cannot be combined with proxy. |
| `proxy` | string | no | Your own http:// or https:// proxy, such as http://user:pass@proxy.example.com:8080, on a public address. The call reads the source only through it. |
| `profileId` | string | no | Browser profile whose login the call sends (its cookies), so the source answers as that account. Without tunnel or proxy it leaves through the profile's own residential IP. Needs the browser:read scope. Data read logged in is for your account only. |

Response data fields: `fen` (string), `image` (string), `pgn` (string), `publishedAt` (string), `title` (string), `url` (string)

```bash
curl "https://api.hoshime.com/v1/chesscom/randomPuzzle" -H "Authorization: Bearer $HOSHIME_TOKEN"
```

## GET /v1/chesscom/clubs

The clubs a Chess.com player has joined, with their member count and last activity.

Scope: `social:read` · Units: 1 · Cached: 60 min · Paginated: cursor

| Parameter | Type | Required | Description |
|---|---|---|---|
| `username` | string | yes | Chess.com username. (e.g. hikaru) |
| `tunnel` | string | no | Id or name of one of your tunnels: the call reads the source from the machine that runs `hoshime tunnel`, through its own connection. Fails with 409 tunnel_unavailable when no machine is connected. Cannot be combined with proxy. |
| `proxy` | string | no | Your own http:// or https:// proxy, such as http://user:pass@proxy.example.com:8080, on a public address. The call reads the source only through it. |
| `profileId` | string | no | Browser profile whose login the call sends (its cookies), so the source answers as that account. Without tunnel or proxy it leaves through the profile's own residential IP. Needs the browser:read scope. Data read logged in is for your account only. |

Response data fields: `icon` (string), `joinedAt` (string), `lastActiveAt` (string), `name` (string), `url` (string)

```bash
curl "https://api.hoshime.com/v1/chesscom/clubs?username=hikaru" -H "Authorization: Bearer $HOSHIME_TOKEN"
```

## GET /v1/chesscom/club

One Chess.com club by its url id, such as chess-com-developer-community.

Scope: `social:read` · Units: 1 · Cached: 60 min

| Parameter | Type | Required | Description |
|---|---|---|---|
| `id` | string | yes | Club url id, the last part of its club page address. (e.g. chess-com-developer-community) |
| `tunnel` | string | no | Id or name of one of your tunnels: the call reads the source from the machine that runs `hoshime tunnel`, through its own connection. Fails with 409 tunnel_unavailable when no machine is connected. Cannot be combined with proxy. |
| `proxy` | string | no | Your own http:// or https:// proxy, such as http://user:pass@proxy.example.com:8080, on a public address. The call reads the source only through it. |
| `profileId` | string | no | Browser profile whose login the call sends (its cookies), so the source answers as that account. Without tunnel or proxy it leaves through the profile's own residential IP. Needs the browser:read scope. Data read logged in is for your account only. |

Response data fields: `country` (string), `createdAt` (string), `description` (string), `icon` (string), `id` (string), `lastActiveAt` (string), `membersCount` (integer (int64)), `name` (string), `url` (string), `visibility` (string)

```bash
curl "https://api.hoshime.com/v1/chesscom/club?id=chess-com-developer-community" -H "Authorization: Bearer $HOSHIME_TOKEN"
```

## GET /v1/chesscom/clubMembers

All-time members of one Chess.com club by its url id, with the date each one joined.

Scope: `social:read` · Units: 1 · Cached: 60 min · Paginated: cursor

| Parameter | Type | Required | Description |
|---|---|---|---|
| `id` | string | yes | Club url id, the last part of its club page address, such as saint-louis-chess-club. (e.g. saint-louis-chess-club) |
| `tunnel` | string | no | Id or name of one of your tunnels: the call reads the source from the machine that runs `hoshime tunnel`, through its own connection. Fails with 409 tunnel_unavailable when no machine is connected. Cannot be combined with proxy. |
| `proxy` | string | no | Your own http:// or https:// proxy, such as http://user:pass@proxy.example.com:8080, on a public address. The call reads the source only through it. |
| `profileId` | string | no | Browser profile whose login the call sends (its cookies), so the source answers as that account. Without tunnel or proxy it leaves through the profile's own residential IP. Needs the browser:read scope. Data read logged in is for your account only. |

Response data fields: `joinedAt` (string), `username` (string)

```bash
curl "https://api.hoshime.com/v1/chesscom/clubMembers?id=saint-louis-chess-club" -H "Authorization: Bearer $HOSHIME_TOKEN"
```

## GET /v1/chesscom/playerTournaments

The Chess.com tournaments a player finished, is playing or is registered for, with placement, record and time control.

Scope: `social:read` · Units: 1 · Cached: 30 min · Paginated: cursor

| Parameter | Type | Required | Description |
|---|---|---|---|
| `username` | string | yes | Chess.com username. (e.g. hikaru) |
| `tunnel` | string | no | Id or name of one of your tunnels: the call reads the source from the machine that runs `hoshime tunnel`, through its own connection. Fails with 409 tunnel_unavailable when no machine is connected. Cannot be combined with proxy. |
| `proxy` | string | no | Your own http:// or https:// proxy, such as http://user:pass@proxy.example.com:8080, on a public address. The call reads the source only through it. |
| `profileId` | string | no | Browser profile whose login the call sends (its cookies), so the source answers as that account. Without tunnel or proxy it leaves through the profile's own residential IP. Needs the browser:read scope. Data read logged in is for your account only. |

Response data fields: `draws` (integer (int64)), `id` (string), `losses` (integer (int64)), `placement` (integer (int64)), `status` (string), `timeClass` (string), `totalPlayers` (integer (int64)), `type` (string), `url` (string), `wins` (integer (int64))

```bash
curl "https://api.hoshime.com/v1/chesscom/playerTournaments?username=hikaru" -H "Authorization: Bearer $HOSHIME_TOKEN"
```

## GET /v1/chesscom/tournament

One Chess.com tournament by its url id: its name, status, format, time control, rounds and number of registered players.

Scope: `social:read` · Units: 1 · Cached: 60 min

| Parameter | Type | Required | Description |
|---|---|---|---|
| `id` | string | yes | Tournament url id, the last part of its tournament page address, such as -masterclass-titled-tuesday-blitz-862996. (e.g. -masterclass-titled-tuesday-blitz-862996) |
| `tunnel` | string | no | Id or name of one of your tunnels: the call reads the source from the machine that runs `hoshime tunnel`, through its own connection. Fails with 409 tunnel_unavailable when no machine is connected. Cannot be combined with proxy. |
| `proxy` | string | no | Your own http:// or https:// proxy, such as http://user:pass@proxy.example.com:8080, on a public address. The call reads the source only through it. |
| `profileId` | string | no | Browser profile whose login the call sends (its cookies), so the source answers as that account. Without tunnel or proxy it leaves through the profile's own residential IP. Needs the browser:read scope. Data read logged in is for your account only. |

Response data fields: `creator` (string), `finishedAt` (string), `id` (string), `isRated` (boolean), `name` (string), `registeredPlayers` (integer (int64)), `rounds` (integer (int64)), `rules` (string), `startedAt` (string), `status` (string), `timeClass` (string), `timeControl` (string), `type` (string), `url` (string)

```bash
curl "https://api.hoshime.com/v1/chesscom/tournament?id=-masterclass-titled-tuesday-blitz-862996" -H "Authorization: Bearer $HOSHIME_TOKEN"
```
