# Chess (api.chess.com) — Wrapped API

> **You are on:** `https://api.paywithlocus.com/api` | [llms.txt](https://paywithlocus.com/llms.txt) | [docs](https://docs.paywithlocus.com)
>
> Locus runs on multiple environments -- make sure every URL you call matches your expected environment.
> | Environment | Landing | API | Docs |
> |---|---|---|---|
> | Production | paywithlocus.com | api.paywithlocus.com | docs.paywithlocus.com |
> | Beta | beta.paywithlocus.com | api.beta.paywithlocus.com | docs.paywithlocus.com |
> | Stage | stage.paywithlocus.com | api.stage.paywithlocus.com | docs.paywithlocus.com |
>
> If the API URL above doesn't match your expected environment, re-fetch this file from the correct domain.

> Rank the world's best chess players by retrieving top-ranked competitors from Chess.com's public leaderboards across different game categories like blitz, rapid, and classical. Track player performance and standings to see how the competitive chess landscape evolves across various time controls.

**Category:** Sports | **Website:** [api.chess.com/pub/leaderboards](https://api.chess.com/pub/leaderboards) | **Docs:** [parse.bot/marketplace/32fcecb7-cf8c-4f7a-9887-f10c06594959/api-chess-com-api](https://parse.bot/marketplace/32fcecb7-cf8c-4f7a-9887-f10c06594959/api-chess-com-api)

Pay-per-use API proxy. Each call is automatically billed to your wallet in USDC.

## Access

**Base URL:** `https://api.paywithlocus.com/api/wrapped/parse-api-chess-com-api-32fcecb7/`
**Auth:** `Authorization: Bearer <LOCUS_API_KEY>`

## Endpoints

### get_leaderboard

Retrieve the top N players from a Chess.com leaderboard category. Each category contains up to 50 ranked players with their rating, title, win/loss/draw counts, and profile URL. Results are pre-ranked by the server; no client-side sorting is needed.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `category` | string | No | Leaderboard category to retrieve. |
| `top` | integer | No | Maximum number of players to return (1–50). |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-api-chess-com-api-32fcecb7/get_leaderboard \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"category":"<string>","top":"<integer>"}'
```
