Skip to navigation

Tablebase lookup

Endpoint: <https://tablebase.lichess.ovh> Example: curl http://tablebase.lichess.ovh/standard?fen=4k3/6KP/8/8/8/8/7p/8_w_-_-_0_1

Query parameters

fenstringRequired
FEN of the position. Underscores allowed.
op1enumOptional

When to query the op1 tablebase. The current default is never. It is eventually going to be auxiliary, i.e., only when the position is not covered by one of the other tablebases.

Allowed values:

Response

The tablebase information for the position in standard chess.
categoryenumOptional

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 or nullOptional

DTZ50” with rounding or null if unknown

precise_dtzinteger or nullOptional

DTZ50” (only if guaranteed to be not rounded) or null if unknown

dtcinteger or nullOptional

Depth to Conversion: Moves to next capture or promotion (available only for Standard op1 positions with 8 pieces, i.e., positions where there is at least one pair of opposing pawns)

dtminteger or nullOptional

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

dtwinteger or nullOptional

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

checkmatebooleanOptional
stalematebooleanOptional
variant_winbooleanOptional
Only in chess variants
variant_lossbooleanOptional
Only in chess variants
insufficient_materialbooleanOptional
moveslist of objectsOptional
Information about legal moves, best first