Hi Simon,
One thing you could try is the Chess.com Published-Data API.
https://www.chess.com/news/view/published-data-api#pubapi-endpoint-games-archive
The "Complete Monthly Archives" API will allow you to retrieve game data for a specified year and month. You could call the endpoint with different usernames and month/year combinations to retrieve the FEN data you're interested in.
The endpoint is in this format (you can put it in your web browser URL or write a script):
https://api.chess.com/pub/player/{username}/games/{YYYY}/{MM}
For example, this link returns your games in June of 2020:
https://api.chess.com/pub/player/simonorellana17/games/2020/06
The data is organized as an array of games. Each game object includes a "fen" property with the value you're after.
Hi everyone,
I asked this question in the general chess.com forum and people referred me to this comunity.
I have a problem. I want to make some statistical analyses using the final position of several games. For this purpose, I need to know what pieces were left in the final position and in which square they were.
Due to the huge ammount of games (arround 1000), I need an automatic process or something similar.
I know that FEN code gives me that information, but I don't know how to extract the FEN code of the final position of this several ammount of games.
Does anyone have an idea on how to do this? Is there any software that allows me to do that?
All suggestions are welcome.