{ "opencollection": "1.0.0", "info": { "name": "Lichess.org API reference Account Opening Explorer API", "version": "2.0.144" }, "items": [ { "info": { "name": "Opening Explorer", "type": "folder" }, "items": [ { "info": { "name": "Masters database", "type": "http" }, "http": { "method": "GET", "url": "https://lichess.org/masters", "params": [ { "name": "fen", "value": "rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1", "type": "query", "description": "X-FEN of the root position" }, { "name": "play", "value": "d2d4,d7d5,c2c4,c7c6,c4d5", "type": "query", "description": "Comma separated sequence of legal moves in UCI notation.\nPlay additional moves starting from `fen`.\nRequired to find an opening name, if `fen` is not an exact match\nfor a named position.\n" }, { "name": "since", "value": "", "type": "query", "description": "Include only games from this year or later" }, { "name": "until", "value": "", "type": "query", "description": "Include only games from this year or earlier" }, { "name": "moves", "value": "", "type": "query", "description": "Number of most common moves to display" }, { "name": "topGames", "value": "", "type": "query", "description": "Number of top games to display" } ], "auth": { "type": "oauth2", "flow": "authorization_code", "authorizationUrl": "https://lichess.org/oauth", "accessTokenUrl": "https://lichess.org/api/token", "credentials": { "clientId": "{{clientId}}", "clientSecret": "{{clientSecret}}" } } }, "docs": "**Endpoint: **\n\nExample: `curl https://explorer.lichess.org/masters?play=d2d4,d7d5,c2c4,c7c6,c4d5`\n" }, { "info": { "name": "Lichess games", "type": "http" }, "http": { "method": "GET", "url": "https://lichess.org/lichess", "params": [ { "name": "variant", "value": "", "type": "query", "description": "Variant" }, { "name": "fen", "value": "rnbqkbnr/ppp1pppp/8/3pP3/8/8/PPPP1PPP/RNBQKBNR b KQkq - 0 2", "type": "query", "description": "X-FEN or EPD of the root position" }, { "name": "play", "value": "d2d4,d7d5,c2c4,c7c6,c4d5", "type": "query", "description": "Comma separated sequence of legal moves in UCI notation.\nPlay additional moves starting from `fen`.\nRequired to find an opening name, if `fen` is not an exact match\nfor a named position.\n" }, { "name": "speeds", "value": "", "type": "query", "description": "Comma separated list of game speeds to filter by" }, { "name": "ratings", "value": "", "type": "query", "description": "Comma separated list of ratings groups to filter by.\nEach group ranges from its value to the next higher\ngroup in the enum (`0` from 0 to 999, `1000` from 1000 to 1199,\n..., `2500` from 2500 to any rating above).\n" }, { "name": "since", "value": "", "type": "query", "description": "Include only games from this month or later" }, { "name": "until", "value": "", "type": "query", "description": "Include only games from this month or earlier" }, { "name": "moves", "value": "", "type": "query", "description": "Number of most common moves to display" }, { "name": "topGames", "value": "", "type": "query", "description": "Maximum number of top games to display.\n\nDue to the way banned users are handled internally, the response may\ncontain fewer games than expected.\n" }, { "name": "recentGames", "value": "", "type": "query", "description": "Maximum number of recent games to display.\n\nDue to the way banned users are handled internally, the response may\ncontain fewer games than expected.\n" }, { "name": "history", "value": "", "type": "query", "description": "Optionally retrieve history" } ], "auth": { "type": "oauth2", "flow": "authorization_code", "authorizationUrl": "https://lichess.org/oauth", "accessTokenUrl": "https://lichess.org/api/token", "credentials": { "clientId": "{{clientId}}", "clientSecret": "{{clientSecret}}" } } }, "docs": "**Endpoint: **\n\nAggregated rated games from all Lichess players.\n\nExample: `curl https://explorer.lichess.org/lichess?variant=standard&speeds=blitz,rapid,classical&ratings=2200,2500&fen=rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR%20w%20KQkq%20-%200%201`\n" }, { "info": { "name": "Player games", "type": "http" }, "http": { "method": "GET", "url": "https://lichess.org/player", "params": [ { "name": "player", "value": "revoof", "type": "query", "description": "Username or ID of the player" }, { "name": "color", "value": "white", "type": "query", "description": "Look for games with *player* on the given side" }, { "name": "variant", "value": "", "type": "query", "description": "Variant" }, { "name": "fen", "value": "rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1", "type": "query", "description": "X-FEN of the root position" }, { "name": "play", "value": "d2d4,d7d5", "type": "query", "description": "Comma separated sequence of legal moves in UCI notation.\nPlay additional moves starting from `fen`.\nRequired to find an opening name, if `fen` is not an exact match\nfor a named position.\n" }, { "name": "speeds", "value": "", "type": "query", "description": "Comma separated list of game speeds to look for" }, { "name": "modes", "value": "", "type": "query", "description": "Comma separated list of modes" }, { "name": "since", "value": "", "type": "query", "description": "Include only games from this month or later" }, { "name": "until", "value": "", "type": "query", "description": "Include only games from this month or earlier" }, { "name": "moves", "value": "", "type": "query", "description": "Number of most common moves to display" }, { "name": "recentGames", "value": "", "type": "query", "description": "Number of recent games to display" } ], "auth": { "type": "oauth2", "flow": "authorization_code", "authorizationUrl": "https://lichess.org/oauth", "accessTokenUrl": "https://lichess.org/api/token", "credentials": { "clientId": "{{clientId}}", "clientSecret": "{{clientSecret}}" } } }, "docs": "**Endpoint: **\n\nGames of a Lichess player.\n\nResponds with a stream of [newline delimited JSON](#description/streaming-with-nd-json). Will start indexing\non demand, immediately respond with the current results, and stream\nmore updates until indexing is complete. The stream is throttled\nand deduplicated. Empty lines may be sent to avoid timeouts.\n\nWill index new games at most once per minute, and revisit previously\nongoing games at most once every day.\n\nExample" }, { "info": { "name": "OTB master game", "type": "http" }, "http": { "method": "GET", "url": "https://lichess.org/masters/pgn/:gameId", "params": [ { "name": "gameId", "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": "**Endpoint: `https://explorer.lichess.org/masters/pgn/{gameId}`**\n\nExample: `curl https://explorer.lichess.org/masters/pgn/aAbqI4ey`\n" } ] } ], "bundled": true }