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.
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?
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?
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.
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
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.
After I had failed, the queen was still moveable, and I could capture everything, even my own pieces, and, the board squares, normally green and white, turned indigo and purple
Martin_Stahl May 4, 2022
Hello peeps, Have some pgns and I would like to get the corresponding accuracy (as produced by the engine from chess.com) for each game. However, this is not included in the pgns. Is there any way I can programmatically collect this to correspond to the specific games? Or do I have to individually feed the pgns into stockfish and analyze in order to obtain the accuracy values of both players? Input needed please. Thanks
Hyper-Dragon Apr 29, 2022
Whats up my PEOPLE. I suck at web development. I know Java and SQLITE but nothing more. I have basic HTML knowledge which I think has little to nothing to do with the API. Anyways, first I have some basic questions to set my mind and then I will ask the specific one. 1- JSON is what is used to provide the text that you get when you type a certain "URL pattern"? 2- What exactly do you guys mean when you say endpoint, the result from the "query"? 3- I guess your programs execute the "URL patterns" provided by chess.com gather the response and format it to meet your needs, right?4- How do you format it and if I wanted to use Java, is there any library you guys know of that I could use to connect with the API? Finally, I was told by a chess.com god, aka developer that I can gather almost real time PGNs with the API. I went trough the whole document and I either suck at reading documentation or couldnt find how to do it. Can anyone enlighten me on how to?
I feel like I play better in early morning and performance wanes throughout the day, and I want to test the theory. I can find the date but not the start or end timestamps, either in page content or the API spec. Thanks!
Martin_Stahl Apr 20, 2022
Problem solved - the admins of a club taking part in a league I help run hadn't mentioned that their club's name had changed. I thought there was a problem with one of the endpoints.
ImperfectAge Apr 16, 2022
Hi, I'm looking to download the games of the PlayKomodo Bot (In particular, its odds games with other players). https://api.chess.com/pub/player/playkomodo/games/2022/03 is empty, which matches the profile. Is this intentional and is there a plan in the future to be able to filter bot games (Lichess, for example, has this feature)? I can still find its games by looking at its opponents. Thanks.
rednova1729 Apr 14, 2022
idea: we call api.chess.com/something/gameID and it provides something about the game, say pgn and tcn (moves in algebraic form), the same things that the monthly games API provides. That would be very good. usage: i want a website that can do something with a game, say analyze it, guess the move, guess the elo, whatever. I want my users to be able copy the game URL, and paste into my website, then I want to download the game data, and parse it.
Hello! For those of you who develop in Java or other JVM-based languages, I've built a Java wrapper for Chess.com's API. GitHub: https://github.com/sornerol/chess-com-pubapi-java-wrapperJavadoc: https://javadoc.io/doc/io.github.sornerol/chesscom-pubapi-wrapper I've uploaded the project to the Central Repository, so it's super easy to include it as a dependency using Maven, Gradle, Ant, etc. Hope someone finds this useful. Feel free to let me know if you have problems with it.
big_sheykh Mar 26, 2022
I received this note when I first began the tournament and did not want to be seen as a scam or fraud or advertisement. Here is what his reply was: With that being said, www.4teamchess.com is a legitament tournament, however unique. It is done in full view of chess.com. Now, here are the 4 players who finished first in the one winner for every 100 participants and the amount they would have won each; if it was fee-based with 11,692 participants. (the amounts are on the website) 3072285(US), sgntnapalm(Australia), grigorious_greg (Germany), and remvinh (Vietnam)
YankeeBastid Mar 19, 2022
I have deployed the chess player api written in fastapi in heroku. Given chess.com username it will return fideid, fidename and chess.com player_id. The data are collected from chess.com api's titled and player endpoints along with fide rating xml file. Process in compiling the data. 1. Get all usernames from titled endpoint. The data are only limited to titled players. 2. Get player info such as the name, player_id from player endpoint given username. 3. If name from player info has two words like Magnus Carlsen, transform it to "Carlsen, Magnus" and save. This transformed name will be used to lookup in the rating xml file from FIDE. If name has 3 words like aa bb cc, transform it to cc, aa bb. 4. Get the fide xml file and execute merge on fide_name and transformed chess.com player name. There are chess.com names that have not matched in the FIDE names, Overall this is not a complete mapping, there are usernames that cannot be mapped to FIDE names because sometimes there are no names specified, etc. I tried manual editing to some top players but not much. I am using this functionality with my other app under development to find the chess.com username in FIDE database. If you want to help to expand the data, I need chess.com_username : fide_name mapping. Example, Chefshouse : Ding, Liren Ding, Liren name is in fide: https://ratings.fide.com/profile/8603677 Home page https://api-chess-player.herokuapp.com/ Endpoint https://api-chess-player.herokuapp.com/chess/{username} Example https://api-chess-player.herokuapp.com/chess/hikaru Response {"fideid":2016192,"fidename":"Nakamura, Hikaru","chessplayerid":15448422} Query on the web with /chess/{username} endpoint https://api-chess-player.herokuapp.com/docs#/default/username_chess__username__get 1. Press try out 2. input username 3. Press execute 4. Look at the response body Others Here is an api to get player fide info given fideid, this is not my repo but I use it in my other app called head to head record matchup which is under development. https://github.com/xRuiAlves/fide-ratings-scraper
io_kloud Mar 8, 2022
Hello,I want to know if, is there any API to give the total points of players of the tournament?currently, points are only available round-wise via round information endpoint. I'm trying to get data shown in the image in the least number of API calls.https://nimb.ws/yl5BLt
io_kloud Mar 4, 2022