Hey guys, was wondering if anyone could help me in doing the following task:- take a game link as input- grab the pgn from that game in such a format that I can modify it to do things like: -- remove ratings, -- change and use variables to modify usernamesthen print the pgn Preferably in python. I've seen many posts about using many pgns or pgns of a certain user, so was wondering if this was even possible! Thanks.
Avatar of ninjaswat
ninjaswat Nov 27, 2023
Sharing some scripts I've created. They are functional and I could make them more user-friendly if there is any interest. Chess Power Tools is a collection of scripts that can help do the following: Export chess games from Chess.com in JSON and PGN format (chesscom-export) Import chess games from PGN to SQLite DB (pgn2sqlite) The next script I'm planning is for more analysis. For example, expand the SQLite DB to include a table for moves and fields such as: Position (FEN) Engine evaluation Move evaluation Centipawn loss and more (I'm taking suggestions)
Avatar of chesslover0003
chesslover0003 Nov 26, 2023
I've been working on Chess Time for almost 2 years on and off as a way to calculate your play time on Chess.com. I just made a big update on the design and the stats that are available. It's quite nice what you can do with the public API. Now you can track your nemesis and victim players – it's pretty neat to see those stats in action! https://www.chesstime.io/ The app was built with React and Typescript. There is no backend yet but I'm looking into the possibility of building one. Here's a sneak peak: A nice breakdown of the win/loss/draw conditions The player that you played the most games with and the player that you have won/lost/drew the most against. As you can see, I love playing against bots.
Avatar of Purecojones
Purecojones Nov 23, 2023
Hello chess devs! I want to share with you a project that I've been working on. As a chess enthusiast who got hooked on the game by watching streamers, I wanted to create something that bridges the gap between chess gameplay and streaming. So, I've developed a website that brings together the best of both worlds: Chess.com and Twitch! You can find it at chessvod.com. What Can You Do on the Website? Duel Stream Setup: Watch your favourite streamers go head-to-head by seeing both streamers' clips, side by side. Personalised Experience: Ever played against a streamer? Enter your chess.com nickname and discover clips of your games that were streamed. It's a unique way to see your gameplay from a new perspective. Enter someone’s else’s name, like Magnus Carlsen, and see how they react when they realise that they are playing against the world champion. Behind the Scenes: Integration with Chess.com: The website automatically fetches data about streamers and their games from the chess.com API. Twitch Video Insights: By integrating Twitch's video details, the site determines if a chess.com game was captured in a streamer's video. This feature allows for a seamless connection between the game and its streamed footage. What’s next? Discord Bot Integration: Getting a ping whenever there is a clip where you play against a streamer. If you have any feedback, please let me know
Avatar of NoBlunderNoGain
NoBlunderNoGain Nov 13, 2023
Hi, I just noticed that my games archive returns an empty set of games, even though I just played a couple of games. This is the first time I see this: https://api.chess.com/pub/player/paintednow/games/2021/10 The response is just an empty set of games, i.e. {games: [ ]} Any ideas/tips what is going wrong? Thanks, PaintedNow
Avatar of SwissCookieMan
SwissCookieMan Nov 11, 2023
Hey Chess Developers! I wanted there to be an easy way to watch top level online chess in almost real time so I created a youtube channel called chess-almost-live, that livestreams recently completed games on chess.com (and that other site as well). Here's how it works: a live stream kicks off whenever a minimum of 4 top games conclude within the past 30 minutes. A game is selected and replayed and when it finishes, viewers get to vote on the next game to stream by commenting in the chat. I am hoping that the channel makes these top games more accessible to a wider audience and can serve to grow chess and help people (myself included!) improve their game. The lofty goal is to create a little chess community and collaborate with other channels. If anyone has any questions, wants to collaborate, or simply wants to understand the technical side or the code, I would be happy to chat! Also, a huge thanks to chess.com for their amazing API!https://www.youtube.com/@chess-almost-live
Avatar of SaldeanKnight
SaldeanKnight Nov 11, 2023
Has anyone else run into an issue where you get HTTP 500 errors at some point after sending back-to-back requests with an Authorization header? After some amount of requests, I just get constant errors. For example - I send 20 requests synchronously, and then the subsequent requests all return HTTP 500. APIs work fine via my browser, so it must have something to do with my program. The only change I made was adding an authorization header with the token I obtained. I'm not sending requests in parallel and I have the user-agent header included. It seems to work fine if I don't include the authorization header. I'm following the example from the OAuth documentation: Authorization: Bearer {access_token}. Being a 500 I'd assume it's not on my end. Is this a known issue or am I missing something?
Avatar of stephen_33
stephen_33 Nov 11, 2023
After recent attack on chess.com servers looks like the whole provider Digital Ocean is blocked. I checked location: USA (NY, SF), Singapore, Amsterdam Response is almost instant (which is a sign of simple logic behind) Below SS when accessing the site regular way, the same error when using API
Avatar of zainsworth
zainsworth Nov 9, 2023
I posted this in the wrong forum topic, so decided to create my own topic. I have built a unique tournament competition (that runs on Chess.com using APIs from here) that has many elements that solve many issues about online chess. It introduces a completely new concept that ties into my tournament concepts: PPM, which stands for "Progressive Performance Metric." Essentially, PPM represents a calculation that tracks and evaluates how performance progresses or advances over a series of events or activities. More on that later. One of my goals was to enable lower-skill-level players to compete equally with higher-skill-level players. I use a 4 person team format with a novice, 2 intermediate, and an advanced player on a team. I use a sort of all the players based on their skill levels in the roster of qualified 'rapid' chess players who have signed up for the event. The makeup of teams changes from day to day as players' skill levels change. There is a leaderboard that accumulates points earned from daily matches, adds them to any previously earned points, and posts the top point winners to a Leaderboard. Chess.com awards diamond memberships to the top 4 players on the Leaderboard at the end of each Month., I zeroed out the points and started over again each month. The system for awarding points is unique. It is not a traditional system awarding 50%, 30% and 20%. I use a simple formula for getting a basic award unit, x=n*(n+1)/2 so that n is the number of participants. I then take the total points to be awarded, bpu =((4.8 x n)/x), and divide that by x to obtain the basic price unit, or bpu. Let's say we have 4 teams winning. !st place would get 4 times the bpu, 2nd gets 3 times bpu, 3rd gets 2 times bpu and 4th gets bpu. I have never heard of that method of prize distribution anywhere. The design of the system is such that no matter how many participants (and it is designed to handle thousands each day), there will be awards distributed based on a ratio. That ratio can be one winner in ten, one in 20, one in 30, and so on. A player could participate in as many different events as they desire. Since we use a person's Chess.com rating average over 7 matches, they can be applied to many events, depending on how the events we set up. I began having two events a day - winner-take-all, and 1 winner for every 10 participants, however, I am just running the one winner for every 10 participants now. Depending on the Chess playing community, I could expand the event count. Turning to the event itself. I use the PPM method to compare changes in a player's skill level averages. I add 7 previous ratings awarded to a player playing rapid games on Chess.com. I divide that by 7. That gives me a player's starting average. I then add the results from the rating from the most recent match to the previous 6 matches, divide that number by 7 and I have determined the current rating average. I subtract the starting average from the current average and that gives me their PPM. It is usually a number with more than 6 decimal places and that keeps ties to a very very rare occurrence. Now each player's PPM is applied to the team's total PPM. I compare this team total to all the other teams to determine who is on the winner's roster. CHEATING!!!. How? So what? Using the PPM method a player cannot use a single match but must depend on the play of their teammates and who are they? A cheater would not know and all games are tracked and their ratings averaged. Why do I post the results off-site from Chess.com? Good question for which I do not have an answer. I believe the competition incentivizes players of ALL skill levels to participate in an International event, that runs EVERY SINGLE DAY. I would hope that someone from Chess.com recognizes the uniqueness of the competition, its out-of-the-box methodology, and its potential for expansion into the online E-Chess gaming community. I have been running the event daily for quite a few months now. I would be willing to open-source the code if someone expressed an interest, even turning over the concept to Chess.com. I only want to be recognized as the Author of the idea and developer of the original code.
Avatar of YankeeBastid
YankeeBastid Nov 5, 2023
In the past I spent time designing a chess GUI but never continued to develop the code. If you're interested in UI/UX design and software development let me know. I might like to revive this project of mine and create a ochessbase clone.
Avatar of chesslover0003
chesslover0003 Oct 28, 2023
I'm hoping to create some random game samples for personal research, and do it in a way that does not violate the Chess.com ToS. Any clever ideas? For example, a random selection of 5-minute Blitz games, played in October 2019, by players who were within the rating range of 500 - 600 at the time the games were played. The best I've come up with so far is to manually search in old forum posts until I find a player who matched my rating and date range criteria and then use the API to download their games. Once I found one player, it would be easier to find others because I could just look at their list of similarly-rated opponents at the time. Not elegant, but it would work. For anyone curious, I'd like to run these samples through an engine to determine, for example, whether 500-rated players today are stronger (based on move accuracy) than players of the same rating a few years ago. This seems to be a commonly-held perception, but I've not seen anyone actually try to test it.
Avatar of LateToMate
LateToMate Oct 23, 2023
I recently found https://www.chess.com/forum/view/general/python-script-to-download-entire-game-archive-for-a-specific-user-convert-it-into-a-csv but it doesn't appear to work for me. I'm unsure if this is because of changes to API endpoints. I'm going to keep troubleshooting. In the meantime, do others have suggestions for scripts to retrieve PGNs from the API with a given username? Ideally, I would like parse and store in CSV format. Perhaps I'll just do it in two steps: 1) download the games in PGN format, 2) parse into CSV format (there is a script for this that I can model what I'm doing). Suggestions for either?
Avatar of LateToMate
LateToMate Oct 21, 2023
Is the API documented anywhere? Or do I have to search through posts for potential samples? I want to start by retrieving the PGN of a game. If necessary... call for a list of games then retrieve one of those games. Thanks in advance.
Avatar of chesslover0003
chesslover0003 Oct 18, 2023
that day i tried to change my theme and not working
Avatar of Tricky_Dicky
Tricky_Dicky Oct 14, 2023
Not able to upload any backgrounds. It has been like this for the last 5-6 days. It was just working like a week or two ago but now the "Upload" button is not displaying.
Avatar of Martin_Stahl
Martin_Stahl Oct 14, 2023
Hi, I tried to use chess.com api to get my players archive. In browser it works fine, but in VB (using HttpWebRequest) I get an 403 error. Do I need any authorizsation, headers,...? Regards, Martin
Avatar of Hellesemer
Hellesemer Oct 11, 2023
Hi, I am new here, but I didn't find an answer in the previous posts: I need to download "all" games played within a month (Feb. 2023) like the monthly lichess data dumps. They contain all pgns for all games played on their servers in a given month. I guess, since such data dump doesn't exist, I would need to download the monthly data dumps for each player ... but for that I would need a more or less complete player list. So, the question is, how to obtain such list, or if there is a better method for obtaining that data. I am aware that I probably won't get all games within a month, but in order to compare properly, I need a similar number than what I got from lichess, which is ~100.000.000 games. Cheers Arend
Hey there, I've been getting into chess engines recently and have been wondering if it was possible to get information of CCC games using chess.com's API, such as statistics and the current position. After looking through the Published Data API, I was not able to find anything related to this and thought that it might be a cool addition if it is not already available.
Avatar of Whitelisted0
Whitelisted0 Sep 28, 2023
Hi guys, Not sure this is the right place to ask but I created a small iOS Swift library that analyzes a picture of a chessboard and renders the FEN notation of the pieces. I'm currently training my Machine learning model with a lot of different pictures of 2d top-down puzzles. If you are interested in helping me feel free to reach out to me. I'm looking for sharp photos taken from books or newspaper chessboard puzzles. Andy
Avatar of AlexeyChess
AlexeyChess Sep 22, 2023