How to find details on specific Daily game

Sort:
youhadyourchance

I can't find anything about this.... have i missed something?

stephen_33

There's no specific endpoint for an individual game of any type, that can be accessed by means of its game ID. The only form of access is that via team matches & player archives I believe.

youhadyourchance
stephen_33 wrote:

There's no specific endpoint for an individual game of any type, that can be accessed by means of its game ID. The only form of access is that via team matches & player archives I believe.

So i can't lookup a game from a player's archive?

stephen_33

"So i can't lookup a game from a player's archive?" - that isn't what I wrote & it isn't what was asked for!

What you can't do as far as I know is to access a game's endpoint using the game ID. You can access the complete PGN's of a member's games from their archive.

My point is, if you start with a game ID & have nothing else, I know of no way you can access endpoint data for it. You'd need to visit the webpage for the game & then use one of the players' archives to locate endpoint data.

stephen_33

From your archive for October:-

https://api.chess.com/pub/player/sorrynottoday/games/2019/10

.....

{"url":"https://www.chess.com/daily/game/238251070","pgn":"[Event \"DCL Minimatch 1-5 Players - Board 2\"]\n[Site \"Chess.com\"]\n[Date \"2019.09.28\"]\n[Round \"-\"]\n[White \"SorryNotToday\"]\n[Black \"HolographWars\"]\n[Result \"1-0\"]\n

So you can obtain the details of a Daily game with its URL, including the game ID but you first have to know where to find the game within the player's archive.
chrka

I don't really recommend using scraping since it's highly reliant on the exact layout of the webpages but as a temporary solution it works pretty well. 

I've posted a small example using Python and Selenium to get at the players for a certain game id in this gist.

(It's also possible to get at JavaScript stuff via Selenium which is actually easier, but requires some reverse engineering and can also be fragile, for example if identifiers are obfuscated/compressed &c.)

stephen_33

SorryNotToday hasn't explained what it is he's trying to do? That might help.

NechIvVas

I had a similar question. We know the name of the player and the ID of the daily game and need to get the result of the game (White win, Black win, Draw, Not finished yet). But if the game isn't over yet, will it be absent in the archive?

stephen_33
NechIvVas wrote:

I had a similar question. We know the name of the player and the ID of the daily game and need to get the result of the game (White win, Black win, Draw, Not finished yet). But if the game isn't over yet, will it be absent in the archive?

This isn't a part of the API I use but it seems that the answer is yes, current games cannot be accessed via any endpoint, except for the bare 'time remaining' data. I can't find any data on opponent or PGN.

Strange because if the site is prepared to provide this...

https://api.chess.com/pub/player/nechivvas/games/to-move

{"games":[{"url":"https://www.chess.com/daily/game/244238386","move_by":1576499474,"last_activity":1576413074}]}

How much more trouble to provide details such as opponent & PGN?