Hi, I built a web app that pulls a player's games and 1) shows the number of games for each year and time control combination 2) identifies the highest rated player played and their rating 3) identifies the highest player beaten and their rating 4) shows who a player has beaten and lost to the most 5) identifies the five best and worst openings for each color for a given year and time control combination and 6) shows graphs of a player's average rating over time. This is a beta version and feedback is appreciated. Thank you for your consideration, https://chess-analytics.herokuapp.com/
Hi all, Has someone come across a way to programmatically create a challenge link for a game based on parameters, or perhaps knows a way to automate it? Much appreciated
Avatar of Vert19800
Vert19800 Oct 5, 2022
Hi everyone, I have an app in which I generate FEN strings and I would like users to be able to launch their phone's Chess.com app, and/or the website via some chess.com/analysis?FEN=X sort of URL. Does that capability exist? I tried working with the analysis?FEN= url from the analysis page, but I can't seem to properly get it to recognize the FEN. A deep link directly through the app would be even better, but the url method should be fine as well. I searched around a bit but could not find any sort of information on this aside from an old 2019 request here: https://www.chess.com/clubs/forum/view/deeplink-open-chess-com-app-with-a-fen-position Thanks for any help you can provide!
Avatar of pawnpatrol_pawnpatrol
pawnpatrol_pawnpatrol Sep 29, 2022
(This isn't so much a problem with the site's API as a problem between the way data is represented in club endpoints and club home-pages) I help run a VC league and we had a strange situation earlier in which one team was unable to find their opponent while setting up their game challenge/seek. The club is 'The Square Knights' and I was skeptical until I tried sending a VC challenge myself and got the 'No results found' response. It looked like being a problem with the club name and a check of the club's api data showed what it was.... https://api.chess.com/pub/club/the-square-knights "name":"The Square Knights" Note the double-space between Square and Knights! I remember having a very similar problem a few years ago and I was told then that the correct spelling for any club is always as given in the endpoint data. That's fine and dandy if you know your way around the site's api but can't something be done to fix this problem permanently? It's a hopeless situation for team admins to be copying a club's name into the VC game search field only for it to fail every time without any clue as to why.
Avatar of stephen_33
stephen_33 Sep 2, 2022
There's this Accuracy feedback after every game, but how about the Elo you played like? Throw millions of games from chess.com to train some AI machine and feedback every player after his game what Elo he played like, could be a cool feature IMO.
Avatar of Tricky_Dicky
Tricky_Dicky Aug 4, 2022
One of the things I keep an eye on in the team-match leagues I help to run is player removal at the registration stage. It's sometimes done in order to manipulate teams and make them stronger by removing the lowest rated players. In fact I've been surprised at how very unusual it is for admins to do this, at least in the tournaments I help supervise. But I just did a second sweep of a set of matches that are due to start in a few days and had a program failure I haven't encountered before. It was for this match:- KOTML S34 R1 Squadron Commandos vs Waldesrauschen On the previous sweep of teams I'd collected this list of players for the Waldesrauschen team:- [0812leonliu,a-marinho,arthurlee2021,av1224,bananapeelthegm,bigsoccer12,cvijad,eagle_268,gnomenreigen,myauno,pripor,raison88,rocknmetalforever45,rookside_castling,sammli,stavan2004,sulaluka,tired_of_ignorance] All matches in our leagues must have the 'Minimum Games' setting set at 10 games and this is the case in this match. But the player @stavan2004 was detected as missing on my most recent seep through and that prompts a check of the player's "timeout_percent" figure to decide whether or not the removal is allowed (we permit the removal of players with rates at or above 15%). That's when things went pear-shaped because the following endpoint has no "chess_daily" field! https://api.chess.com/pub/player/stavan2004/stats {"chess_bullet":{"last":{"rating":1372,"date":1658770331,"rd":246},"best":{"rating":1372,"date":1658770331,"game":"https://www.chess.com/game/live/52509094135"},"record":{"win":1,"loss":0,"draw":0}},"chess_blitz":{"last":{"rating":1404,"date":1658947200,"rd":248},"best":{"rating":1404,"date":1658947200,"game":"https://www.chess.com/game/live/52685966885"},"record":{"win":1,"loss":0,"draw":0}},"fide":0,"tactics":{"highest":{"rating":818,"date":1658770352},"lowest":{"rating":802,"date":1658770358}},"lessons":{},"puzzle_rush":{}} My question is - how is it possible for a player with no history of Daily games to enter a match in which the Minimum Games setting specifies ten games?
Avatar of Tricky_Dicky
Tricky_Dicky Jul 31, 2022
Found two significant errors in end point https://api.chess.com/pub/match/1401215 CC22 Under 1300 Group A Round 4 Devon Chess v Team Dorset Player @jim78 daily rating changed two days ago but is still incorrectly classed in this match as 'Out of rating range' @dhalllawrence was FPV closed three weeks ago. In these matches score is still show as the board finish and not defaulted to opposition win because game archive icon is shown as 'Account closed' not 'Closed: Fair play' https://www.chess.com/club/matches/1385887 https://www.chess.com/club/matches/1356341 https://www.chess.com/club/matches/1350997 The match scores are inconsistant with the aggregated board scores. Also still waiting for the country code login to be resolved after 6 months https://api.chess.com/pub/country/{iso}/players I get the impression the API is no longer of any interest to Chess.com
Avatar of Tricky_Dicky
Tricky_Dicky Jul 25, 2022
This follows from discussion in notes, transferring here @bcurtis' request. 1. Having player_id and group_id be guaranteed to be continued to be provided(*) would be of benefit as account names may both be changed and reused, and prior to club_id appearing (perhaps it was always there, and I missed it?) there was no way to track group name changes. Club name changes are critically important for the many team-based competitions on chess.com, such as TMCL (Team Match Championship League) that @stephen_33 helps run. (club_id 35246). (OK, https://api.chess.com/pub/club/team-match-championship-league) Group name changes are not uncommon: France/Deutschland Group changed to France-Deutschland Group to make something easier (I don't recall the details) and Great Viking Warriors changed name temporarily to Asger's Great Viking Warriors and then decided to make the change permanent. A number of Australian city/state teams regularised their names. (To a format I don't like, but hey, wasn't my decision.) User name changes are not uncommon either, and it is useful to have an unchanging reference when tracking members (who has played in what matches?) if any cached data is involved (and long-lasting groups play a lot of matches). A consistent player_id is also useful when tracking potential trolls, abusive members and cheats 2. An endpoint to find a member by player_id saves having to stumble across them, or else try to track every active chess.com member and their current profile 3. An endpoint to find a club by club_id would ease running competitions via tools using api.chess.com, as the club_id can be recorded as the competition entrant and competition administrators don't even need to be told of club name changes; they will be obvious. From the current documentation: (*)Note: the "player_id" is provided as a convenience to determine when a username has been changed. If you retrieve a Player Profile by the username-based URL linked from a Game or other object, and this new Player Profile has a "player_id" that matches a Profile you previously downloaded, then you can safely assume that this new Profile replaces the old, and all URLs with the previous username will now be found under the new username. This should be an extremely rare occurrence. This "player_id" will never change for a given account, however the future availability of this ID is not guaranteed.
Avatar of stephen_33
stephen_33 Jul 24, 2022
G'day everyone. I'm putting together a website and I'd like to use the embeddable iframe share option that chess.com offers to display certain games. But, I'd prefer to do this programmatically. I get the latest games for relevant players daily already and store most of the returned JSON in a DB, but cannot find anything about generating or retrieving that embeddable iframe html. Has anyone done this in the past or know a good place to start? I know I could always use a PGN viewer as I already save the PGN, but chess.com's iframe is basically exactly what I want. Thanks!
I'm looking over the site's REST API and wondering if there is way to download all of my games where a brilliant move was played or annotated by an engine (agnostic of which side had the move)? I don't need to find the brilliancies as part of the API call, but I would like to pull all of the games that have engine analysis, along with the annotations of course. Does anyone know if this is possible to do?
Avatar of Luke_Thighwalker
Luke_Thighwalker Jul 15, 2022
Was trying to find a way to pull scheduled live events from a club's Upcoming List. Is there something in the API I've missed?
When calling https://api.chess.com/pub/puzzle/random, the URL in the 'url' field redirects to the Daily Chess Puzzles main page rather than to the puzzle. Example URL: https://www.chess.com/forum/view/daily-puzzles/362014---mate-in-6
Hi devs. I have a few different ideas for data-science projects based on chess.com data. Ideally what I'd like for most of these projects is a random sample of games or players, etc. However, I'm struggling to understand how to best use the API to get useful information of this kind. I have published a few blog posts using data from the other website, which publishes monthly archives of all games played on the site. Being a snapshot of all games in a month, this is more or less the kind of random sample I'm after. As I understand it, chess.com does not publish similar archives like this, either directly on the website or through the API. (I have read through some of the reasons why chess.com chooses not to publish archives.) So, I thought about a few ways to get random samples of data from the API description, such as: Iterating through players from a particular country, and then using the player endpoint. However, as mentioned elsewhere, there is a limit of 10000 players per country via the API. This seems problematic for a few different reasons in taking a random sample from a large enough chess-playing country. Iterating through tournament endpoints (which I discovered are numbered somewhat sequentially), but once again it's not really random sampling as not everyone plays tournaments (and choosing just from tournaments would bias the sample). Scraping (I'd rather not do this for so many different reasons). So, are there any ideas for either: a) generating random sample of games or players from the chess.com API or b) publishing snapshots (or archives) of chess.com activity perhaps through the API? Thanks.
I'm just wondering if there are any guidelines on the legality of reproducing or republishing chess.com data elsewhere. I am working on a few ideas for chess data-science projects and it'd be great to be able to publish datasets on other sites (e.g. Kaggle). The user agreement, as I'd expect, (and as far as I can tell) states that we're not allowed to "upload, post, email, transmit or otherwise make available" anything, but obviously the provision of the public APIs means that chess.com wants us to use data elsewhere for various purposes. Obviously what I'm envisaging is not wholesale copying of game archives but could be derived datasets, like: players/ratings game outcomes derived info from the pgns (openings, captures, tactics, score evaluations, etc.) pgns themselves? (who actually owns the copyright on a chess pgn anyway?) Here's one example of a dataset republished from data derived from the other site on kaggle: https://www.kaggle.com/datasets/mysarahmadbhat/online-chess-games. A dashboard-like example is http://chessleagues.com/. Copyright considerations of blog posts of data analysis from chess.com API data (rather than publishing the data itself) on data analysis of chess.com derived data is something else I've been thinking of too. Are there any issues with something like that? Any guidance that dev community members or admins could provide would be helpful in what is legal and/or acceptable in relation to this would be very much appreciated. Thanks.
Avatar of Mensch-Maschine
Mensch-Maschine Jun 19, 2022
Hello! I need Stats of a Player for the last 30 days in Rapid, Blitz, and Bullet. How can I do that via Published-Data API?
Avatar of Hyper-Dragon
Hyper-Dragon Jun 13, 2022
Is it possible to download a club's notes in the same way it is a forum topic? I've made the notes in my club 'public' temporarily but when I request a (web) page I'm receiving a HTTP 403 response - access not allowed. I'm puzzled because if I'm allowed to do a similar thing in any topic in my club, why not for club notes?
Avatar of stephen_33
stephen_33 Jun 5, 2022
I'm using a routine written in Python to extract information (team names, game types, time control etc.) from (scraped) match challenges in a league I help with and it's been producing very useful results. But I've just hit a small problem because the name of one team in a match that's being challenged appears as "ONE WORLD League PLAYERS' LOUNGE" in the challenge but my input file of teams has the plain english "ONE WORLD League PLAYERS' LOUNGE" (these are loaded into a dictionary). And that's giving me 'KeyError' every time I look the team name up. This seems to be a simple case of one encoding not matching another and for now I've cured the problem by replacing all "#039;" substrings with "'" but is there a simpler way of doing it? Some club names include quite exotic characters and I'd like to find a generic solution if possible.
Avatar of stephen_33
stephen_33 Jun 3, 2022
Today someone asked me again about clean play in some vote chess games. Which pushes me again to ask for the ability to download vote chess games as I can download an individual member's games. For the most basic solution, all I want is the PGN archives. If (either) the JSON endpoint or PGN endpoint was replicated for team's vote chess games I would be delighted. Some features would be "nice to have" but are certainly not essential and I'd prefer the basic endpoint(s) sooner rather than endpoints with these features later: Players for each team Team private notes per move (which become public when the game finishes) Public notes per-game which are always public. In the case of each of the points above I would again simplify if that helps add the feature: Posted diagrams are desirable(*) but not required Embedded images are not required External URLs are not required except as plain text references Text may be plain (colour, font, size, etc ignored). (*) I'm not sure how these would be best provided. FEN plus PGN perhaps with each post as a separate JSON item for that move? Anyway, a "round two" not an initial feature IMHO unless of course it's easier to include. If text notes and URLs were provided as HTML that would be quite acceptable, including being provided that way only without any "simple text" translation/transliteration. For me something like Rich Text Format would be less good than HTML. Any Javascript I would prefer be dropped. Thanks for listening, Giles
Avatar of ImperfectAge
ImperfectAge May 28, 2022
I have dealt with quite a few cases of people letting the timer run out instead of resigning recently, and thought it might be a good idea to share an idea I had that may make dealing with stallers a little easier. I was thinking it might be a good idea to collect data from many different games played on chess.com, storing the time taken per move and the engine evaluation at each step, along with whether either player was reported for stalling/quitting. You could then use the time taken per move and the engine evaluation, among other things, as input data to a neural network, and train the neural network to predict the probability of one player reporting the other. I think this would probably be a good because it would make it easier for people at the site to deal with large numbers of reports. A well-trained neural network could look automatically for stallers and detect repeated patterns of stalling before letting a human make the final call. It could also be used to filter out false positives, or prioritize reports based of their likelihood of being valid. I do think that something like this could work, but am not sure whether, and to what extent, AI is used for these kinds of things on this site. Maybe people can let me know what they think.
Admins