I used the code below to pull my games archives but it stopped working recently. I'm not very literate so I can't tell whether it's something with the Python library or the chess.com API. This is part of the error message I get: Traceback (most recent call last):File "C:/Users/Bob/Desktop/chess.py", line 9, in <module>f = urllib.request.urlopen(archivesUrl)File "C:\Users\Bob\AppData\Local\Programs\Python\Python37-32\lib\urllib\request.py", line 222, in urlopenreturn opener.open(url, data, timeout) Here is the code I was using: import urllibimport urllib.request username = "BobChess" #changebaseUrl = "https://api.chess.com/pub/player/" + username + "/games/"archivesUrl = baseUrl + "archives" #read the archives url and store in a listf = urllib.request.urlopen(archivesUrl)archives = f.read().decode("utf-8")archives = archives.replace("{\"archives\":[\"", "\",\"")archivesList = archives.split("\",\"" + baseUrl)archivesList[len(archivesList)-1] = archivesList[len(archivesList)-1].rstrip("\"]}") #download all the archives#indent all lines below except first and last onesfor i in range(len(archivesList)-1):url = baseUrl + archivesList[i+1] + "/pgn"filename = archivesList[i+1].replace("/", "-")urllib.request.urlretrieve(url, "C:/Users/Bob/Desktop/Chess/" + filename + ".pgn") #changeprint(filename + ".pgn has been downloaded.")print ("All files have been downloaded.")
stephen_33 Nov 24, 2020
please make it so that club owners are MODs in there own club (e.g can remove mentions and links)
About a week ago I started to receive 403 error for all calls to player resources. Other resources like club matches, club members etc. works without issue. API accessed directly from browser (ie. https://api.chess.com/pub/player/0nvm) works fine, but if accessed from the applications it fails with 403. Last attempt was right now at 5:52pm UTC. Does anybody have the same problem? @erik, @bcurtis: is it possible to check the issue? Thanks in advance.
i am completely new to coding and i have just started. i work with python. can i extract data from chess.com such as daily match live scores of my club? if so, how can i do so? can someone please tell me?
APISTOTELHS Nov 14, 2020
Are there any plans to add a stable user identifier? I’ve noticed that the API frequently uses usernames, and I didn’t see any obvious way of knowing when a user has changed their username. If there aren’t plans to add a stable user identifier, maybe an endpoint that allows tracking username changes would be a nice enhancement. I’ve had this problem on the website as well where I know a person’s old username and go to look them up but can’t find them because it’s changed. If I’m lucky, I can find the new username by locating a game I know I played against them and seeing what the username changed to, but that’s rather tedious.
kraunak60 Nov 12, 2020
It looks like something's changed with the public API, or perhaps I've been blacklisted !?? When making club and country requests, I get a 403 Forbidden response. Is it something about the HTTP header I'm sending? This hasn't changed for a while, and it includes my email and chess.com username.. But is there a specific preferred format for these fields in the header? It looks like I can make similar requests via curl, where the header is not specified.
davidFreelance Nov 10, 2020
So I am interested in processing my bughouse games from chess.com. Is there a way with the chess.com REST API to fetch the partner's game? I see there are timestamps available, which would be helpful to see the available pieces to drop at any given time.
Sorry if this topic was already discussed, but I was not able to find it. Is there reason, why details of Live tournaments can not be fetched normaly? For example I would like to get all games played in round 1 (https://api.chess.com/pub/tournament/1bleskov-turnaj-rp-achy-1642875/1), but the request finish with error. My ultimate goal is to extract all games played for the tournament (including byes and no-shows games, which doesnt appear in .pgn export) and reformat it to import the results into Swiss-manager.
stephen_33 Oct 29, 2020
It seems to be something wierd with getting live games from the api. I want to get the game: https://www.chess.com/live/game/5208486405 and I assume the last number is the id of the game but accessing https://api.chess.com/pub/match/live/5642445654 doesnt work :/ Does anyone know how to get live games from the API?
MaxShadowsong Oct 29, 2020
Hey, Seems like the api endpoint /games/archive is broken Getting the error code: {"code":0,"message":"An internal error has occurred. Please contact Chess.com Developer's Forum for further help https://www.chess.com/club/chess-com-developer-community ."}reproduce the error:https://api.chess.com/pub/player/erik/games/archiveCould someone look into this?Thanks!
comandanteescabio Oct 14, 2020
Is GraphQL language for APIs ever used when it comes to chess website https://graphql.org/ Would this help ever with API when solving I'm curious what you think of GraphQL What are your thoughts about GraphQL language for APIs for chess.com
stephen_33 Oct 13, 2020
Can there be an option in which all the club member's names, roles and some more info get converted into a google spreadsheet ?? And new members will be automatically added to the spreadsheet?
soumyakothari21 Oct 12, 2020
Hey, when fetching the streamers, I receive the streamer-objects with the property avatar. But the URL of the image only leads to a 50x50 png version. That's what shown when u hover on Today in the Chess.com Navigation. When clicking on it however you get to a list with 160x160 pngs. Is there a possibility to get from the 50x50 to 160x160, without fetching each user-profile? An example: `https://images.chesscomfiles.com/uploads/v1/user/2555939.974bf39b.50x50o.c90724e0b767.png` -> What I receive `https://images.chesscomfiles.com/uploads/v1/user/2555939.974bf39b.160x160o.8b689022d467.png` -> What I need (or any other higher size) I obviously can use the 50x50 and make it bigger, but then it looks all pixel. Anyone got an idea? Greets
Hi, I run a club that features a section where the club member's account names are displayed on a Wall of Fame. https://www.chess.com/club/the-chess-elite Example: @Member1 @Member2 @Member 3 .... etc. So far I have just been using copy/paste to add new members, but it's starting to get a little too much, which is why I'd like to automate the process. What I would like to achieve: 1.) All club member names in listed, plain text format. Member1 Member2 Member3 Member4 Member5 After this I will just use a text parser to put "@" in front of each name to achieve this: @Member1 @Member2 @Member3 @Member4 @Member5 2.) All titled player's account names in listed, plain text format. Here possibly with the correct title. CM@Member1 FM@Member2 IM@Member3 GM@Member4 What I've got so far with the help of @APISTOTELHS for direct Firefox Console Input: var request = new XMLHttpRequest();request.open('GET','https://api.chess.com/pub/club/the-chess-elite/members',false);request.send();var response = JSON.parse(request.responseText);var list = '';for(type in response)for(member of response[type])list += member.username + '\r\n';console.log(list); My one problem is that https://api.chess.com/pub/club/the-chess-elite/members only returns 171 members instead of the total 490. What am I missing here?
Williamfwm Oct 5, 2020
I just mentioned that FEN of the position on the board taken from Live Match Board endpoint is not complete. It doesn't have 'halfmove clock' and 'fullmove number' parameters in the end (whereas FEN from Daily Match Board endpoint is good). For example ( https://api.chess.com/pub/match/live/208183/1 ): Is it possible for API developers to return full FEN in this field for live matches as well?
Tricky_Dicky Sep 21, 2020
One of my opponent got disconnected in a losing position and I got this. So this was a new response from server. Your opponent quit without resigning in a losing position. If they continue to do this, their account will be restricted according to our Sportsmanship Policy.
Tricky_Dicky Sep 19, 2020
I have just, thanks to social isolation, finished off the first version of ChessStats. A little command line utility for windows/linux that gives, amongst other things, the time any user has spent playing games on chess.com. The project is over on github here and the Releases are here.
BaronVonChickenpants Sep 17, 2020
I was looking for a way to easily get at the PGNs for games I've played (and games I've been interested in) so I decided to build an app with Elm to help me out. Thought I'd share in case it interested anyone here Atm it accepts a username and allows you to browse all the public games played by that user, then displays the PGN for the games you choose to look at. It'd probably be nice to extend it to accept a chess.com URL to just pull the PGN from there eventually. For my uses, I wanted a paired down PGN with the generated comments stripped so that's what the app provides but if anyone finds the thing useful and would like the comments restored, I'd be happy to talk about it. The live app lives here https://chesscom-pgn.shnewto.space/ It accepts usernames in the url, i.e.https://chesscom-pgn.shnewto.space/?username=shnewto And the source code lives here https://github.com/shnewto/chesscom-pgn Thanks for taking a look if you decide to!
ChessCoach Sep 16, 2020
is there an OAuth2.0 implementation, so that the users can authentificate themselfs in my platform using there chess.com credenticals? My Idea is to link a chess.com account to a user account in my platform, but there is no way to now if the chess.com account belongs really to that user. I think an OAuth mechanism could be a create great why to do that.this there a why to do this?