lichess.org
Donate

Trying to find accuracy from the API

Hello, I have been attempting to find my worst accuracy game using the lichess api. I have been attempting to games with the get statement lichess.org/game/export/{Game ID}?accuracy=true but this does not show the accuracy percentage. I made sure to only check games that have been analysed. Anyone know how I can get accuracy to show up?
The endpoint is correct if you want one game. Make sure you're explicitly stating you want json. A lot of the optional fields will not show in PGN.

curl -H "accept:application/json" lichess.org/game/export/{id}?accuracy=1

Accuracy and acpl are listed under the players field in the response.
Hi!

I wrote a Java program which uses the "chariot" library to check the "top" 10 worst accuracies of a Lichess user,
gist.github.com/tors42/d460c5c709c4c80c5eff35c9176471e3
Included an example run for my account (why oh why do you want to see _worst_ results! :) )

PS, I took the liberty to run it also for your account,
will send the result to your inbox.

Chess on!
Make an error in the opening and the accuracy drops, but a player can still save the game.
Make an error in the end game and the accuracy should drop if it drastically affected the WDL ratio.

Maybe accuracy should be displayed by phase and not by complete game. The complete game is the end result.
Thanks everyone! I am now working on writing a script for one of my classes that will find the worst game given an individual player's lichess username. This is primarily intended as programming practice so I don't expect it to exactly be the most accurate measure of worst game, but I thought it would be fun. I'll post it here once I'm finished.