org.lichess.puzzle.getRandom

Get a random chess puzzle. Optionally filter by a target rating (a random puzzle within 100 of it is returned) and/or themes (matching at least one). With no parameters, returns a truly random puzzle from the dataset with no filtering.

Repository @pds.dad did:plc:rnpkyqnmsw4ipey6eotbdnnf not from the namespace authority
Details · query
Kindquery
Authoritypuzzle.lichess.org
Indexed

Query

query · GET

Parameters

query string

rating

integer

a target Glicko-2 rating; a random puzzle whose rating is within 100 of this value is returned. When omitted, rating is not filtered.

  • minimum: 0

themes

array

restrict the result to puzzles matching at least one of these themes (e.g. "fork", "endgame"). When omitted, themes are not filtered.

itemsstring

Output

application/json

Errors

PuzzleNotFound

No puzzle matches the given rating and/or theme filters.

Similar lexicons

semantic match

Lexicons whose schemas describe something close to this one. Check them before publishing a new one that overlaps.

  • org.lichess.puzzle.getThemes

    query not from the namespace authority

    List all puzzle themes with their display names and descriptions. The keys returned here are the values accepted by the getRandom themes filter.

  • org.lichess.puzzle.getById

    query not from the namespace authority

    Get a chess puzzle by its id.