i know this isnt a suggestion club but it would be nice for non forum posts to have the code editor feature and for descriptions and stuff to have them along with more languages because i suck at html
I am building a map of countries I've played opponents from. I have a rather extensive history (30,000 games) and can get the list of games easily enough, but to get the country of the opponents it seems I have to make an individual request, per player, to get it. Gak.I thought about using the "country players" endpoint (https://api.chess.com/pub/country/{iso}/players) to just fetch as many players as possible, but that seems pretty idiotic. Any other suggestions?
Avatar of gullupakka
gullupakka Nov 29, 2020
Can we please have some kind of access to open challenges for a player. This would help those of use creating commands for chatbots for streamers to do things like show a queue of people who have challenged a player.
Avatar of tryingtolearn1234
tryingtolearn1234 Nov 29, 2020
Hi everyone, When integrating with the API, I noticed inconsistencies across API calls when returning white and black values. For example, for `Current Daily Chess`, the documentation tells us that white/black is a string. But then for `Daily Team match board`, white/black is suddenly an object containing more information (username, rating, etc.). Ok, this doesn't make much sense to me but I can live with it, I just need to use different classes for different calls. Today, I encountered sometimes way worse. Inconsistencies within the same endpoint. When calling the `Tournament's round group` endpoint, `games` contains white/black values that are documented to be string. But depending on which tournament you are calling it for, a string or a complex object will be returned. For example, for this call, the response contains {"url": "https://www.chess.com/game/daily/138891582",..."white": {"rating": 1428,"result": "insufficient","@id": "https://api.chess.com/pub/player/rockaround","username": "Rockaround"},"black": {"rating": 1533,"result": "insufficient","@id": "https://api.chess.com/pub/player/mrtn","username": "mrtn"},"tournament": "https://api.chess.com/pub/tournament/-33rd-chesscom-quick-knockouts-1401-1600"} Ok, that means the documentation is wrong but whatever. What is seriously wrong is that if you make the exact same call for this tournament, you'll get the following: {"url": "https://www.chess.com/game/daily/289647422",..."white": "https://api.chess.com/pub/player/rainbowsandcastle","black": "https://api.chess.com/pub/player/mainak_roy",...} Am I missing something? Could this be fixed? This makes it very hard to integrate with the API...
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.")
Avatar of stephen_33
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?
Avatar of APISTOTELHS
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.
Avatar of kraunak60
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.
Avatar of davidFreelance
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.
Avatar of stephen_33
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?
Avatar of MaxShadowsong
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!
Avatar of comandanteescabio
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
Avatar of stephen_33
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?
Avatar of soumyakothari21
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?
Avatar of Williamfwm
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?
Avatar of Tricky_Dicky
Tricky_Dicky Sep 21, 2020