Lichess website screenshot

Lichess

Lichess is a free, ad-free, open-source online chess server operated by a French nonprofit and powered entirely by volunteers and donations. It serves millions of games per day with live play, tournaments, puzzles, studies, broadcasts, analysis, and a public API. The server (lila), engine library (scalachess), mobile app, board UI (chessground), and distributed Stockfish analysis network (fishnet) are all open source under AGPL-3.0, MIT, and GPL-3.0 licenses. The Lichess API provides 185 documented operations across 23 functional areas including Account, Users, Games, Puzzles, Teams, Board, Bot, Challenges, Arena and Swiss Tournaments, Simuls, Studies, Broadcasts, Messaging, OAuth, FIDE, Opening Explorer, Tablebase, External Engine, and Cloud Analysis, with comprehensive ND-JSON streaming support.

1 APIs 26 Features
ChessGamesOpen SourceNonprofitTournamentsPuzzlesBotsStreamingND-JSONOAuth

APIs

Lichess API

The Lichess API is a comprehensive REST and streaming API covering account, users, games, puzzles, teams, challenges, board and bot play, Arena and Swiss tournaments, simuls, st...

Collections

Pricing Plans

Lichess Plans Pricing

2 plans

PLANS

Rate Limits

Lichess Rate Limits

16 limits

RATE LIMITS

Features

Free, ad-free, open-source online chess server operated by a French nonprofit, funded by donations
Full OpenAPI 3.1 specification with 185 operations across 23 tags published at github.com/lichess-org/api
Account, users, relations, and messaging endpoints for managing players and social graph
Games REST and ND-JSON streaming endpoints for current and historical games, including PGN export
TV channels and current best games for live broadcast and embedding
Daily puzzle, puzzle by ID, puzzle activity, and puzzle dashboard endpoints
Teams API for creating, joining, listing, and managing chess teams
Board API for playing real-time games with physical boards and third-party clients using regular accounts
Bot API for programmatic play by accounts upgraded to bot status, with streaming game state
Challenges API for issuing, accepting, declining, and listing challenges including AI and open challenges
Bulk pairings for programmatically creating many games at once
Arena and Swiss tournament APIs including create, update, terminate, join, withdraw, and result export
Simuls endpoint for current and upcoming simultaneous exhibitions
Studies API for exporting and importing study chapters in PGN
Broadcasts API for creating tournaments, rounds, and pushing PGN updates for live event coverage
FIDE endpoints exposing FIDE player and federation data
Opening Explorer with Masters database, Lichess database, and player database lookups
Tablebase endpoint for 7-piece Syzygy endgame results
External Engine API enabling user-hosted engines to power analysis on lichess.org/analysis
Cloud evaluation lookup for previously evaluated positions
OAuth 2.0 Authorization Code Flow with PKCE plus personal access tokens, long-lived (one year typical)
Newline-delimited JSON (ND-JSON) streaming for events, games, and TV feeds
Distributed Stockfish analysis network (fishnet) and open client-side Stockfish WASM builds
Public dataset exports of all rated games, puzzles, and computer evaluations at database.lichess.org
Official community SDKs in Python (berserk), Java (chariot), JavaScript/TypeScript (equine), .NET, and more
AGPL-3.0 licensed server (lila), with MIT scalachess engine library and GPL-3.0 mobile and tooling code

Event Specifications

Lichess Streaming API

AsyncAPI description of Lichess's streaming surface. Lichess does NOT expose its public real-time API over WebSocket; instead, streams are delivered over plain HTTPS using chunk...

ASYNCAPI

Semantic Vocabularies

Lichess Context

55 classes · 16 properties

JSON-LD

API Governance Rules

Lichess API Rules

11 rules · 4 errors 6 warnings 1 info

SPECTRAL

Resources

