Writing a chess data application. Need help getting started.

Sort:
Avatar of JeroenWolfe

Hello chess.com developer community!

I'm currently in a training program for Big Data. For my first project, I'm hoping to write a simple application for reading and analyzing chess games. It looks like I can use chess.com to acquire this data which is obviously the first step, however, I'm not sure how to go about it. Tips for how to begin this process would be much appreciated! Essentially my application will just be reading in chess game data, and organizing that data into a database. It may do other things but that's the starting point at least.

Thanks!

Avatar of Nevfy

https://www.chess.com/news/view/published-data-api

Avatar of stephen_33

Do you have any experience of using a site's API?

Avatar of Sobuj1671

Please can you explain what does mran "API'. Thanks

Avatar of Martin_Stahl

Application Programming Interface

Avatar of JeroenWolfe
stephen_33 wrote:

Do you have any experience of using a site's API?

I do not. I was looking into it at the link shared by Nevfy. It seems that things are organized by player so I can access game information like the moves and so forth by looking up a player and getting the png. I still have some digging around to do so please correct me if I'm wrong there.

Avatar of stephen_33

Correct, game data is contained within player endpoints, so your first task is to decide on which players you intend using?

Avatar of JeroenWolfe
stephen_33 wrote:

Correct, game data is contained within player endpoints, so your first task is to decide on which players you intend using?

Sounds like a plan. For simplicity,d I'd like to start by just downloading a player's data and using that as a sort of test case before worrying about accessing the API itself with my app, at least for now. Am I able to do this?

Avatar of stephen_33

It's very wise to start on the smallest scale & expand from there. I spend most of my time processing team matches rather than individual player data but I think you need to start with a player's archive of available games? Take your own:-

https://api.chess.com/pub/player/jeroenwolfe/games/archives

{"archives":["https://api.chess.com/pub/player/jeroenwolfe/games/2020/05","https://api.chess.com/pub/player/jeroenwolfe/games/2020/06","https://api.chess.com/pub/player/jeroenwolfe/games/2020/10","https://api.chess.com/pub/player/jeroenwolfe/games/2020/11","https://api.chess.com/pub/player/jeroenwolfe/games/2020/12"]}

Then using the first of those monthly archives:-

https://api.chess.com/pub/player/jeroenwolfe/games/2020/05

The PGN's are available in that endpoint for all of your games in that month.
Does that help?
Avatar of stephen_33

But this is what I think you need to read...

https://www.chess.com/news/view/published-data-api#pubapi-endpoint-games-archive 

 

Avatar of JeroenWolfe
stephen_33 wrote:

Thanks! I think I'm ready to get started you've been very helpful!

Avatar of stephen_33

You're most welcome, that's what this club is for  😊