When at the source code I write the <span style=""> stuff and then only close it after <br /> tags, the span style stuff disappears and there is no formatting.Is this supposed to happen?Example:This is common stuff, but <span style="color: #ff0000;"><br />this should be red</span> stuff...
Hi, https://www.chess.com/news/view/published-data-api#pubapi-endpoint-country-players This is very clear that the cache is updated at most once per day. Indeed, for AU, I appear to trigger an update with a request >24 hours after my previous request. I strongly suspect I'm the only one using this endpoint for AU right now. (As I'm the "supplier of data" to people recruiting for Team Australia and city/state teams that's perhaps not surprising.) What is a mild nuisance is that my request must be made >24 hours after my previous one, or I don't trigger an update. If the maximum cache time were reduced to perhaps 23 hours (or even 23 hours 55 minutes) an automated job won't be chancing getting the old data at the end of the 24 hour cache period (already processed, presumably) and not getting new data until the day following. Plus some active users who are not online every day could slip through for a while if effectively new data is only seen every 48 hours. I hope: a) This makes sense (it's hard to explain clearly ) b) That reducing the cache to a bit below 24 hours is OK. Clearly for any country that is accessed my multiple people regularly there's no chance of unfortunate synchronisation, but for countries being accessed by one person it's a definite possibility. What I'd really like as my processing of the data is somewhat manual would be for the cache time to be dropped to 12 hours. Then I could do a day's run whenever I was ready as long as it was approximately a day after my previous run, and I'd get good (new) data.
The current score on the web page is different to the API probably due to different strategy on closed accounts. example https://www.chess.com/club/matches/791448 score is 337.5 v 323.5 https://api.chess.com/pub/match/791448 score is 314 v 307
Tricky_Dicky Mar 5, 2018
This bug occurs in matches with a Rating Max value declared during 'Registration' status. Example: https://api.chess.com/pub/match/873060 we got this: {"@id":"https://api.chess.com/pub/match/873060","name":"Warm-up Tournament R2 - Big Game Hunters vs Team Spain","url":"https://www.chess.com/club/matches/873060","start_time":1519923600,"status":"registration","boards":63,"settings":{"rules":"chess","time_class":"daily","time_control":"1/259200","min_team_players":1,"max_rating":1500,"min_required_games":0,"autostart":false},"teams":{"team1":{"@id":"https://api.chess.com/pub/club/big-game-hunters","name":"Big Game Hunters","url":"https://www.chess.com/club/big-game-hunters","score":0,"players":[{"username":"billforchess","rating":1330,"timeout_percent":0,"status":"premium"},{"username":"bsankar","rating":1345,"timeout_percent":0,"status":"premium"},{"username":"bufab","rating":1109,"timeout_percent":0,"status":"premium"}, ....................................................................................................................................................................... {"username":"lifin","timeout_percent":0,"status":"basic"} The user "lifin" has no rating data, probably because his rating is now above the Rating Max established for this match, but he is still in the list. The same happens to all players with ratings eventually out of limits. Have a nice day!
andreamorandini Mar 1, 2018
hi... i noticed that a team match score has updated on the website, but the JSON returned is still the old score. it seems there is some delay there, how long is it?
Montifeltro Feb 26, 2018
The start_time is missing from some matches. It is documented for all three match states: registration, in_progress and finished: "start_time" : timestamp, //manual or auto time start Example 1, registration state, Auto Start No, no end_time (correct) and no start_time (incorrect) https://www.chess.com/club/matches/black-stone/869846 https://api.chess.com/pub/match/869846 Example 2, finished state, Auto Start Yes, has end_time but not start_time: https://www.chess.com/club/matches/black-stone/719632 https://api.chess.com/pub/match/719632 Example 3, finished state, Auto Start Yes, has end_time but not start_time: https://www.chess.com/club/matches/black-stone/821492 https://api.chess.com/pub/match/821492 I can't spot a pattern: both old matches and new matches have the problem, but not all do. Of Black Stone's matches, 39 are missing their start_time and 198 have it present.
I'm seeing some club members show up in the "all_time" group or "monthly" whom I expected to be in "weekly". At first I put it down to caching (one had been away and returned ~24-36 hours ago) but this one is plain wrong. Documentation: https://www.chess.com/news/view/published-data-api#pubapi-endpoint-club-members Endpoint: https://api.chess.com/pub/club/asger-s-great-viking-warriors/members
Hi, I'm writing a report to figure out: a) Who in a team plays Chess960 b) Who of (a) hasn't signed up for a match c) What the last date a player in (a) played a Chess960 game, as some try it and don't like it d) ... and ratings plus W/L/D information of course! I have this oddity: @nomoneyhoney 2015 178W/41L/31D last_online: 2017-12-26 last game: 2018-01-23 The output is: Player, rating, W/L/D, last_online (from the player's profile) and the last 960 game (from stats). If the date of the last game is a few days after last_online I wouldn't worry: conditional moves, timeouts, etc. Let's look into it. https://api.chess.com/pub/player/nomoneyhoney {"avatar":"https://images.chesscomfiles.com/uploads/v1/user/19775150.1b79901c.200x200o.252b429ce6da.jpeg","player_id":19775150,"@id":"https://api.chess.com/pub/player/nomoneyhoney","name":"Gary Basanta","username":"nomoneyhoney","title":"FM","followers":635,"country":"https://api.chess.com/pub/country/CA","location":"Vancouver, British Columbia","last_online":1514254693,"joined":1416289221,"status":"premium"} 1514254693 is Tue Dec 26 02:18:13 2017 UTC. Matches my output, good. https://api.chess.com/pub/player/nomoneyhoney/stats {"chess_daily":{"last":{"rating":2107,"date":1506922623,"rd":132},"best":{"rating":2107,"date":1497835205,"game":"https://www.chess.com/daily/game/121937966"},"record":{"win":82,"loss":7,"draw":5,"time_per_move":36549,"timeout_percent":40}},"chess960_daily":{"last":{"rating":2015,"date":1516724409,"rd":77},"best":{"rating":2078,"date":1478254457,"game":"https://www.chess.com/daily/game/168462380"},"record":{"win":178,"loss":41,"draw":31,"time_per_move":36549,"timeout_percent":40}},"chess_rapid":{"last":{"rating":2007,"date":1497609919,"rd":141},"best":{"rating":2080,"date":1445576874,"game":"https://www.chess.com/live/game/1117461666"},"record":{"win":41,"loss":15,"draw":6}},"chess_bullet":{"last":{"rating":2402,"date":1508823356,"rd":27},"best":{"rating":2499,"date":1497611303,"game":"https://www.chess.com/live/game/2290885162"},"record":{"win":803,"loss":464,"draw":88}},"chess_blitz":{"last":{"rating":2425,"date":1508425414,"rd":49},"best":{"rating":2465,"date":1497862923,"game":"https://www.chess.com/live/game/1174895365"},"record":{"win":837,"loss":481,"draw":101}}} 1516724409 is Tue Jan 23 16:20:09 2018. My code is reporting the data I'm getting as JSON from api.chess.com, but those two values look quite odd. Now check the archives for @NoMoneyHoney (who appears to be on vacation) and the last 960 game he lost was a no vacation tourament game on 24 Jan 2018, which allowing for timezones fits the timestamps. Summary: no bug here, but stats can correctly report games ending quite some time after someone has been logged in if vacation is involved. A new tournament round started, the player is on vacation and not online, didn't notice, loses game(s) and stats is updated with a newer date than the last time the player was online. Puzzle solved. I am going to post this anyway (with a title without "bug" in it ) as this behaviour was counter-intuitive to me and may be to others.
Came across this today: https://api.chess.com/pub/player/baldemorski/games/archives {"archives":["https://api.chess.com/pub/player/baldemorski/games/2012/01","https://api.chess.com/pub/player/baldemorski/games/2012/02","https://api.chess.com/pub/player/baldemorski/games/2012/03","https://api.chess.com/pub/player/baldemorski/games/2012/04","https://api.chess.com/pub/player/baldemorski/games/2012/05","https://api.chess.com/pub/player/baldemorski/games/2012/06","https://api.chess.com/pub/player/baldemorski/games/2012/07","https://api.chess.com/pub/player/baldemorski/games/2012/08","https://api.chess.com/pub/player/baldemorski/games/2012/09","https://api.chess.com/pub/player/baldemorski/games/2012/10","https://api.chess.com/pub/player/baldemorski/games/2012/11","https://api.chess.com/pub/player/baldemorski/games/2012/12","https://api.chess.com/pub/player/baldemorski/games/2013/01","https://api.chess.com/pub/player/baldemorski/games/2013/02","https://api.chess.com/pub/player/baldemorski/games/2013/03","https://api.chess.com/pub/player/baldemorski/games/2013/04","https://api.chess.com/pub/player/baldemorski/games/2013/05","https://api.chess.com/pub/player/baldemorski/games/2013/06","https://api.chess.com/pub/player/baldemorski/games/2013/07","https://api.chess.com/pub/player/baldemorski/games/2013/08","https://api.chess.com/pub/player/baldemorski/games/2013/09","https://api.chess.com/pub/player/baldemorski/games/2013/10","https://api.chess.com/pub/player/baldemorski/games/2013/11","https://api.chess.com/pub/player/baldemorski/games/2013/12","https://api.chess.com/pub/player/baldemorski/games/2014/01","https://api.chess.com/pub/player/baldemorski/games/2014/02","https://api.chess.com/pub/player/baldemorski/games/2014/03","https://api.chess.com/pub/player/baldemorski/games/2014/04","https://api.chess.com/pub/player/baldemorski/games/2014/05","https://api.chess.com/pub/player/baldemorski/games/2014/06","https://api.chess.com/pub/player/baldemorski/games/2014/07","https://api.chess.com/pub/player/baldemorski/games/2014/08","https://api.chess.com/pub/player/baldemorski/games/2014/09","https://api.chess.com/pub/player/baldemorski/games/2014/10","https://api.chess.com/pub/player/baldemorski/games/2014/11","https://api.chess.com/pub/player/baldemorski/games/2014/12","https://api.chess.com/pub/player/baldemorski/games/2015/01","https://api.chess.com/pub/player/baldemorski/games/2015/02","https://api.chess.com/pub/player/baldemorski/games/2015/03","https://api.chess.com/pub/player/baldemorski/games/2015/04","https://api.chess.com/pub/player/baldemorski/games/2015/05","https://api.chess.com/pub/player/baldemorski/games/2015/06","https://api.chess.com/pub/player/baldemorski/games/2015/07","https://api.chess.com/pub/player/baldemorski/games/2015/08","https://api.chess.com/pub/player/baldemorski/games/2015/09","https://api.chess.com/pub/player/baldemorski/games/2015/10","https://api.chess.com/pub/player/baldemorski/games/2015/11","https://api.chess.com/pub/player/baldemorski/games/2015/12","https://api.chess.com/pub/player/baldemorski/games/2016/01","https://api.chess.com/pub/player/baldemorski/games/2016/02","https://api.chess.com/pub/player/baldemorski/games/2016/03","https://api.chess.com/pub/player/baldemorski/games/2016/04","https://api.chess.com/pub/player/baldemorski/games/2016/05","https://api.chess.com/pub/player/baldemorski/games/2016/06","https://api.chess.com/pub/player/baldemorski/games/2016/07","https://api.chess.com/pub/player/baldemorski/games/2016/08","https://api.chess.com/pub/player/baldemorski/games/2016/09","https://api.chess.com/pub/player/baldemorski/games/2016/10","https://api.chess.com/pub/player/baldemorski/games/2016/11","https://api.chess.com/pub/player/baldemorski/games/2016/12","https://api.chess.com/pub/player/baldemorski/games/2017/01","https://api.chess.com/pub/player/baldemorski/games/2017/02","https://api.chess.com/pub/player/baldemorski/games/2017/03","https://api.chess.com/pub/player/baldemorski/games/2017/04","https://api.chess.com/pub/player/baldemorski/games/2017/05","https://api.chess.com/pub/player/baldemorski/games/2017/06","https://api.chess.com/pub/player/baldemorski/games/2017/07","https://api.chess.com/pub/player/baldemorski/games/2017/08","https://api.chess.com/pub/player/baldemorski/games/2017/09","https://api.chess.com/pub/player/baldemorski/games/2017/10","https://api.chess.com/pub/player/baldemorski/games/2017/11","https://api.chess.com/pub/player/baldemorski/games/2017/12","https://api.chess.com/pub/player/baldemorski/games/2018/01","https://api.chess.com/pub/player/baldemorski/games/2018/02"]}https://api.chess.com/pub/player/baldemorski/games/2012/08 {"message":"Entity of type 'Chess\\WebBundle\\Entity\\LiveTournament' for IDs tournamentId(150740) was not found","code":0}My code received and reported a 404 error, inconsistent as it looks up the archives first and doesn't probe. I'm tempted to start with the current month and probe back, but the cross-check with what is supposed to be present and what is is probably useful. A missing arhive vs. a month a player didn't play a game can't be distinguished otherwise. This way they can be distinguished but I still can't get the games.
I have a game where a knight is placed on B8 and a knight is placed on E7, now the move in PGN says Nc6, how do I know which knight was moved? Shouldn't the PGN say "Nbc6" or something?
How does the API deal with timezones? I'm in Europe and every now and than I receive a message that I cannot download games with a date in the future. This happens around the first of the month so I'm guessing this is a timezone problem?
Hello, Using the call https://api.chess.com/pub/match/849418 I get this correct response: {"@id":"https://api.chess.com/pub/match/849418","name":"Match Team Italy vs Team Spain U1500","url":"https://www.chess.com/club/matches/849418","description":"Match Team Italy vs Team Spain U1500","start_time":1511715835,"end_time":1516908562,"status":"finished","boards":20,"settings":{"rules":"chess","time_class":"daily","time_control":"1/259200","min_team_players":20,"max_rating":1500,"min_required_games":40,"autostart":false},"teams":{"team1":{"@id":"https://api.chess.com/pub/club/team-spain","name":"Team Spain","url":"https://www.chess.com/club/team-spain","score":29.5,"result":"win","players":............... But with the match id = 815512 (https://api.chess.com/pub/match/815512) I get some properties like "@id", "description"and "teams.team1.name" missed (compare with the response above): {"name":"Below 1500","url":"https://www.chess.com/club/matches/815512","start_time":1502175624,"end_time":1515523267,"status":"finished","boards":83,"settings":{"rules":"chess960","time_class":"daily","time_control":"1/259200","initial_setup":"rnbkqrnb/pppppppp/8/8/8/8/PPPPPPPP/RNBKQRNB w KQkq - 0 1","min_team_players":1,"min_rating":0,"max_rating":1500,"min_required_games":0,"autostart":false},"teams":{"team1":{"@id":"https://api.chess.com/pub/club/team-spain","url":"https://www.chess.com/club/team-spain","score":81,"result":"lose","players":.......................
davidFreelance Feb 12, 2018
This Request For Comments covers a new set of endpoints to provide information about tournaments, tournaments' rounds and participants. Tournaments will be referenced by their "url" value, which is the unique string used for their URL on the website.   /pub/tournament/{url} This endpoint should provide all relevant information related to a specific tournament rules and stats:  { "name": name, "url": url of tournament, "description": description of tournament, "creator": url to creator, "type": game type, "status": status, // {finished, closed, in progress, registration} "start_time": timestamp, "finish_time": timestamp, "current_round": url to current round , //null if tournament is terminated "rules": { "time_control": string, //time control as defined in PGNs "is_rated": bool, "is_official": bool, "is_invite_only": bool, "min_rating": integer, "max_rating": integer, "initial_setup": string //if not standard, "initial_group_size": integer, "user_advance_count": integer, "max_concurrent_games": integer, "use_tiebreak": bool, "premium_only": bool, "allow_vacation": bool, "winner_places": integer, "group_size": integer, "registered_user_count": integer, "games_per_opponent": integer, "total_rounds": integer, "concurrent_games_per_opponent": integer, }, "players": { [ "user1", "user2", //list of player’s usernames ] }, "rounds": { [ "/pub/tournament/{url}/1", "/pub/tournament/{url}/2", //list of turns urls ] } } Updates: when a tournament status changes or a tournament's round ends   /pub/tournament/{url}/{round} This endpoint should provide all relevant information related to a specific round stats:   { "groups": { [ "/pub/tournament/{url}/1", "/pub/tournament/{url}/2" //list of groups urls ] } } Updates: when a tournament's round ends   /pub/tournament/{url}/{round}/{group} This endpoint should provide all relevant information related to a specific round's group stats:   { "games": { [ //list of games { "white": { // details of the white-piece player: "username": "string", // the username "rating": integer, // the player's rating at the start of the game "result": "string", // the player's result, if game's finished "@id": "string", // URL of this player's profile }, "black": { // details of the black-piece player: "username": "string", // the username "rating": integer, // the player's rating at the start of the game "result": "string", // the player's result, if game's finished "@id": "string", // URL of this player's profile }, "url": "string", // URL of this game "fen": "string", // current FEN "pgn": "string", // final PGN, if game's finished "start_time": timestamp, // timestamp of the game start (Daily Chess only) "end_time": timestamp, // timestamp of the game end, if game's finished "time_control": "string", // PGN-compliant time control "time_class": "string", // time-per-move grouping, used for ratings "rules": "string" // game variant information (e.g., "chess960") } ] } } Updates: when a game updates   /pub/player/{username}/tournaments  This endpoint should provide all relevant information related to which tournaments a player has attended: { { tournaments: { [ { "url": url, //url to tournament "wins": integer, //number of wins "losses": integer, //number of losses "draws": integer, //number of draws "points_awarded": integer, //points awrded "status": string // {winner, active, registered, invited, eliminated, withdrew, removed} "placement": integer, // final placement if tournament is finished "total_players": integer, //total players in tournament } ] } } } Updates: when a tournament status changes   Does this endpoint get you what's needed for your? Are there related data we missed that are essential? If possible, please include specific examples of how you intend to use the data, especially if you request that we change this output in some way.
PayByCheck Feb 9, 2018
It would be nice if the Profile endpoint would provide information as to the status of a user. For example whether they are 'online', in 'live', or have not been on for a few hours. Maybe the existing `last_online` could also be changed so as to show the actual time the user was last online / active on the site instead of the last log in -i.e after actually logging out of the site. Perhaps a new `last_active` attribute could be added to support this and the `last_online` attribute be renamed to `last_login`. Plus an attribute for showing whether the player is just online or in live as well.
The games played today (and the last of the day before) are missing from the monthly archives. Api : https://api.chess.com/pub/player/Revaes/games/2018/02 Website: https://www.chess.com/games/archive The last game shown in de api was played on feb 7th 15h03, while the last game played was feb 8th around 11h15
The current endpoint for fetching tournaments does not seem to accept live tournament ids. I would really appreciate the ability to fetch information about these live tournaments, as well as the final standings upon completion. Is this something I could expect to see implemented in the future?
andreamorandini Feb 5, 2018
This Request For Comments covers four new endpoints to describe a Club and its membership. Clubs will be referenced by their "url" value, which is the unique string used for their URL on the website.   /pub/club/{url} This is the data representation of the club itself. The data response will include: "@id" : based on the url "name" "club_id" : the internally-used, never-changing numeric ID "country" : URL to the country endpoint the Club identifies itself as part of"location" (may be null) "created" : timestamp of the time created "last_activity" : timestamp of the time of the last news, forum, or other activity (used to see if there is "new" content) "admin" : array of player profile URLs for admins and super-admins of this club "visibility" : either "private" or "public", based on if the Club is private "join_request" : URL to request joining the club "icon" : the group image (may be null) "description" : full text description (may be empty string, and may be quite long)   /pub/country/{XX}/clubs An array of club endpoint URLs per country. Updated once per day, like other country endpoints.   /pub/club/{url}/members An array of player profile endpoint URLs per club. Updated once per day, like the country endpoints.   /pub/player/{username}/clubs An array of club endpoint URLs per player. Updated once per day, like the country endpoints.     Club stats and games will be described in future RFCs.
Hi everyone, I think I found all of the issues from my rough start. The site is now reopen for beta testing. Issues found and fixed: Unable to log in after subscribing - member insert function fixed. Records missing - found decoder and parser error. Actually completely rewrote the JSON decoder and parser function and now it is working better than before. Records update - rewrote the update function based on the new iteration of the decoder and parser function. Opponent average rating stats were incorrect - found errors in query and fixed. Added a new breakdown - by tournament stats. The web address is https://www.chessalytics.com Please dont be afraid to provide with honest feedback. Thanks for all of your help.
Hi, This time I promise I've a real live discrepancy between the documentation and what the match endpoint delivers. Documented: "teams": [ "team1": { "@id": "URL", // API URL for the club profile "name": "string", // club name The @id is provided but "name" is not. I think I'd like to have it rather than the documentation be updated to delete "name" as in user-visible reports the name will mean a lot more than @id (and there is no @url either, as has been discussed elsewhere). Cheers, Giles
Bug: some downloaded archives contain games without any moves This probably isn't an api.chess.com bug, as I see the same problem on the website. A game (https://www.chess.com/daily/game/179336564 is an example) is not 100% usual: 1. Unrated 2. Tournament game starting in a custom position. In the second round of the tournament I would like to review my play in the first round, especially as i was the only player to win twice as black! Not having access to the old games means repeating analysis. Maybe I'll analyse better this time. (But not really; I don't have time. I'll withdraw from the tournament instead if this breakage isn't fixed before I need to move.)