Lightweight API to retrieve player games data

Sort:
elyctrical97

Hi, I'm looking for a lightweight and fast way to retrieve a player's live game history. The only way I found is to use the monthly archive (https://api.chess.com/pub/player/{username}/games/{YYYY}/{MM}), but it can be massive with hundreds of verbose PGNs. Will it be possible to support a more lightweighted way to retrieve this data? (i.e retrieve games only for a specific day/time range, retrieve only the links to the games...)

stephen_33

I once described the kind of API the site supports as being like a modern DIY store - it doesn't matter if you need only two screws of that size, you still have to buy the pack of 20 because that's all they offer.

I mostly use team match related endpoints and generally need only 'open' and 'in-progress' matches but I still have to download data on hundreds of finished matches because the endpoint(s) are built that way. I suggested 'open' and 'in-progress' might be separated from 'finished' a year or two ago and the member of staff sounded positive about it but that hasn't been implemented yet as far as I know.

So by all means make suggestions but don't hold your breath?

cezarywagner

It possible but it is hard to do and undocumented - download one game. Whatever it need very complicated encoding and board to transform this into PGN so I think it is useless.

Better is this method (faster).

https://github.com/ChameleonRed/cw_download_chess_com_games

 

acity609

 

At some point TrickyDicky (Mod) will come on here and say "This is not the place for suggestions" Lol But since they don't have what the OP is asking it is essentially a suggestion to add  and I quote a ''... specific day/time range... '' to their API. I'll add that they need to hire an API developer that actually knows what the user wants. I think the public's constant complaint of cheaters has made them not want to open too much of their system via API's to the public ( in particular games in progress ) 

cezarywagner
acity609 wrote:

 

At some point TrickyDicky (Mod) will come on here and say "This is not the place for suggestions" Lol But since they don't have what the OP is asking it is essentially a suggestion to add  and I quote a ''... specific day/time range... '' to their API. I'll add that they need to hire an API developer that actually knows what the user wants. I think the public's constant complaint of cheaters has made them not want to open too much of their system via API's to the public ( in particular games in progress ) 

It is very unclear message and I think you think wrongly.

chess.com is more 10 000 000 USD business (93 000 000 users) so they have a lot of programmers (no need employee) but probably they have not high skill designer/programmer since they cost too much like me happy.png

Problem can be also wrong managers which has not evolution skills but stay on same position.

Opening API is not related to cheating - I am not checked but I think that game in progress is available.

It is no matter cheater can use software which scan image and it is invisible - so no matter if API is open - opening API only helps to catch cheater since they are tracked happy.png

I think also that chess.com cheater detection is better than on lichess.org but still it is not good enough since also little obsolete - I play many cheaters and it is very visible in my anticheater tool but chess.com is blind on this - maybe they mark cheater with some delay.

For me cheater must be stupid if he think that I can not play with stockfish without his service - no idea why someone work like stockfish - it really waste of cheater time.

I think only reason why API is weak that it is obsolete and there is no very good engineer to redesign whole service and document API.



elyctrical97

This API has nothing to do with cheating since it returns only finished games. In my opinion it's problematic that the smallest time unit to retrieve games from is a month - because a month worth of verbose PGNs can be more than 10MB of bandwith and the API user probably wants much less than that.

Also in terms of server programming, I would guess that supporting getting games by day shouldn't require a lot of work when the month option is already implemented. 

cezarywagner
elyctrical97 wrote:

This API has nothing to do with cheating since it returns only finished games.

Bullshit happy.png

How you can play game with API which return finished games - it is impossible happy.png

What if you hit F5 in browser - game will not disappear so API not work like you describe.

cezarywagner
elyctrical97 wrote:

Also in terms of server programming, I would guess that supporting getting games by day shouldn't require a lot of work when the month option is already implemented. 

For such experienced programmer like me it take some minutes happy.png
I do not remember but I think my tool updates game after any change.

https://github.com/ChameleonRed/cw_download_chess_com_games

If not will fix it in future.

Whatever I prefer to download all at once and cache what is downloaded to no repeat and waste time and power.