Lichess

App · Gaming · 4 actions

Look up Lichess players, their recent games and ratings, the daily puzzle, and the leaderboards. No account needed.

Actions

ActionWhat it does
Get a leaderboardFetch the top-rated Lichess players for one speed or variant.
Get a playerLook up a Lichess player's public profile, ratings, and win/loss record.
Get the daily puzzleFetch today's Lichess puzzle and its solution.
List a player's gamesList a Lichess player's most recent games, newest first.

Get a leaderboard

Fetch the top-rated Lichess players for one speed or variant.

Inputs

Speed or variantperf_typetext
Which leaderboard to read. Lichess doesn't rank correspondence or puzzles.One of: ultraBullet, bullet, blitz, rapid, classical, chess960, crazyhouse, antichess, atomic, horde, and 3 more. Default: blitz.
How many playerscountnumber
How many players to return (1-100).From 1 to 100. Default: 10.

Outputs

perf_typetext
The speed or variant this leaderboard covers
playerslist
The top players, highest rated first
Example output
{
  "perf_type": "blitz",
  "players": [
    {
      "rating": 2466,
      "title": "WFM",
      "username": "Lola"
    },
    {
      "rating": 2428,
      "title": "IM",
      "username": "Ana"
    }
  ]
}

Get a player

Look up a Lichess player's public profile, ratings, and win/loss record.

Inputs

UsernameusernametextRequired
The Lichess username, for example 'DrNykterstein'.

Outputs

drawsnumber
Games drawn
lossesnumber
Games lost
ratingsobject
Current rating per speed and variant -- for example {'blitz': 1018, 'rapid': 1056}
titletext
The player's chess title such as 'GM' or 'IM', or empty if they have none
total_gamesnumber
How many games the player has finished
urltext
Link to the player's Lichess profile
user_idtext
The player's Lichess ID (lowercased username)
usernametext
The player's username, as they capitalize it
winsnumber
Games won
Example output
{
  "draws": 683,
  "losses": 4558,
  "ratings": {
    "blitz": 1018,
    "bullet": 1076,
    "rapid": 1056
  },
  "title": "",
  "total_games": 9824,
  "url": "https://lichess.org/@/Mary",
  "user_id": "mary",
  "username": "Mary",
  "wins": 4583
}

Get the daily puzzle

Fetch today's Lichess puzzle and its solution.

Inputs

None.

Outputs

game_idtext
ID of the game the puzzle was taken from
pgntext
Moves of the source game, in PGN notation
playsnumber
How many times the puzzle has been attempted
puzzle_idtext
The puzzle's ID
ratingnumber
The puzzle's difficulty rating
solutionlist
The winning line, as moves in UCI notation such as 'c4d3'
themeslist
Tactical themes, for example 'endgame' or 'crushing'
urltext
Link to solve the puzzle on Lichess
Example output
{
  "game_id": "bcZBqQrZ",
  "pgn": "g3 e5 Bg2 d5 d3 Nc6 c4 Be6 Nc3 Nf6",
  "plays": 42035,
  "puzzle_id": "IFy4T",
  "rating": 1869,
  "solution": [
    "c4d3",
    "e4d3",
    "e1e5"
  ],
  "themes": [
    "endgame",
    "crushing",
    "short"
  ],
  "url": "https://lichess.org/training/IFy4T"
}

List a player's games

List a Lichess player's most recent games, newest first. Unlike the other Lichess actions, this one requires a personal API access token: see the connection's setup instructions.

Inputs

UsernameusernametextRequired
The Lichess username, for example 'DrNykterstein'.
How many gamescountnumber
How many games to return (1-100).From 1 to 100. Default: 10.
Rated games onlyrated_onlytrue/false
Leave out casual games. Off by default.Default: false.

Outputs

gameslist
The player's recent games, newest first
Example output
{
  "games": [
    {
      "black": "Lola",
      "created_at": 1782934233712,
      "game_id": "q7ZvsdUF",
      "opening": "Sicilian Defense: Najdorf Variation",
      "outcome": "mate",
      "rated": true,
      "speed": "blitz",
      "url": "https://lichess.org/q7ZvsdUF",
      "white": "Mary",
      "winner": "white"
    }
  ]
}

On this page