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.
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"
}
]
}