Inconsistencies in PGN data available in the API vs "Export Button"

Sort:
tryingtolearn1234

PGN data from the API Endpoint is different from the Chess.com web "Download PGN" option. 

The archive api and web based download return different fields and differ in the in the information provided in moves.  It would be best to merge these and have all the data accessible, instead of different data for each view.

Here is a summary of the differences I see:

API Endpoint provides the following additional information not found in Web "export/download":

  • ECOUrl -- a link to the chess.com discussion of the opening
  • LInk -- link to the game
  • EndDate 
  • StartTime -- note this is always the same as EndTime except in Daily games -- IMO this should be the actual start time of the game or omitted as in the Web interface.

Web provides the following additional information not found in  API:

  • Game clock information with each move. formatted as {%clk}

Example:

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

Via player api under the archive

https://api.chess.com/pub/player/tryingtolearn1234/games/2017/05

[Event "Live Chess"]
[Site "Chess.com"]
[Date "2017.05.16"]
[Round "-"]
[White "tryingtolearn1234"]
[Black "111roger"]
[Result "1-0"]
[ECO "C47"]
[ECOUrl "https://www.chess.com/openings/C47-Four-Knights-Game-Italian-Variation"]
[WhiteElo "1118"]
[BlackElo "1048"]
[TimeControl "600"]
[Termination "tryingtolearn1234 won by checkmate"]
[StartTime "02:48:20"]
[EndDate "2017.05.16"]
[EndTime "02:48:20"]
[Link "https://www.chess.com/live/game/2103285046"]

1. e4 e5 2. Nf3...(game continues)

Via the Download Feature

[Event "Live Chess"]
[Site "Chess.com"]
[Date "2017.05.15"]
[White "tryingtolearn1234"]
[Black "111roger"]
[Result "1-0"]
[ECO "C47"]
[WhiteElo "1003"]
[BlackElo "974"]
[TimeControl "600"]
[EndTime "19:48:20 PDT"]
[Termination "tryingtolearn1234 won by checkmate"]
[CurrentPosition "2bk1b1r/3pqpp1/1Q1N3p/2p5/2B5/8/PPP3PP/1K1R4 b - - 0 18"]

1.e4 {[%clk 0:10:00]} e5 {[%clk 0:09:59]}....

skelos

I'd like this too. I have previously requested "Link" in games downloaded via the web interface, and someone was going to pass that request on. (Sorry, I forget who.)

I would like to have the timing information for live games too.

 

StartTime should be consistent, and it looks like there is a bug if it is the same as EndTime when a game has been played.

 

skelos

Again, in general, website data and api.chess.com data should match as much as possible. There may be some situations where it's infeasible or impractical and not cost-effective, but in an ideal world ... wink.png

andreamorandini

Thank you @tryingtolearn1234 and @skelos. We have used PubAPI also to test new services improvements, like the PGN generation. Before replacing legacy PGN with the new system we want to be sure that everything works as expected.

 

So:

  • The missing "{%clk}" was actually a bug that has been fixed and is going to be rolled out soon,
  • We are internally discussing how to handle "startTime" for Live games,
  • "EcoURL" and "Link" are actually addition to the new system that will be available everywhere when we will replace the old system with the new one 
skelos

Nitpick: Eco perhaps should be ECO since it is an acronym? "ECOURL" is ugly, to be sure. Hence, a nitpick. happy.png

I like the idea of consistency. My cached data continues to get out of date, but that's no big deal comparatively!

tryingtolearn1234

Thanks for fixing this.  I've been looking at it and it looks great.

rafaelmonge

In web you could choose if you like the move time or not in the PGN but I don't know how to set this in the API. I can't find it in the documentation.

 

When use the API I always get the move time by default. It could be very useful set this via API parameter.