# Lichess User Profile Snapshot

> Lichess User Profile Snapshot is a paid API for AI agents from chess402.vercel.app, paid per call via x402, $0.001/call, status unknown (last checked 2026-09-15).

Retrieves a Lichess user profile including ratings per time control, country, title, online status, and game counts.

## Facts

- Endpoint: POST https://chess402.vercel.app/api/user
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/chess402-vercel-app-4209938d
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_9ork69lZhMRWqrsRwJfOk

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability chess402-vercel-app-4209938d -d '<json body>'
```

Example prompt: Pull up the Lichess profile for user 'DrNykterstein' — I want to see their blitz, rapid, and classical ratings, their title, country, and whether they're currently online.

## When to prefer this

Use this endpoint when you need a comprehensive profile snapshot for a specific Lichess user, including their ratings across all time controls, title, country, and activity counts. Prefer this over the daily puzzle or Stockfish endpoints when the goal is player identity or rating information rather than game analysis or puzzles.

## Known failure modes

- Username not found — returns error if the Lichess user does not exist
- Rate limiting — too many requests may result in throttling
- Invalid input — missing or malformed username field
- Lichess API unavailable — upstream service downtime causes failure

## How this service works

Lichess user profile snapshot: ratings per perf, country, title, online status, counts.

## Output

Returns a snapshot of the Lichess user profile including per-performance ratings (bullet, blitz, rapid, classical, etc.), the player's country, official title (e.g. GM, IM), current online status, and counts of games played across categories.

## Example request

```json
{
 "username": "DrNykterstein"
}
```

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "username": {
   "type": "string",
   "pattern": "^[A-Za-z0-9_-]+$",
   "maxLength": 30,
   "minLength": 2,
   "description": "Lichess username (case-insensitive)."
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "id": "drnykterstein",
  "url": "https://lichess.org/@/DrNykterstein",
  "count": {
   "all": 10450,
   "win": 6000,
   "draw": 2450,
   "loss": 2000,
   "rated": 9800
  },
  "perfs": {
   "blitz": {
    "rd": 45,
    "prog": 12,
    "prov": false,
    "games": 1234,
    "rating": 3153
   },
   "rapid": {
    "rd": 60,
    "prog": 0,
    "prov": false,
    "games": 89,
    "rating": 2881
   },
   "bullet": {
    "rd": 40,
    "prog": -5,
    "prov": false,
    "games": 5678,
    "rating": 3243
   }
  },
  "title": "GM",
  "online": false,
  "patron": false,
  "seenAt": 1700000000000,
  "profile": {
   "flag": "NO"
  },
  "playTime": {
   "tv": 0,
   "total": 1234567
  },
  "username": "DrNykterstein",
  "createdAt": 1389027719000
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/chess402-vercel-app-4209938d/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from chess402.vercel.app](https://www.zero.xyz/host/chess402.vercel.app/llms.txt)
