v3

latestOpenAPI 3.1.0AGPL-3.0-or-later2026-07-311871891.1 MB
Tablebase

Tablebase lookup

Endpoint: https://tablebase.lichess.org

Example: curl http://tablebase.lichess.org/standard?fen=4k3/6KP/8/8/8/8/7p/8_w_-_-_0_1

get/standard

Query parameters

fenstring required

X-FEN of the position. Underscores allowed.

dtc'never' | 'auxiliary' | 'always'

When to query the tablebase for dtc values. The default is auxiliary, i.e., only when the position is not covered by one of the other tablebases.

Response

The tablebase information for the position in standard chess.

category'win' | 'unknown' | 'syzygy-win' | 'maybe-win' | 'cursed-win' | 'draw' | 'blessed-loss' | 'maybe-loss' | 'syzygy-loss' | 'loss' required

cursed-win and blessed-loss means the 50-move rule prevents the decisive result.

syzygy-win and syzygy-loss means exact result is unknown due to DTZ rounding, i.e., the win or loss could also be prevented by the 50-move rule if the user has deviated from the tablebase recommendation since the last pawn move or capture.

maybe-win and maybe-loss means the result with regard to the 50-move rule is unknown, because DTZ is unknown and the DTC tablebase does not guarantee to reach a zeroing move as soon as possible.

dtzinteger nullable

DTZ50'' with rounding in plies (for Standard chess positions with not more than 7 pieces and variant positions not more than 6 pieces)

precise_dtzinteger nullable

DTZ50'' in plies, only if guaranteed to not be rounded, or absent if unknown

dtcinteger nullable

Depth to Conversion: Moves to next capture, promotion, or checkmate. Available for:

  • Standard chess positions with 8 pieces, more than one pawn of material value for each side, and at least one pair of opposing pawns, short op1, if query parameter dtc is auxiliary or always.
  • Some standard chess positions with up to 7 pieces, if query parameter dtc is always. Work in progress.
dtminteger nullable

Depth To Mate: Plies to mate (available only for Standard positions with not more than 6 pieces)

dtwinteger nullable

Depth To Win: Plies to win (available only for Antichess positions with not more than 4 pieces)

checkmateboolean
stalemateboolean
variant_winboolean

Only in chess variants

variant_lossboolean

Only in chess variants

insufficient_materialboolean

Example response

{
  "dtz": 1,
  "precise_dtz": 1,
  "dtc": null,
  "dtm": 17,
  "dtw": null,
  "checkmate": false,
  "stalemate": false,
  "variant_win": false,
  "variant_loss": false,
  "insufficient_material": false,
  "category": "win",
  "moves": [
    {
      "uci": "h7h8q",
      "san": "h8=Q+",
      "dtz": -2,
      "precise_dtz": -2,
      "dtc": null,
      "dtm": -16,
      "dtw": null,
      "zeroing": true,
      "checkmate": false,
      "stalemate": false,
      "variant_win": false,
      "variant_loss": false,
      "insufficient_material": false,
      "category": "loss"
    }
  ]
}