Export a single study
Path Parameters
The study ID (8 characters)
Query Parameters
Include clock comments in the PGN moves, when available.Example:
2. exd5 { [%clk 1:01:27] } e5 { [%clk 1:01:28] }Include analysis and annotator comments in the PGN moves, when available.Example:
12. Bxf6 { [%cal Gf6g7] } gxf6 { White is slightly better here. }Include non-mainline moves, when available.Example:
4. d4 Bb4+ (4... Nc6 5. Nf3 e6 6. Bd3) 5. Nd2Add a
Source PGN tag with the study chapter URL.Add a
Orientation PGN tag with the chapter’s configured orientation.Response
Returns a PGN file with all chapters of the study. Each chapter is represented as a separate game in the PGN.application/x-chess-pgnattachment; filename="{study-name}.pgn"Example
Export a single chapter
Path Parameters
The study ID (8 characters)
The chapter ID (8 characters)
Query Parameters
Include clock comments in the PGN moves, when available.
Include analysis and annotator comments in the PGN moves, when available.
Include non-mainline moves, when available.
Add a
Source PGN tag with the study chapter URL.Add a
Orientation PGN tag with the chapter’s configured orientation.If the chapter has a computer analysis, include it in a custom
X-Lichess-Analysis HTTP header.The analysis is returned as a JSON object containing evaluation and best moves.Response
Returns a PGN file with the requested chapter.application/x-chess-pgnattachment; filename="{study-name}_{chapter-name}.pgn"JSON analysis data (only if
analysisHeader=true and analysis is available)Example
Export all studies of a user
If authenticated as the user, private and unlisted studies are included. Otherwise, only public studies are exported.
Path Parameters
The username. Use
me to export studies of the authenticated user.Query Parameters
Include clock comments in the PGN moves, when available.
Include analysis and annotator comments in the PGN moves, when available.
Include non-mainline moves, when available.
Add a
Source PGN tag with the study chapter URL.Add a
Orientation PGN tag with the chapter’s configured orientation.Response
Returns a streaming PGN file containing all chapters from all studies. This may be a very large file depending on how many studies the user has created.application/x-chess-pgnattachment; filename="{username}-all-studies.pgn" or {username}-public-studies.pgnExample
List studies of a user
If authenticated as the user, private and unlisted studies are included. Otherwise, only public studies are returned.
Path Parameters
The username
Response
Returns an nd-json stream of study metadata objects.The study ID
The study name
Unix timestamp in milliseconds
Unix timestamp in milliseconds
Study owner information
List of study members (contributors)
Number of chapters in the study
Number of likes the study has received
One of:
public, unlisted, or private
