Hi All, I recently made a chrome extension to calculate attackers and defenders for each piece, identify hanging pieces, and assess whether you can gain material in exchanges. The extension is not mean to cheat and will only work when playing against the computer or when completing puzzles. Any and all feedback is much appreciated. https://selmetwa.github.io/blunder-watching/
Hey, first of all I wanted to thank you guys for all the hard work providing APIs and stuff! A colleague and I are working on a chess AI for a university project. Our supervisor recommended us to test our AI through matching it against real players on chess.com. But for realizing that we would need an API, which enables matchmaking, getting the current board and pushing moves on it. Probably this is the purpose for which you are developing the interactive API you are talking about here? If it is, we would like to know, when you are planning to release it and how we could use it then. Thank you for your time, I really appreciate!
Avatar of RealGojira
RealGojira Nov 13, 2024
Way back when I was creating the 4teamchess competitions, I calculated how many players there were by chess.com rating. I generated a spreadsheet to illustrate the differences. But now I have forgotten how I did it. Please take a look and see if you can figure out how I can update the percentage to current numbers?: Back then there were 6 million 15 thousand players. I know I used information that was readily available here. rank number pct 25000 100 89717 0.014914 373 1 373 200 195111 0.032433 811 374 1184 300 328633 0.054629 1366 1185 2549 400 470841 0.078268 1957 2550 4506 500 572374 0.095146 2379 4507 6885 600 631917 0.105044 2626 6886 9511 700 628286 0.104440 2611 9512 12122 800 594633 0.098846 2471 12123 14593 900 516472 0.085853 2146 14594 16739 1000 442244 0.073514 1838 16740 18577 1100 359953 0.059835 1496 18578 20073 1200 293519 0.048792 1220 20074 21293 1300 230314 0.038285 957 21294 22250 1400 177690 0.029537 738 22251 22988 1500 135053 0.022450 561 22989 23550 1600 101053 0.016798 420 23551 23970 1700 74537 0.012390 310 23971 24279 1800 54458 0.009053 226 24280 24506 1900 38479 0.006396 160 24507 24666 2000 29077 0.004833 120 24667 24786 2100 19299 0.003208 80 24787 24866 2200 12724 0.002115 65 24867 24931 2300 8153 0.001355 60 24932 24991 2400 5143 0.000855 55 24992 25046 2500 2500 0.000416 50 25047 25096 2600 1744 0.000290 45 25097 25141 2700 1020 0.000170 40 25142 25181 2800 490 0.000081 35 25182 25216 2900 220 0.000037 30 25217 25246 3000 90 0.000015 20 25247 25266 3100 14 0.000002 14 25267 25280 3200 2 0.000000 2 25381 25282 6015760 25282 6015760
Avatar of Superhero_og
Superhero_og Nov 12, 2024
Seems this endpoint for player results, has been changed without any notice . This is the spec: "results": [ "played_as_white": "win", //result of game played as white, see "Game results codes" section "played_as_black": "win" //result of game played as black, see "Game results codes" section ], Always has been as_white with "," terminator followed by as_black and "]" terminator.Now in some cases it is reversed.How can changes like this be implemented without any specification change? This is out of control. Another instance of total lack of software quality assurance.
Avatar of Tricky_Dicky
Tricky_Dicky Nov 11, 2024
Just noticed this for the following member:- https://www.chess.com/member/pawn314159 The web 'last online' date clearly states Oct 26, 2022 wherever that data appears but the member's endpoint disagrees:- https://api.chess.com/pub/player/pawn314159 "last_online":1667598759 When I decode the time integer I get this:- tm_year=2022, tm_mon=11, tm_mday=4, tm_hour=21, tm_min=52, tm_sec=39, ..... i.e. Nov 4, 2022 I think I'm reading that correctly.
Avatar of stephen_33
stephen_33 Oct 30, 2024
So im admin in a 1750 members club and the owner asked me to make a list of which countries have the most ammount of people in them. Im working on it but is there a faster way than just looking at the member list to update 1 person and do it 1750 times???
Avatar of Martin_Stahl
Martin_Stahl Oct 26, 2024
By any chance are there any dev's from Chess.com here? I would love to help redo the API docs if possible?  As someone using the API for various projects, I'd love to be able to contribute to improving the documentation.  I've done a bit of exploring, and I've Hono + zod-openapi + Scalar make for a killer API setup with OpenAPI spec'd routes and automatic documentation with Scalar.
Avatar of codecalmchess
codecalmchess Oct 17, 2024
Hi, I was trying Chess.com API, I just want to fetch some data,I managed to get my rating from it, I want to get "my today's matches", like total matches played today, number of wins, lose, draws... I don't want PGNs and all that, I just want number of matches (rated).. UPDATE:: I GOT IT BY DOING THIS.. (I'LL CHANGE SOME STATIC DATES AND MONTHS LATER ON..) BUT THIS IS THE RESULT.. games = get_player_games_by_month(name,"2021","06").json['games'] (gets games of the month) games = [d for d in games if d['end_time'] >= datetime.strptime("June 7, 2021", "%B %d, %Y").timestamp() and d['rated'] == True and d['time_class'] == "rapid"] (Filters out "rapid", and "Rated" games from given date to current date)games = [{"str": d["pgn"]} for d in games] (filters out only pgns to find out results) for eg. in loop (for game in games) something like this "game['str'].count('Result "1/2-1/2"')" would return true if game is drawn... Thank you @stephen_33, @Hyper-Dragon for helping.. if anyone interested in complete code, ping me..
Avatar of stephen_33
stephen_33 Oct 14, 2024
After a long time, my countryman is in contention to become a world champion in Chess. And to add to the excitement, Google is sponsoring the championship match happening at Singapore! In the spirit of celebrating Chess and Google - my passion and my work, I created a pgn to csv convertor utility that takes games you played on chess.com and converts all of it a structured CSV. You can then use this to build cool dashboards like this one that I built from the data I generated from my games - https://public.tableau.com/app/profile/jerome.rajan/viz/MyChessJourney-2024/MyChessJourney Link to my tool - https://chess-pgn2csv-converter.streamlit.app/
Avatar of datasherlock
datasherlock Sep 23, 2024
Hi everyone https://chessinsights.xyz is a website that uses the chess.com api to visualize export all user data to a csv, JSON or pgn. Everything runs on client side javascript and I used the chart.js library to plot the data. I also made a python script that can export all of a users data to a json file and convert it into an sqlite database. This is my first project using javascript so everything is a bit messy. I plan on rewriting it using vue.js and implementing some sort of data persistence to prevent unnecessary request to the api. Let me know if you have any suggestions or know of similar projects like this. Thanks. - Project repo: https://github.com/NotJoeMartinez/chess-insights - Python Script: https://github.com/NotJoeMartinez/chess-insights/tree/main/cli
Avatar of notjoemartinez
notjoemartinez Sep 19, 2024
Hello everybody, I'm working on developing a website that aims to provide analysis of trends in all your games on chess.com. The goal is to offer a tool that tracks trends, patterns, and insights, helping players understand their performance and improve their gameplay. Think of it as a homebrew AimChess or Chess.com’s Insights from someone who played chess very seriously for over a year. Currently, I’ve developed a predictive rating graph that forecasts your rating over time using complex regression techniques. This graph is a key feature, and I plan to expand the website to include other analytics that will help you spot weaknesses in your game. While the site is still in its early stages of development, and I am a very busy person outside of this project (still in school, working part-time, and programming for a world-class robotics team), I hope to keep up regular improvements to this website as a fun personal project. I would love to hear your feedback and any ideas for features you'd find useful as I continue developing this tool! *The graph shows the regression model training over the players history (X: game #, Y: rating). Everything past the dashed line represents the program’s predictions.
Avatar of alex_bowe
alex_bowe Sep 18, 2024
I need to get my projects from replit to glitch and tried running this JS in the console (The console that opens when you press F12) on the repls page and it didn't work. I've been locked out of my own data and need to figure out either how to get the .zip file across to glitch or make this program work:  function isAtBottom() {    return (window.innerHeight + window.scrollY) >= document.documentElement.scrollHeight;} function promptUser(items) {    let format = '';    items.forEach(item => format += `<a href='${item}'>${item}</a><br>`);     document.write(`<html style='font-family: sans-serif'><head><title>Your Repl Files</title></head><body><h1>Success!</h1><br><h3>Your Replit files have been successfully fetched.</h3><button onclick="downloadAll();">Download All</button><br><br><br>${format}</body></html>`);     const script = document.createElement('script');    script.textContent = `        function downloadAll() {            const items = ${JSON.stringify(items)};                        items.forEach(item => window.open(item));        }    `;    document.body.appendChild(script);} function finishSetup() {    let items = [];    console.log('Process complete! Fetching all Repls...');        document.querySelectorAll('.css-ow5df0 a').forEach(element => {        let currentHref = new URL(element.href);        currentHref.search = '';        let newHref = currentHref.toString() + '.zip';         items.push(newHref);    });     promptUser(items);} function scrollToBottom() {    const scrollSpeed = 300;        function performScroll() {        window.scrollBy(0, scrollSpeed);                if (isAtBottom()) {            console.log('Checking if any more Repls are available...');                        setTimeout(function() {                if(isAtBottom() && !document.querySelector('.load-more-spinner')) {                    // this will run if they're still at the bottom after 2 seconds and the page is not loading (meaning it's complete, i know i know, it's not the most reliable thing ever but I don't have a choice)                    finishSetup();                } else {                    requestAnimationFrame(performScroll);                }            }, 2000);        } else {            requestAnimationFrame(performScroll);        }    }        requestAnimationFrame(performScroll);} console.clear();scrollToBottom();
Avatar of ChessChamp169GM
ChessChamp169GM Sep 14, 2024
ERROR:root:Error fetching status for luffy_murom: 403 Client Error: Forbidden for url: https://api.chess.com/pub/player/luffy_murom
Avatar of Martin_Stahl
Martin_Stahl Sep 14, 2024
I periodically retrieve my games through https://api.chess.com/pub/player/<username>/games/archivesSince yesterday the archives I download are corrupted, here is what I noticed:- games from 2024 have "UTCTime" off by a few seconds- all games played during the last day of a month were dropped
Avatar of Martin_Stahl
Martin_Stahl Sep 13, 2024
I am  trying to figure out someway to collect brilliant moves and store it. Since there is no API that does this, I figure that the only way to do this is by web scraping and collect the amount of brilliant moves in the game review, but I guess that requires me to login and analyze it per game. Is that a potential issue that could make me banned?
Avatar of Martin_Stahl
Martin_Stahl Sep 13, 2024
I will list a few here. I cannot list the thousands I have. Stats page = SP@6jjifgm - API - 52%, SP = 40% @bananapeelmaster123- API - 25%, SP = 47.06% @bigcalvin10- API - 62%, SP = N/A% (Last timeout was May 4th, 2024) @bishoponthedot- API - 100%, SP = N/A% (100% of their games are timeouts but these are back from February. The API should only be 90 days) @chessplayer279237498- API - 100%, SP = 55.81% @david007008- API - 21%, SP = 33.33% @droovybala- API - 71%, SP = Unrated% @etan2015- API - 87%, SP = Says unrated but they have timeout rates in custom chess going from back January of 2023 which should not appear in the endpoint. @excellentrsl- API - 25%, SP = 2.74% @little1bar- API - 100%, SP = N/A% (Timed out their only game back in December 2023. This should not appear in the endpoint.) @owlhh- API - 40%, SP = 50% @pliny_the_elder1- API - 45%, SP = 100% @shyguywowow12- API - 5%, SP = 70% @bigbertha- API - 65%, SP = 27.74% I excluded the majority of ones that had a high timeout but their stats page said nothing. I also didn't bother to add anyone in the list that had less than a 10% difference. From what I checked though, out of 100 players, maybe 2 were correct. It seems by the looks of it at least that the Stats endpoint is grabbing the player's total timeout rate for all games ever played and not filtering by the 90 days in many cases. I am sure everyone knows how to verify this but you can check the api for a specific member by using this, https://api.chess.com/pub/player/someUsername/stats and passing in one of the above usernames.
Avatar of stephen_33
stephen_33 Sep 13, 2024
hey guys so i found some projects that i forgot about while cleaning up my pc, so the least i could do is to deploy them so hopefully it's some use to someone or atleast its fun to checkuses chess.com api btwhttps://cheater-check.vercel.app/ https://titled-check.vercel.app/https://speedrun-check.vercel.app/
Currently the stats on a player's profile differentiates their timeout rate depending on if it's a 960 game or a standard game. This means that a player could have a 100% timeout rate in 960 but a 0% in daily so when you retrieve that endpoint and the timeout rate, you may not get the information you want. I was talking to chess.com and I discussed with them the idea of a unified timeout rate but they suggested that I take a sort of poll. See what people think of the current situation. So let me know if you'd like to see a unified timeout (as well as the daily and 960 on their own) or if you think the current setup is fine. 
Avatar of stephen_33
stephen_33 Sep 11, 2024
https://www.chess.com/news/view/published-data-api#pubapi-endpoint-player-is-online This endpoint requires a large number of internal resources to maintain, and in the past week it has been used by only one clear developer script with a user-agent that helps us contact the developer. All other access to that endpoint appears to be tests, runaway scripts, or unidentified programs that could work better. We propose to completely remove this endpoint. Current online status of a player will no longer be available in this API. We would like to have one week of discussion here, so that developers can voice any thoughts or concerns. We will work directly with the developer who identifies his program in these calls to move him to the newer system. In addition, we will monitor this forum post for at least two months, and directly work with other developers who are impacted. We are unlikely to publish the new method publicly, since it is strictly beta testing at the moment. Thank you. Please let us know if this impacts a program you are running, and any concerns you have.
Hello, I’m dev at ChessDojo and we are running DojoLiga, we want to create weekend to weekend arena/swiss automatically for our club/public which are streamed by the ChessDojo streamers. We would like to have endpoint or possibly some token based authorization endpoint that allows to create the tournaments in further future. Our admins can’t create this types of tournaments and it’s not really human usecase and we already know the date and time in quite advanced and it’s wasteful human effort. We are running DojoLiga which has leaderboards, and we have integrated some parts of code with Chess.com API. The code can be found here: https://github.com/jalpp/DojoLiga What are some workaround this issue? Can we write web bot that can do this automatically (though chess.com doesn’t allow us) but if we ask for this permission. Thanks
Avatar of fireineyesloveinheart
fireineyesloveinheart Sep 7, 2024
Admins