🌐
Portal
Portal
🔗
Documentation
Documentation
🔗
Sandbox
Sandbox
🔗
Sandbox
Sandbox
👥
GitHubOrganization
GitHubOrganization
💻
SourceCode
SourceCode
💻
SourceCode
SourceCode
💻
SourceCode
SourceCode
💻
SourceCode
SourceCode
💻
SourceCode
SourceCode
💻
SourceCode
SourceCode
📦
SDKs
SDKs
📦
SDKs
SDKs
📦
SDKs
SDKs
📦
SDKs
SDKs
📦
SDKs
SDKs
📦
SDKs
SDKs
📦
SDKs
SDKs
🔧
Tools
Tools
🔧
Tools
Tools
🔧
Tools
Tools
🔧
Tools
Tools
🔧
Tools
Tools
🔧
Tools
Tools
💻
CodeExamples
CodeExamples
🔗
Forums
Forums
🔗
Forums
Forums
🔗
BulkDataDownload
BulkDataDownload
🔑
Authentication
Authentication
🔗
Documentation
Documentation
🔑
Authentication
Authentication
📜
TermsOfService
TermsOfService
📜
TermsOfService
TermsOfService
📜
PrivacyPolicy
PrivacyPolicy
💻
SourceCode
SourceCode
🔗
Donate
Donate
🟢
StatusPage
StatusPage
📰
Blog
Blog
🔗
RateLimits
RateLimits
🔑
Authentication
Authentication
🔗
License
License
🔗
Plans
Plans
🔗
RateLimits
RateLimits

Sources

Raw ↑
opencollection: 1.0.0
info:
  name: Lichess.org API reference
  version: 2.0.144
