Live Games Archive

Sort:
djcaf

Hi,

  The documentation at: https://www.chess.com/news/view/published-data-api#pubapi-endpoint-games-archive-list implies that live games should be returned by the following (or any similar) URL:

https://api.chess.com/pub/player/djcaf/games/2011/11/pgn

 

This does not seem to be the case. Unless I am missing somthing the following live game should be returned but does not seem to be;

https://www.chess.com/live/game/202420638

Any ideas?

Thanks

stephen_33

djcaf, I have no problem downloading some of that API data within a browser window but how are you accessing the endpoint? Perhaps your problem lies here:-

The response has two special headers worth noting if programmatically hitting this endpoint (browsers handle these automatically):

  • Content-Type: application/x-chess-pgn 
    This content type indicates the type of parser needed to understand the data
  • Content-Disposition: attachment; filename="ChessCom_username_YYYYMM.pgn" 
    This disposition indicates that browser should download, not display, the result, and it suggests a filename based on the source archive
stephen_33

I think I see - the API response gives a listing of only Daily games, correct? I know the developers are having a couple of problems with returning PGN's in general, so it may be that the site is set up to give only Daily ones for now?

This needs a staff member to comment!

andreamorandini

@djcaf the PubAPI  are supposed to return both daily and live games so it looks like you are experiencing a bug. I will keep you informed.

andreamorandini

@djcaf sorry for the long waiting. The bug has been fixed and you should be able to test https://api.chess.com/pub/player/djcaf/games/2011/11/pgn . Other player's archives will be fixed and refreshed in the upcoming hours.

djcaf

Appologis for the rather late response - I had just discovered this API when I reported this then forgot about it until now. Anyway yes it does seem to return live games now. Thanks happy.png