# Lichess Bot API

**Canonical:** https://apis.io/apis/lichess/lichess-bot-api/  
**Provider:** Lichess — https://apis.io/providers/lichess/  
**Base URL:** https://lichess.org  
**Documentation:** https://lichess.org/api

Lichess Bot API is one of 23 APIs that [Lichess](https://apis.io/providers/lichess/) publishes on the [APIs.io](https://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.

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)

## Machine-readable artifacts (7)

- **OpenAPI** — https://raw.githubusercontent.com/api-evangelist/lichess/refs/heads/main/openapi/lichess-bot-api-openapi.yml
- **Documentation** — https://lichess.org/api
- **AsyncAPI** — https://raw.githubusercontent.com/api-evangelist/lichess/refs/heads/main/asyncapi/lichess-asyncapi.yml
- **JSONSchema** — https://raw.githubusercontent.com/api-evangelist/lichess/refs/heads/main/json-schema/lichess-game-schema.json
- **JSONSchema** — https://raw.githubusercontent.com/api-evangelist/lichess/refs/heads/main/json-schema/lichess-user-schema.json
- **JSONLD** — https://raw.githubusercontent.com/api-evangelist/lichess/refs/heads/main/json-ld/lichess-context.jsonld
- **SpectralRuleset** — https://raw.githubusercontent.com/api-evangelist/lichess/refs/heads/main/rules/lichess-rules.yml

## Other Lichess APIs (12)

- [Lichess Account API](https://apis.io/apis/lichess/lichess-account-api/)
- [Lichess Analysis API](https://apis.io/apis/lichess/lichess-analysis-api/)
- [Lichess Board API](https://apis.io/apis/lichess/lichess-board-api/)
- [Lichess Broadcasts API](https://apis.io/apis/lichess/lichess-broadcasts-api/)
- [Lichess Bulk pairings API](https://apis.io/apis/lichess/lichess-bulk-pairings-api/)
- [Lichess Challenges API](https://apis.io/apis/lichess/lichess-challenges-api/)
- [Lichess External engine API](https://apis.io/apis/lichess/lichess-external-engine-api/)
- [Lichess FIDE API](https://apis.io/apis/lichess/lichess-fide-api/)
- [Lichess Games API](https://apis.io/apis/lichess/lichess-games-api/)
- [Lichess Messaging API](https://apis.io/apis/lichess/lichess-messaging-api/)
- [Lichess OAuth API](https://apis.io/apis/lichess/lichess-oauth-api/)
- [Lichess Opening Explorer API](https://apis.io/apis/lichess/lichess-opening-explorer-api/)

## Tags

Bot

---

Profiled by [API Evangelist](https://apievangelist.com) and published on [APIs.io](https://apis.io/apis/lichess/lichess-bot-api/). The API's provider profile, Kin Score and agent-readiness rating are at https://apis.io/providers/lichess/.
