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!
Avatar of andreamorandini
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?
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":.......................
Avatar of davidFreelance
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.
Avatar of PayByCheck
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?
Avatar of andreamorandini
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.)
Hi everyone, I am finished with phase 1 of my web app. It is a website devoted to providing robust statistics about your game play. I am opening this up for open beta testing so feel free to sign up, check it out, see if you like it, and provide feedback. Thanks! https://www.chessalytics.com
ewizz614 wrote in https://www.chess.com/news/view/published-data-api comments: I am also running into some rate limiting issues for users who have a large volume of games.  Right now my application will make a request to get the archives for the user then loop through those archives to download the "/pgn" attachment for that user to get all of their games for that month, then move on to the next.  The code for my application runs in a linear fashion and will always wait to receive the response from a request before going on to the next (I think). This makes me think that the rate limiting issues I am facing is due to suspicious activity.  I was wondering if you guys could provide more information on how the rate limiting works and maybe could send me an email to discuss how I would need to develop my code around it?   Eric, It sounds like you are doing this correctly and there is a bug somewhere on the network. I've reviewed our server logs, and we only see records of delivering 429 coded responses 767 times in the past month, all more than a week ago. So your hunch may be right, and your requests might be getting caught by our anti-DDoS filters. In order to check, I'd appreciate your help: Can you provide the exact response including all of the headers, when you receive this error? Can you provide sample URLs, your IP address, or your custom user-agent string so we can filter out your specific requests and see what's happening? Thanks!
Two teams I help administer have substantial "dead wood". My first place to look to identify it was via the club members endpoint, which splits club members into three groups: Those active in the club in the last week Those active in the club in the last month Those members ever active in the club. Now that's all well and good, but if I have a smaller team and value players who participate in "important" team matches (e.g. TMCL) they may spend a lot of the year in #3 ("all_time") if: They don't post to notes The club has infrequent news postings. I assume here that making a move in a team match game does not count as activity; it would be good to have more explicit documentation of exactly what does (and does not) count as "activity" but it is practically a side issue, as my hypothetical "important" match player will sometimes have an opponent who doesn't actually play (closes account or times out). I still value my "important match" player so to find if they are active or not, I need to: Check their profile for last_online (which is also rather vaguely defined). If they have not been online for X(*) months then they're "dead wood" If they have been online, then to know if they're playing I need to look back through team matches to find when they played, and vote chess games which I don't think have endpoints yet. It is clearly possible to do both #1 and #2 immediately above, with #1 being trivial and #2 requiring some programming (or work with the JSON capable utilities perhaps). If all_time/monthly/weekly were better defined it would have some value, perhaps. I am interested in what was the last time an administrator did something, when people post to forums and even when people post notes, which is one thing which is documented to bump their activity level. Especially as there are no endpoints to such non-public data as clubs' forums when a club has made those forums private, as most do. I started out writing this post thinking I would propose that the division of weekly/monthly/all_time be scrapped. Instead I am thinking I would like it to stay (even if it is only updated each 24 hours or on some specific events) as I can work out without api.ches.com if I can't find matches they have played in what someone has been doing, by asking them if necessary. *I have seen members purged from clubs for not being active on chess.com (the easiest measure until recently) from as little as one month to as much as eighteen months, with the justification for the latter being a one year sabbatical with some time either side.