lichess.org
Donate

Download all games

Hello,
for analysis purposes I would like to download all the games I played (maybe in a big textfile containing all the .pgn snippets or a .zip file with one .pgn file per game).
Since you have them all in a database or something I suppose, it shouldn't be too hard to implement this.
Could you offer this feature?

Thanks!
Haha, I was thinking about this exact problem not 10 seconds ago. I know of a way that you can do it, but it involves writing a script, and I'm not sure how happy Thibault will be if you try and sequentially curl 500 pgns off the server.

You see, on your user page there's a download button that will download a CSV (comma separated values) of all the games that you've played. One of the columns in this spreadsheet has the URL of the PGN associated with the game. Now, you're just a few lines of code away from downloading all of your PGN files.

Here's a hint if you want to do this in PHP: http://www.php.net/file_get_contents

While we're on the topic, Thibault. Is there a way that I can download the PGNs of all the games played on lichess without giving the server a hard time? I recognise that the file will likely be a few gigs, but it'll be useful for the database that I'm building, especially when you consider the computer analysis is already associated with many of the games.
Thanks a lot! I guess I never saw the the export button, but yeah with a little script it shouldn't be too difficult. Cool!
I don't mind people scripting lichess. But you can't make more than 10 requests per second. Passed this threshold, you'll get 503 errors.

Clarkey, do you really think lichess games are interresting for a database? Many of them are utter crap.
Haha, true. I'm really just trying to get a large amount of data on a lot of games whether they are good or bad. I'll be adding GM games from http://www.pgnmentor.com/files.html and any other public databases I can get my hands on.

Having games from lichess will help find traps that low level players fall for.

Depending on how far along I get with developing this software, I may leave my computer on for a few months to run analysis on these games. This is mainly my holiday project between semesters at uni.
it will be good database if put there games only players whose rating above 1700 for example. Clarcey you can capturing current games here http://en.lichess.org/stream for your database.
From an educational perspective it is actually quite interesting to have a big database of games by amateur players. A chess trainer can see which mistakes are common in which openings and can help chess players to not make those mistakes again. But I think most players would be more interested in a database of their own games (with analysis and winning percentages).
Good. I will develop an export stream for PGN. Don't hesitate to remind you need it :p so it gains priority in the todolist
That's pretty neat, thanks for pointing that out, allibek.

The database I'm creating revolves around 3D graphing, and will use a webGL interface. Because of this I can do a lot of interesting graphical layouts. One of the things that I'm currently thinking about is filters and how to index the DB entries to allow for various forms of searches.

This topic has been archived and can no longer be replied to.