lichess-org / api

Lichess API documentation and examples
https://lichess.org/api
GNU Affero General Public License v3.0
429 stars 142 forks source link

Endpoint for individual puzzles #149

Closed skrewz07 closed 2 years ago

skrewz07 commented 2 years ago

Would it be possible to add an endpoint to retrieve information about individual puzzles, given the puzzle ID? In particular, information about the game it came from, the puzzle rating and number of times played, and puzzle themes would all be very interesting.

My current use case is that I'd like to write a script to go through the puzzles from a user's games, and see how often they are on the receiving end of the tactics.

Thanks in advance!

niklasf commented 2 years ago

Did you see this export of all puzzles? https://database.lichess.org/#puzzles

It's definitely a bit bulkier than a single API request, but the size is still very managle.

skrewz07 commented 2 years ago

Ah, thanks for the pointer. I'm looking to run the script online, via a Twitch chat bot, so going through the entire database of puzzles isn't really practical for me. I'll look for another way!