How AI is applied across API Evangelist and APIs.io. Read my AI disclosure →
API Evangelist API Evangelist
Discovery
Learnings
Guidance
Toolbox
Alignment
API Evangelist LLC

Lichess Bot API

Play on Lichess as a bot. Allows engine play.Read the [blog post announcement of lichess bots](https://lichess.org/blog/WvDNticAAMu_mHKP/welcome-lichess-bots).Only works with [Bot accounts](#tag/bot/POST/api/bot/account/upgrade).### Features- [Stream incoming chess moves](#tag/bot/GET/api/bot/game/stream/{gameId})- [Play chess moves](#tag/bot/POST/api/bot/game/{gameId}/move/{move})- [Read](#tag/bot/GET/api/bot/game/stream/{gameId}) and [write](#tag/bot/POST/api/bot/game/{gameId}/chat) in the player and spectator chats- [Receive](#tag/bot/GET/api/stream/event), [create](#tag/challenges/POST/api/challenge/{username}) and [accept](#tag/challenges/POST/api/challenge/{challengeId}/accept) (or [decline](#tag/challenges/POST/api/challenge/{challengeId}/decline)) challenges- [Abort](#tag/bot/POST/api/bot/game/{gameId}/abort) and [resign](#tag/bot/POST/api/bot/game/{gameId}/resign) games- Engine assistance is [allowed](https://lichess.org/page/fair-play)### Restrictions- Bots can only play challenge games: pools and tournaments are off-limits- Bots cannot play UltraBullet (¼+0) because it requires making too many requests. But 0+1 and ½+0 are allowed.- Bots must follow [Lichess TOS](https://lichess.org/terms-of-service) specifically Sandbagging, Constant Aborting, Boosting, etc- Bot devs are advised to make their Bots play casual only when testing their Bots logic and to avoid breaking Lichess TOS.### Integrations- [Python3 lichess-bot](https://github.com/lichess-bot-devs/lichess-bot) (official)- [Python3 lichess UCI bot](https://github.com/Torom/BotLi)- [JavaScript bot-o-tron](https://github.com/tailuge/bot-o-tron)- [Golang lichess-bot](https://github.com/dolegi/lichess-bot)- [Electronic Chessboard](http://www.oliviermercier.com/res/projects/chessboard/)- Yours? Please make [an issue or pull request](https://github.com/lichess-org/api).### Links- [Announcement](https://lichess.org/blog/WvDNticAAMu_mHKP/welcome-lichess-bots)- Join the [Lichess Bots team](https://lichess.org/team/lichess-bots) with your bot account- [Get help in the discord channel](https://discord.gg/quwueFd)- Watch [Lichess Bot TV](https://lichess.org/tv/bot)

Lichess Bot API is one of 23 APIs that Lichess publishes on the APIs.io network, described by a machine-readable OpenAPI specification and an AsyncAPI event-driven specification.

This API exposes 2 JSON Schema definitions.

Tagged areas include Bot. The published artifact set on APIs.io includes an OpenAPI specification, API documentation, an AsyncAPI specification, a JSON-LD context, and 2 JSON Schemas.

This API exposes 13 operations across 12 paths, and defines 41 schemas. It is described by OpenAPI 3.1.0, at version 2.0.144.

Requests are made against 4 base URLs: https://lichess.org, https://lichess.dev, http://localhost:{port}, http://l.org.

13 operations 12 paths 41 schemas 4 GET9 POST

Metadata

The identity and technical contract details declared by the specification.

Specification
OpenAPI 3.1.0
API Version
2.0.144
Base URL
https://lichess.org
Authentication
OAuth 2.0
Resource Areas
1

Authentication & Security 1

Lichess Bot API declares 1 security scheme for authenticating requests. It supports OAuth 2.0 (OAuth2) using the authorizationCode flow, exposing 23 scopes.

  • OAuth2 — Read [the introduction for how to make authenticated requests](description/authentication).

Paths & Operations 13

Across 12 paths, the API surfaces 13 operations — 4 GET, 9 POST. Each is listed below with its method, path, parameters, and response codes.

Bot 13

Play on Lichess as a bot. Allows engine play. Read the [blog post announcement of lichess bots](https://lichess.org/blog/WvDNticAAMumHKP/welcome-lichess-bots). Only works with [Bo…

GET
/api/stream/event
Stream incoming events
apiStreamEvent → 200
GET
/api/bot/online
Get online bots
apiBotOnline 1 param → 200
POST
/api/bot/account/upgrade
Upgrade to Bot account
botAccountUpgrade → 200400
GET
/api/bot/game/stream/{gameId}
Stream Bot game state
botGameStream 1 param → 200404
POST
/api/bot/game/{gameId}/move/{move}
Make a Bot move
botGameMove 3 params → 200400
POST
/api/bot/game/{gameId}/chat
Write in the chat
botGameChat 1 param body → 200400
GET
/api/bot/game/{gameId}/chat
Fetch the game chat
botGameChatGet 1 param → 200
POST
/api/bot/game/{gameId}/abort
Abort a game
botGameAbort 1 param → 200400
POST
/api/bot/game/{gameId}/resign
Resign a game
botGameResign 1 param → 200400
POST
/api/bot/game/{gameId}/draw/{accept}
Handle draw offers
botGameDraw 2 params → 200400
POST
/api/bot/game/{gameId}/takeback/{accept}
Handle takeback offers
botGameTakeback 2 params → 200400
POST
/api/bot/game/{gameId}/claim-victory
Claim victory of a game
botGameClaimVictory 1 param → 200400
POST
/api/bot/game/{gameId}/claim-draw
Claim draw of a game
botGameClaimDraw 1 param → 200400

Schemas 41

The contract defines 41 schemas that model the data the API accepts and returns. The most detailed are GameEventInfo (21 properties), Perfs (18 properties), ChallengeJson (15 properties), GameFullEvent (14 properties). Each schema is shown below with its type and property counts.

PuzzleModePerf
object
2 properties 2 required
PatronColor
integer
Players can choose a color for their Patron wings. See [here for the color mappings](https://github.com/lichess-org/lila/blob/master/ui/lib/css/abstract/patron…
ChallengeColor
string
ChatLineEvent
object
4 properties 4 required
GameFullEvent
object
14 properties 11 required
Variant
object
3 properties 2 required
GameStateEvent
object
13 properties 7 required
ChallengeCanceledEvent
object
2 properties 2 required
PlayTime
object
3 properties 2 required
Patron
boolean
Use patronColor value instead to determine if player is a patron.
VariantKey
string
ChallengeUser
object
10 properties 2 required
GameColor
string
NotFound
object
1 property 1 required
GameEventInfo
object
21 properties 2 required
PlayerGameChat
array
ChallengeDeclinedEvent
object
2 properties 2 required
Ok
object
1 property 1 required
GameStartEvent
object
2 properties 2 required
GameCompat
object
2 properties
ChallengeDeclinedJson
Profile
object
11 properties
GameStatusId
integer
Flair
string
See [available flair list and images](https://github.com/lichess-org/lila/tree/master/public/flair)
Perf
object
6 properties 4 required
Error
object
1 property 1 required
ChallengeStatus
string
Speed
string
GameStatusName
string
GameEventPlayer
object
6 properties 2 required
ChallengeJson
object
15 properties 11 required
OpponentGoneEvent
object
3 properties 2 required
GameSource
string
User
object
14 properties 2 required
GameFinishEvent
object
2 properties 2 required
Perfs
object
18 properties
TimeControl
Title
string
only appears if the user is a titled player or a bot user
GameStatus
object
2 properties 2 required
GameEventOpponent
ChallengeEvent
object
3 properties 2 required

Specification

The full machine-readable OpenAPI contract behind this narrative.

Source

lichess-bot-api-openapi.yml Raw ↑

Other APIs Lichess publishes across the network.

Lichess Account API
Lichess Analysis API
Lichess Board API
Lichess Broadcasts API
Lichess Bulk pairings API
Lichess Challenges API
Lichess External engine API
Lichess FIDE API
Lichess Games API
Lichess Messaging API
Lichess OAuth API
Lichess Opening Explorer API
Where this information came from

This is an independent, third-party profile of Lichess Bot API, published by API Evangelist. We do not operate, host, resell, or support these APIs, and we are not affiliated with or endorsed by the company unless stated above. Everything here is built from publicly available information — the company's own site, developer portal, documentation, public repositories, and the specifications it publishes for public use. Nothing is obtained by breaching a system, defeating an access control, or using credentials.

The Kin Score and Agent Readiness rating are independently calculated assessments of a company's public API artifacts, scored against a published rubric. They are not certifications, endorsements, security assessments, or audits.

Corrections, re-scores, and removal are free — no partnership or purchase required, and you do not need to justify the request. A removed company is recorded as unrated, never scored zero for having asked. Acknowledgement within one business day; removal within two.

info@apievangelist.com · Read the full data-sourcing policy →
On a security or compliance team? Put security in the subject line and you will get a person, not a form — we will tell you exactly which public URLs this profile was built from.