items:
- info:
    name: Users
    type: folder
  items:
  - info:
      name: Get real-time users status
      type: http
    http:
      method: GET
      url: https://lichess.org/api/users/status
      params:
      - name: ids
        value: thibault,maia1,maia5
        type: query
        description: User IDs separated by commas. Up to 100 IDs.
      - name: withSignal
        value: 'true'
        type: query
        description: 'Also return the network signal of the player, when available.

          It ranges from 1 (poor connection, lag > 500ms) to 4 (great connection, lag < 150ms)

          Defaults to `false` to preserve server resources.

          '
      - name: withGameIds
        value: 'true'
        type: query
        description: 'Also return the ID of the game being played, if any, for each player, in a `playingId` field.

          Defaults to `false` to preserve server resources.

          '
      - name: withGameMetas
        value: 'true'
        type: query
        description: 'Also return the id, time control and variant of the game being played, if any, for each player, in a
          `playing` field.

          Defaults to `false` to preserve server resources. Disables `withGameIds`.

          '
    docs: 'Read the `online`, `playing` and `streaming` flags of several users.

      This API is very fast and cheap on lichess side.

      So you can call it quite often (like once every 5 seconds).

      Use it to track players and know when they''re connected on lichess and playing games.

      '
  - info:
      name: Get all top 10
      type: http
    http:
      method: GET
      url: https://lichess.org/api/player
    docs: 'Get the top 10 players for each speed and variant.

      See <https://lichess.org/player>.

      '
  - info:
      name: Get one leaderboard
      type: http
    http:
      method: GET
      url: https://lichess.org/api/player/top/:nb/:perfType
      params:
      - name: nb
        value: ''
        type: path
        description: How many users to fetch
      - name: perfType
        value: ''
        type: path
        description: The speed or variant
    docs: 'Get the leaderboard for a single speed or variant (a.k.a. `perfType`).

      There is no leaderboard for correspondence or puzzles.

      See <https://lichess.org/player/top/100/bullet>.

      '
  - info:
      name: Get user public data
      type: http
    http:
      method: GET
      url: https://lichess.org/api/user/:username
      params:
      - name: username
        value: ''
        type: path
      - name: trophies
        value: ''
        type: query
        description: Include user trophies
      - name: profile
        value: ''
        type: query
        description: Include user profile data
      - name: rank
        value: ''
        type: query
        description: Include global lichess ranking for each perf
      - name: fideId
        value: ''
        type: query
        description: Include public FIDE ID if any
      auth:
        type: oauth2
        flow: authorization_code
        authorizationUrl: https://lichess.org/oauth
        accessTokenUrl: https://lichess.org/api/token
        credentials:
          clientId: '{{clientId}}'
          clientSecret: '{{clientSecret}}'
    docs: 'Read public data of a user.

      '
  - info:
      name: Get rating history of a user
      type: http
    http:
      method: GET
      url: https://lichess.org/api/user/:username/rating-history
      params:
      - name: username
        value: ''
        type: path
    docs: 'Read rating history of a user, for all perf types.

      There is at most one entry per day.

      Format of an entry is `[year, month, day, rating]`.

      `month` starts at zero (January).

      '
  - info:
      name: Get performance statistics of a user
      type: http
    http:
      method: GET
      url: https://lichess.org/api/user/:username/perf/:perf
      params:
      - name: username
        value: ''
        type: path
      - name: perf
        value: ''
        type: path
    docs: 'Read performance statistics of a user, for a single performance.

      Similar to the [performance pages on the website](https://lichess.org/@/thibault/perf/bullet).

      '
  - info:
      name: Get user activity
      type: http
    http:
      method: GET
      url: https://lichess.org/api/user/:username/activity
      params:
      - name: username
        value: ''
        type: path
    docs: 'Read data to generate the activity feed of a user.

      '
  - info:
      name: Get users by ID
      type: http
    http:
      method: POST
      url: https://lichess.org/api/users
      params:
      - name: profile
        value: ''
        type: query
        description: Include user profile data
      - name: rank
        value: ''
        type: query
        description: Include global lichess ranking for each perf
    docs: 'Get up to 300 users by their IDs. Users are returned in the same order as the IDs.

      The method is `POST` to allow a longer list of IDs to be sent in the request body.

      Please do not try to download all the Lichess users with this endpoint, or any other endpoint.

      An API is not a way to fully export a website. We do not provide a full download of the Lichess users.

      This endpoint is limited to 8,000 users every 10 minutes, and 120,000 every day.

      '
  - info:
      name: Get live streamers
      type: http
    http:
      method: GET
      url: https://lichess.org/api/streamer/live
    docs: 'Get basic info about currently streaming users.

      This API is very fast and cheap on lichess side.

      So you can call it quite often (like once every 5 seconds).

      '
  - info:
      name: Get crosstable
      type: http
    http:
      method: GET
      url: https://lichess.org/api/crosstable/:user1/:user2
      params:
      - name: user1
        value: ''
        type: path
      - name: user2
        value: ''
        type: path
      - name: matchup
        value: ''
        type: query
        description: Whether to get the current match data, if any
    docs: 'Get total number of games, and current score, of any two users.

      If the `matchup` flag is provided, and the users are currently playing, also gets the current match game number and
      scores.

      '
  - info:
      name: Autocomplete usernames
      type: http
    http:
      method: GET
      url: https://lichess.org/api/player/autocomplete
      params:
      - name: term
        value: ''
        type: query
        description: The beginning of a username
      - name: exists
        value: ''
        type: query
        description: 'If `true`, only checks if the user exists.

          '
      - name: object
        value: ''
        type: query
        description: '- `false` returns an array of usernames

          - `true` returns an object with matching users

          '
      - name: names
        value: ''
        type: query
        description: '- `false` returns an array of usernames

          - `true` returns an array of usernames with preferred casing

          '
      - name: friend
        value: ''
        type: query
        description: 'Returns followed players matching `term` if any, else returns other players.

          Requires [OAuth](#tag/OAuth).

          '
      - name: team
        value: ''
        type: query
        description: 'Search within a team.

          Use team ID/slug.

          '
      - name: tour
        value: ''
        type: query
        description: 'Search within a arena tournament.

          Use tournament ID.

          '
      - name: swiss
        value: ''
        type: query
        description: 'Search within a Swiss tournament.

          '
      - name: teacher
        value: ''
        type: query
        description: 'Only search for players who also have a teacher role.

          '
    docs: 'Provides autocompletion options for an incomplete username.

      '
  - info:
      name: Get notes for a user
      type: http
    http:
      method: GET
      url: https://lichess.org/api/user/:username/note
      params:
      - name: username
        value: ''
        type: path
      auth:
        type: oauth2
        flow: authorization_code
        authorizationUrl: https://lichess.org/oauth
        accessTokenUrl: https://lichess.org/api/token
        credentials:
          clientId: '{{clientId}}'
          clientSecret: '{{clientSecret}}'
    docs: 'Get the private notes that you have added for a user.

      '
  - info:
      name: Add a note for a user
      type: http
    http:
      method: POST
      url: https://lichess.org/api/user/:username/note
      params:
      - name: username
        value: ''
        type: path
      body:
        type: form-urlencoded
        data:
        - name: text
          value: ''
      auth:
        type: oauth2
        flow: authorization_code
        authorizationUrl: https://lichess.org/oauth
        accessTokenUrl: https://lichess.org/api/token
        credentials:
          clientId: '{{clientId}}'
          clientSecret: '{{clientSecret}}'
    docs: 'Add a private note available only to you about this account.

      '
- info:
    name: Puzzles
    type: folder
  items:
  - info:
      name: Get the daily puzzle
      type: http
    http:
      method: GET
      url: https://lichess.org/api/puzzle/daily
    docs: 'Get the daily Lichess puzzle in JSON format.

      '
  - info:
      name: Get a puzzle by its ID
      type: http
    http:
      method: GET
      url: https://lichess.org/api/puzzle/:id
      params:
      - name: id
        value: ''
        type: path
        description: The puzzle ID
    docs: Get a single Lichess puzzle in JSON format.
  - info:
      name: Get a new puzzle
      type: http
    http:
      method: GET
      url: https://lichess.org/api/puzzle/next
      params:
      - name: angle
        value: ''
        type: query
        description: 'The theme or opening to filter puzzles with.


          Available themes are listed in [the lichess source code](https://github.com/ornicar/lila/blob/master/translation/source/puzzleTheme.xml)
          and [the lichess training themes hyperlinks](https://lichess.org/training/themes).

          '
      - name: difficulty
        value: ''
        type: query
        description: The desired puzzle difficulty, relative to the authenticated user puzzle rating, or 1500 if anonymous.
      - name: color
        value: ''
        type: query
        description: The color to play. Better left empty to automatically get 50% white.
      auth:
        type: oauth2
        flow: authorization_code
        authorizationUrl: https://lichess.org/oauth
        accessTokenUrl: https://lichess.org/api/token
        credentials:
          clientId: '{{clientId}}'
          clientSecret: '{{clientSecret}}'
    docs: 'Get a random Lichess puzzle in JSON format.


      If authenticated, only returns puzzles that the user has never seen before.


      **DO NOT** use this endpoint to enumerate puzzles for mass download. Instead, download the [full public puzzle database](https://database.lichess.org/#puzzles).

      '
  - info:
      name: Get multiple puzzles at once
      type: http
    http:
      method: GET
      url: https://lichess.org/api/puzzle/batch/:angle
      params:
      - name: angle
        value: ''
        type: path
        description: 'The theme or opening to filter puzzles with. Recommended: `mix`.


          Available themes are listed in [the lichess source code](https://github.com/ornicar/lila/blob/master/translation/source/puzzleTheme.xml)
          and [the lichess training themes hyperlinks](https://lichess.org/training/themes).

          '
      - name: difficulty
        value: ''
        type: query
        description: The desired puzzle difficulty, relative to the authenticated user puzzle rating, or 1500 if anonymous.
      - name: nb
        value: ''
        type: query
        description: 'How many puzzles to fetch. Just set it to `1` if you only need one puzzle.

          '
      - name: color
        value: ''
        type: query
        description: 'The color to play. Better left empty to automatically get 50% white.

          Currently only works when `nb=1`.

          '
      auth:
        type: oauth2
        flow: authorization_code
        authorizationUrl: https://lichess.org/oauth
        accessTokenUrl: https://lichess.org/api/token
        credentials:
          clientId: '{{clientId}}'
          clientSecret: '{{clientSecret}}'
    docs: 'Get a batch of random Lichess puzzles in JSON format.


      If authenticated, only returns puzzles that the user has never seen before.


      **DO NOT** use this endpoint to enumerate puzzles for mass download. Instead, download the [full public puzzle database](https://database.lichess.org/#puzzles).

      '
  - info:
      name: Solve multiple puzzles at once
      type: http
    http:
      method: POST
      url: https://lichess.org/api/puzzle/batch/:angle
      params:
      - name: angle
        value: ''
        type: path
        description: 'The theme or opening of the solved puzzles.


          Available themes are listed in [the lichess source code](https://github.com/ornicar/lila/blob/master/translation/source/puzzleTheme.xml)
          and [the lichess training themes hyperlinks](https://lichess.org/training/themes).

          '
      - name: nb
        value: ''
        type: query
        description: 'When > 0, the response includes a new puzzle batch with that many puzzles.


          This is equivalent to calling [/api/puzzle/batch/{angle}](#tag/puzzles/GET/api/puzzle/batch/{angle}),

          and can sometimes save a request.

          '
      body:
        type: json
        data: '{}'
      auth:
        type: oauth2
        flow: authorization_code
        authorizationUrl: https://lichess.org/oauth
        accessTokenUrl: https://lichess.org/api/token
        credentials:
          clientId: '{{clientId}}'
          clientSecret: '{{clientSecret}}'
    docs: 'Set puzzles as solved and update ratings.

      '
  - info:
      name: Get your puzzle activity
      type: http
    http:
      method: GET
      url: https://lichess.org/api/puzzle/activity
      params:
      - name: max
        value: ''
        type: query
        description: How many entries to download. Leave empty to download all activity.
      - name: before
        value: ''
        type: query
        description: Download entries before this timestamp. Defaults to now. Use `before` and `max` for pagination.
      - name: since
        value: ''
        type: query
        description: Download entries since this timestamp. Defaults to account creation date.
      auth:
        type: oauth2
        flow: authorization_code
        authorizationUrl: https://lichess.org/oauth
        accessTokenUrl: https://lichess.org/api/token
        credentials:
          clientId: '{{clientId}}'
          clientSecret: '{{clientSecret}}'
    docs: 'Download your puzzle activity in [ndjson](#description/streaming-with-nd-json) format.

      Puzzle activity is sorted by reverse chronological order (most recent first)

      We recommend streaming the response, for it can be very long.

      '
  - info:
      name: Get puzzles to replay
      type: http
    http:
      method: GET
      url: https://lichess.org/api/puzzle/replay/:days/:theme
      params:
      - name: days
        value: ''
        type: path
        description: How many days to look back when aggregating puzzle results. 30 is sensible.
      - name: theme
        value: ''
        type: path
        description: The theme or opening to filter puzzles with.
      auth:
        type: oauth2
        flow: authorization_code
        authorizationUrl: https://lichess.org/oauth
        accessTokenUrl: https://lichess.org/api/token
        credentials:
          clientId: '{{clientId}}'
          clientSecret: '{{clientSecret}}'
    docs: Gets the puzzle IDs of remaining puzzles to re-attempt in JSON format.
  - info:
      name: Get your puzzle dashboard
      type: http
    http:
      method: GET
      url: https://lichess.org/api/puzzle/dashboard/:days
      params:
      - name: days
        value: ''
        type: path
        description: How many days to look back when aggregating puzzle results. 30 is sensible.
      auth:
        type: oauth2
        flow: authorization_code
        authorizationUrl: https://lichess.org/oauth
        accessTokenUrl: https://lichess.org/api/token
        credentials:
          clientId: '{{clientId}}'
          clientSecret: '{{clientSecret}}'
    docs: 'Download your [puzzle dashboard](https://lichess.org/training/dashboard/30/dashboard) as JSON.

      Also includes all puzzle themes played, with aggregated results.

      Allows re-creating the [improvement/strengths](https://lichess.org/training/dashboard/30/improvementAreas) interfaces.

      '
  - info:
      name: Get the storm dashboard of a player
      type: http
    http:
      method: GET
      url: https://lichess.org/api/storm/dashboard/:username
      params:
      - name: username
        value: ''
        type: path
        description: Username of the player
      - name: days
        value: ''
        type: query
        description: How many days of history to return
    docs: 'Download the [storm dashboard](https://lichess.org/storm/dashboard/mrbasso) of any player as JSON.

      Contains the aggregated highscores, and the history of storm runs aggregated by days.

      Use `?days=0` if you only care about the highscores.

      '
  - info:
      name: Create and join a puzzle race
      type: http
    http:
      method: POST
      url: https://lichess.org/api/racer
      auth:
        type: oauth2
        flow: authorization_code
        authorizationUrl: https://lichess.org/oauth
        accessTokenUrl: https://lichess.org/api/token
        credentials:
          clientId: '{{clientId}}'
          clientSecret: '{{clientSecret}}'
    docs: 'Create a new private [puzzle race](https://lichess.org/racer).

      The Lichess user who creates the race must join the race page,

      and manually start the race when enough players have joined.

      - <https://lichess.org/racer>

      '
  - info:
      name: Get puzzle race results
      type: http
    http:
      method: GET
      url: https://lichess.org/api/racer/:id
      params:
      - name: id
        value: ''
        type: path
        description: The puzzle race ID
      auth:
        type: oauth2
        flow: authorization_code
        authorizationUrl: https://lichess.org/oauth
        accessTokenUrl: https://lichess.org/api/token
        credentials:
          clientId: '{{clientId}}'
          clientSecret: '{{clientSecret}}'
    docs: 'Get the results of a [puzzle race](https://lichess.org/racer).

      Returns information about players, puzzles, and the current status of the race.

      - <https://lichess.org/racer>


      Note that Lichess puzzle races are not persisted, and are only available

      for 30 minutes. After that delay, they are permanently deleted.

      '
- info:
    name: Account
    type: folder
  items:
  - info:
      name: Get my profile
      type: http
    http:
      method: GET
      url: https://lichess.org/api/account
      auth:
        type: oauth2
        flow: authorization_code
        authorizationUrl: https://lichess.org/oauth
        accessTokenUrl: https://lichess.org/api/token
        credentials:
          clientId: '{{clientId}}'
          clientSecret: '{{clientSecret}}'
    docs: 'Public information about the logged in user.

      '
  - info:
      name: Get my email address
      type: http
    http:
      method: GET
      url: https://lichess.org/api/account/email
      auth:
        type: oauth2
        flow: authorization_code
        authorizationUrl: https://lichess.org/oauth
        accessTokenUrl: https://lichess.org/api/token
        credentials:
          clientId: '{{clientId}}'
          clientSecret: '{{clientSecret}}'
    docs: 'Read the email address of the logged in user.

      '
  - info:
      name: Get my preferences
      type: http
    http:
      method: GET
      url: https://lichess.org/api/account/preferences
      auth:
        type: oauth2
        flow: authorization_code
        authorizationUrl: https://lichess.org/oauth
        accessTokenUrl: https://lichess.org/api/token
        credentials:
          clientId: '{{clientId}}'
          clientSecret: '{{clientSecret}}'
    docs: 'Read the preferences of the logged in user.

      - <https://lichess.org/account/preferences/game-display>

      - <https://github.com/ornicar/lila/blob/master/modules/pref/src/main/Pref.scala>

      '
  - info:
      name: Get my kid mode status
      type: http
    http:
      method: GET
      url: https://lichess.org/api/account/kid
      auth:
        type: oauth2
        flow: authorization_code
        authorizationUrl: https://lichess.org/oauth
        accessTokenUrl: https://lichess.org/api/token
        credentials:
          clientId: '{{clientId}}'
          clientSecret: '{{clientSecret}}'
    docs: 'Read the kid mode status of the logged in user.

      - <https://lichess.org/account/kid>

      '
  - info:
      name: Set my kid mode status
      type: http
    http:
      method: POST
      url: https://lichess.org/api/account/kid
      params:
      - name: v
        value: 'true'
        type: query
        description: Kid mode status
      auth:
        type: oauth2
        flow: authorization_code
        authorizationUrl: https://lichess.org/oauth
        accessTokenUrl: https://lichess.org/api/token
        credentials:
          clientId: '{{clientId}}'
          clientSecret: '{{clientSecret}}'
    docs: 'Set the kid mode status of the logged in user.

      - <https://lichess.org/account/kid>

      '
  - info:
      name: Get my timeline
      type: http
    http:
      method: GET
      url: https://lichess.org/api/timeline
      params:
      - name: since
        value: ''
        type: query
        description: Show events since this timestamp.
      - name: nb
        value: ''
        type: query
        description: Max number of events to fetch.
      auth:
        type: oauth2
        flow: authorization_code
        authorizationUrl: https://lichess.org/oauth
        accessTokenUrl: https://lichess.org/api/token
        credentials:
          clientId: '{{clientId}}'
          clientSecret: '{{clientSecret}}'
    docs: 'Get the timeline events of the logged in user.

      '
- info:
    name: Games
    type: folder
  items:
  - info:
      name: Export one game
      type: http
    http:
      method: GET
      url: https://lichess.org/game/export/:gameId
      headers:
      - name: Accept
        value: ''
      params:
      - name: gameId
        value: ''
        type: path
        description: The game ID
      - name: moves
        value: ''
        type: query
        description: Include the PGN moves.
      - name: pgnInJson
        value: ''
        type: query
        description: Include the full PGN within the JSON response, in a `pgn` field.
      - name: tags
        value: ''
        type: query
        description: Include the PGN tags.
      - name: clocks
        value: ''
        type: query
        description: 'Include clock status when available.

          Either as PGN comments: `2. exd5 { [%clk 1:01:27] } e5 { [%clk 1:01:28] }`

          Or in a `clocks` JSON field, as centisecond integers, depending on the response type.

          '
      - name: evals
        value: ''
        type: query
        description: 'Include analysis evaluations and comments, when available.

          Either as PGN comments: `12. Bxf6 { [%eval 0.23] } a3 { [%eval -1.09] }`

          Or in an `analysis` JSON field, depending on the response type.

          '
      - name: accuracy
        value: ''
        type: query
        description: 'Include [accuracy percent](https://lichess.org/page/accuracy) of each player, when available. Only available
          in JSON.

          '
      - name: opening
        value: ''
        type: query
        description: 'Include the opening name.

          Example: `[Opening "King''s Gambit Accepted, King''s Knight Gambit"]`

          '
      - name: division
        value: ''
        type: query
        description: 'Plies which mark the beginning of the middlegame and endgame.

          Only available in JSON

          '
      - name: literate
        value: ''
        type: query
        description: 'Insert textual annotations in the PGN about the opening, analysis variations, mistakes, and game termination.

          Example: `5... g4? { (-0.98 → 0.60) Mistake. Best move was h6. } (5... h6 6. d4 Ne7 7. g3 d5 8. exd5 fxg3 9. hxg3
          c6 10. dxc6)`

          '
      - name: withBookmarked
        value: ''
        type: query
        description: 'Add a `bookmarked: true` JSON field when the logged in user has bookmarked the game.

          The response type must be set to `application/x-ndjson` by the request `Accept` header.

          '
    docs: 'Download one game in either PGN or JSON format.

      Ongoing games are delayed by 3 moves, as to prevent cheat bots from using this API.

      '
  - info:
      name: Fetch the spectator game chat
      type: http
    http:
      method: GET
      url: https://lichess.org/game/:gameId/chat
      params:
      - name: gameId
        value: ''
        type: path
    docs: 'Get the messages posted in the public spectator chat of a game.


      Games also have a private players chat, which only the 2 players can see.

      '
  - info:
      name: Export ongoing game of a user
      type: http
    http:
      method: GET
      url: https://lichess.org/api/user/:username/current-game
      headers:
      - name: Accept
        value: ''
      params:
      - name: username
        value: ''
        type: path
      - name: moves
        value: ''
        type: query
        description: Include the PGN moves.
      - name: pgnInJson
        value: ''
        type: query
        description: Include the full PGN within the JSON response, in a `pgn` field.
      - name: tags
        value: ''
        type: query
        description: Include the PGN tags.
      - name: clocks
        value: ''
        type: query
        description: 'Include clock status when available.

          Either as PGN comments: `2. exd5 { [%clk 1:01:27] } e5 { [%clk 1:01:28] }`

          Or in a `clocks` JSON field, as centisecond integers, depending on the response type.

          '
      - name: evals
        value: ''
        type: query
        description: 'Include analysis evaluations and comments, when available.

          Either as PGN comments: `12. Bxf6 { [%eval 0.23] } a3 { [%eval -1.09] }`

          Or in an `analysis` JSON field, depending on the response type.

          '
      - name: accuracy
        value: ''
        type: query
        description: 'Include [accuracy percent](https://lichess.org/page/accuracy) of each player, when available. Only available
          in JSON.

          '
      - name: opening
        value: ''
        type: query
        description: 'Include the opening name.

          Example: `[Opening "King''s Gambit Accepted, King''s Knight Gambit"]`

          '
      - name: division
        value: ''
        type: query
        description: 'Plies which mark the beginning of the middlegame and endgame.

          Only available in JSON

          '
      - name: literate
        value: ''
        type: query
        description: 'Insert textual annotations in the PGN about the opening, analysis variations, mistakes, and game termination.

          Example: `5... g4? { (-0.98 → 0.60) Mistake. Best move was h6. } (5... h6 6. d4 Ne7 7. g3 d5 8. exd5 fxg3 9. hxg3
          c6 10. dxc6)`

          '
    docs: 'Download the ongoing game, or the last game played, of a user.

      Available in either PGN or JSON format.

      Ongoing games are delayed by 3 moves, as to prevent cheat bots from using this API.

      '
  - info:
      name: Export games of a user
      type: http
    http:
      method: GET
      url: https://lichess.org/api/games/user/:username
      headers:
      - name: Accept
        value: ''
      params:
      - name: username
        value: ''
        type: path
        description: The user name.
      - name: since
        value: ''
        type: query
        description: Download games played since this timestamp. Defaults to account creation date.
      - name: until
        value: ''
        type: query
        description: Download games played until this timestamp. Defaults to now.
      - name: max
        value: ''
        type: query
        description: How many games to download. Leave empty to download all games.
      - name: vs
        value: ''
        type: query
        description: '[Filter] Only games played against this opponent'
      - name: rated
        value: ''
        type: query
        description: '[Filter] Only rated (`true`) or casual (`false`) games'
      - name: perfType
        value: ''
        type: query
        description: '[Filter] Only games in these speeds or variants.

          Multiple perf types can be specified, separated by a comma.

          Example: blitz,rapid,classical

          '
      - name: color
        value: ''
        type: query
        description: '[Filter] Only games played as this color.'
      - name: analysed
        value: ''
        type: query
        description: '[Filter] Only games with or without a computer analysis available'
      - name: moves
        value: ''
        type: query
        description: Include the PGN moves.
      - name: pgnInJson
        value: ''
        type: query
        description: Include the full PGN within the JSON response, in a `pgn` field. The response type must be set to `application/x-ndjson`
          by the request `Accept` header.
      - name: tags
        value: ''
        type: query
        description: Include the PGN tags.
      - name: clocks
        value: ''
        type: query
        description: 'Include clock status when available.

          Either as PGN comments: `2. exd5 { [%clk 1:01:27] } e5 { [%clk 1:01:28] }`

          Or in a `clocks` JSON field, as centisecond integers, depending on the response type.

          '
      - name: evals
        value: ''
        type: query
        description: 'Include analysis evaluations and comments, when available.

          Either as PGN comments: `12. Bxf6 { [%eval 0.23] } a3 { [%eval -1.09] }`

          Or in an `analysis` JSON field, depending on the response type.

          '
      - name: accuracy
        value: ''
        type: query
        description: 'Include [accuracy percent](https://lichess.org/page/accuracy) of each player, when available. Only available
          in JSON.

          '
      - name: opening
        value: ''
        type: query
        description: 'Include the opening name.

          Example: `[Opening "King''s Gambit Accepted, King''s Knight Gambit"]`

          '
      - name: division
        value: ''
        type: query
        description: 'Plies which mark the beginning of the middlegame and endgame.

          Only available in JSON

          '
      - name: ongoing
        value: ''
        type: query
        description: Ongoing games are delayed by a few seconds ranging from 3 to 60 depending on the time control, as to
          prevent cheat bots from using this API.
      - name: finished
        value: ''
        type: query
        description: Include finished games. Set to `false` to only get ongoing games.
      - name: literate
        value: ''
        type: query
        description: 'Insert textual annotations in the PGN about the opening, analysis variations, mistakes, and game termination.

          Example: `5... g4? { (-0.98 → 0.60) Mistake. Best move was h6. } (5... h6 6. d4 Ne7 7. g3 d5 8. exd5 fxg3 9. hxg3
          c6 10. dxc6)`

          '
      - name: lastFen
        value: ''
        type: query
        description: 'Include the X-FEN notation of the last position of the game.

          The response type must be set to `application/x-ndjson` by the request `Accept` header.

          '
      - name: withBookmarked
        value: ''
        type: query
        description: 'Add a `bookmarked: true` JSON field w

# --- truncated at 32 KB (163 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/lichess/refs/heads/main/apis.yml