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
Avatar of ImperfectAge
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
Avatar of Martin_Stahl
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
Avatar of Hyper-Dragon
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!
Avatar of Martin_Stahl
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.
Avatar of ImperfectAge
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.
Avatar of rednova1729
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.
Avatar of big_sheykh
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)
Avatar of YankeeBastid
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
Avatar of io_kloud
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
Avatar of io_kloud
io_kloud Mar 4, 2022
Good Morning, Was doing the normal chess routine this morning, and finally wanted to check in on this analysis question. I'll post this morning's game for a reference. I was performing the ol' "bait and slaughter" technique and checked the analysis on it. The system treats it as a blunder and then rewards...bring you back to barely above zero. As a fellow developer, Is there someone working on this? I have a couple of ideas that might lead to some big advances or shot dead in the street....who knows maybe I should just stick to my legos. But any info would be great! Thank You. [Event "Live Chess"] [Site "Chess.com"] [Date "2022.02.28"] [Round "-"] [White "westnwestn"] [Black "mrityunjaya99"] [Result "1-0"] [CurrentPosition "k5r1/p7/1pQ2p2/1N1r2np/7N/8/PPP2PPP/R4K2 b - -"] [Timezone "UTC"] [ECO "B01"] [ECOUrl "https://www.chess.com/openings/Scandinavian-Defense"] [UTCDate "2022.02.28"] [UTCTime "12:22:07"] [WhiteElo "808"] [BlackElo "831"] [TimeControl "600"] [Termination "westnwestn won by resignation"] [StartTime "12:22:07"] [EndDate "2022.02.28"] [EndTime "12:31:44"] [Link "https://www.chess.com/game/live/39790117313"] 1. e4 d5 2. e5 f6 3. Nf3 Nc6 4. exf6 gxf6 5. Nh4 Be6 6. Bd3 Nh6 7. O-O Qd6 8. Bg6+ $4 $17 {BLUNDER (-7.88)} ({(-1.17) The best move was} 8. Be2 O-O-O 9. d4 Nf5 10. Nxf5 Bxf5 11. c3 Rg8 12. Re1 e5 13. Be3 Bh3 14. g3 Qd7 15. Nd2 Kb8 16. Bf1 Bxf1) 8... Bf7 $4 $12 {BLUNDER (-0.43) Critical mistake.} ({(-7.88) The best move was} 8... hxg6 9. Nf3 Ng4 10. h3 Nd4 11. Re1 Rxh3 12. gxh3 Nxf3+ 13. Qxf3 Qh2+ 14. Kf1 Ne5 15. Qg3 Bxh3+ 16. Ke2 Bg4+ 17. Ke3 Bh6+ 18. Kd4 Qxg3 19. fxg3 Nf3+ 20. Kc3 Nxe1 21. Kb3 Bh3 22. Nc3) 9. Bxf7+ Nxf7 {Critical move.} 10. Qg4 e6 11. Re1 O-O-O 12. Rxe6 $2 $17 {MISTAKE (-4.44) Critical mistake.} ({(-0.80) The best move was} 12. d4 Qd7 13. c3 Re8 14. Bf4 Bd6 15. Bxd6 Nxd6 16. Nd2 Rhg8 17. Qf3 f5 18. g3 Ne4 19. Qd1 e5 20. dxe5 Nxe5) 12... Qc5 $4 $16 {BLUNDER (+10.40) Critical mistake. From winning to losing.} ({(-4.44) The best move was} 12... Qd7 13. Nf3 Nfe5 14. Nxe5 fxe5 15. c3 Bc5 16. Qh3 Rdf8 17. d4 exd4 18. b4 Bb6 19. Bh6 Rf7 20. Bg5 d3 21. Bh4 Nd8) 13. Rxc6+ Kb8 14. Rxc5 Bxc5 15. d4 Bd6 16. Bf4 h5 17. Qg3 Rdg8 18. Qf3 Ng5 19. Qxd5 Bxf4 20. Nc3 Rd8 21. Qc4 Rhg8 22. d5 Nh3+ 23. Kf1 Ng5 $2 {MISTAKE (+11.40)} ({(+6.87) The best move was} 23... Rg4 24. Nf3 Ng5 25. Nd4 Be5 26. Nce2 Ne4 27. Rd1 Bxh2 28. f3 Ng3+ 29. Kf2 Nxe2 30. fxg4 Nxd4 31. Qxd4 hxg4 32. Qxf6 Rg8 33. c4 Bd6 34. Qf5 Ka8 35. b3 Bc5+ 36. Kg3) 24. Qxf4 b6 25. Nb5 Rxd5 $4 {BLUNDER (♔ Mate in 2)} ({(+11.77) The best move was} 25... Rd7 26. Nxa7 Rxd5 27. Nc6+ Kb7 28. Ne7 Rgd8 29. Nxd5 Rxd5 30. Ng6 h4 31. Qxf6 Ne4 32. Qxh4 Nd6 33. b4 Rd2 34. c4 Kb8 35. a3 Nf5 36. Qe4) 26. Qxc7+ Ka8 □ 27. Qc6+ {FASTER MATE (♔ Mate in 2)} ({(♔ Mate in 1) Checkmate after} 27. Qxa7#) (27. Qc6+ Kb8 28. Qc7+ Ka8 29. Qxa7#) 1-0
Avatar of Martin_Stahl
Martin_Stahl Feb 28, 2022
Published the record-match web app in heroku. It takes 2 usernames from chess.com and generates some chess.com and FIDE records stats. The app is written in python with streamlit. https://record-match.herokuapp.com/ Screen shots
Would like to see completed projects or utilities or tools as a result on the use of the api. No discussions please just name and links. This would allow members to see quickly what have been done so far and possibly avoid project duplication or similarities or generate inspirations. I will start with this list. pgn_to_sqlite: https://pypi.org/project/pgn_to_sqlite/ topic: https://www.chess.com/clubs/forum/view/pgn-to-sqlite Chess-streamer tool: https://github.com/OxloDev/ChessStreamTool topic: https://www.chess.com/clubs/forum/view/chess-streamer-tool chesstats: https://github.com/Hyper-Dragon/ChessStats topic: https://www.chess.com/clubs/forum/view/chessstats-time-played-monthly-ratings-top-openings-for-users python wrapper: https://pypi.org/project/chess.com/ topic: https://www.chess.com/clubs/forum/view/python-wrapper-for-published-data-chess-com-api chess analytics https://public.tableau.com/views/MyChessJourney-Visualized/MyChessJourney?:language=en&isplay_count=y&publish=yes&rigin=viz_share_link&howVizHome=no topic: https://www.chess.com/forum/view/general/python-script-to-download-entire-game-archive-for-a-specific-user-convert-it-into-a-csv Your turn.
Officially add live chess960 and live crazyhouse info like rating, number of games and rd probably in the stats endpoint. As far as I have tried, live blitz 960 and crazyhouse can be found in leaderboard but this is only limited to the top 50 players. However the unofficial endpoint provides live chess960 and crazyhouse.
I just now needed to shut off access to the API for an IP address that was attempting to pull all PGNs, for all games, apparently for all players. This is decidedly against the goals of the API, which is to help developers build tools that help players enjoy and learn more from their games on chess.com. I hate blocking people, but I need to protect the site. Downloading all games is foolish — even at the max rate limit of 3 archives per second, this would take 3 years of continuous operation... during which time enough games would have been played to require another 18 months to download. During which time enough games would be played... It might never end. The person who created this Python script did not create a user-agent string that allowed us to contact him. I want to call attention to this text in the documentation: In some cases, if we detect abnormal or suspicious activity, we may block your application entirely. If you supply a recognizable user-agent that contains contact information, then if we must block you application we will attempt to contact you to correct the problem. Maybe it wasn't clear that downloading the whole library is a bad idea, but we couldn't contact this developer to explain that and work out a solution. What if we made it more clear? Developers with working code, let's discuss some options. Would this work for you? We establish a total limit per day. The limit should be about 3–5x higher than anyone currently uses for their programs. This could be a limit on the total number of requests (which might penalize applications that consume a lot of small endpoints frequently), or the total bandwidth (which might penalize downloading large archives). Which is better? We would place the information about your daily allowance in the response headers. When you get to 90% of the limit, a 429 "Too Many Requests" response will be delivered 50% of the time; at 100%, a 429 response is delivered to every request until the next day In this way, you will know what's allowed and when you are getting close. If this happens often and you are building tools for the Chess.com players, then we can work with you to get special, higher rate limits. What do you think? Comments or ideas welcome!
Avatar of SirTooper
SirTooper Feb 17, 2022
There seems to be a bug in the pgn API, when the response size for a given player is above 10MB, then you get an empty result. A similar problem is with the game list and the missing corresponding field.