{"data":{"billing":{"currency":"USD","mode":"rules","parameters":[],"policy_version":2,"sale":{"addons":[],"base_price_micro_usd":"0","max_cost_micro_usd":"2000","quantities":[{"id":"upstream_credits","label":"Actual API.SH credits consumed","max_quantity":"1","measure":"value","pointer":"/credits_used","price_micro_usd":"2000","quantity_scale":0,"source":"response","unit":"credit","unit_quantity":"1"}],"rounding":"ceil","variants":[]}},"capabilityId":"c377956b-8471-4926-ab9f-08173bdb30b5","catalogType":"api","categories":["data"],"dataPlatform":"chess","dataPlatformLogoUrl":"https://api.sh/logos/chess.png","dataPlatformTranslations":{},"dataProduct":"sports","description":"Get Chess.com or Lichess player games with PGN in JSON via REST or OpenAny MCP—with pay-per-use pricing and no subscription. Powered by Apish, pass parameters such as limit, output, raw, and retrieve structured data including source game identifier, pgn, source game time class, and source game result notation for chess reference, and record navigation.","descriptionTranslations":{"ar":"استرجع مباريات لاعب Chess.com أو Lichess مع PGN داخل JSON، بمرشحات الشهر والتاريخ والمباراة مع حفظ حدود الموقع والمؤشرات ووحدات الساعة. استخدم السجلات المنظمة لإعداد واجهة مرجعية للشطرنج أو ربط اللاعبين والمباريات والفعاليات، مع توضيح الموقع ونظام الوقت وأمثلة الطلبات المدعومة وتسعير التنفيذ الحالي في صفحة API.","ja":"Chess.com・Lichess 選手の対局を JSON 内 PGN で取得し、月・日付条件とサイト別カーソルを保持できます。 構造化記録をチェス資料や選手・対局・大会の連携に使い、サイトと持ち時間の範囲を保持できます。API 詳細ページには対応リクエスト例と選択した実装の料金があります。","zh":"查询 Chess.com 或 Lichess 棋手对局，获取 JSON 内的 PGN，可按月份、日期和对局筛选，保留站点限制、游标及棋钟单位。 可利用结构化记录构建国际象棋参考界面或关联来源棋手、对局和赛事，保留站点与时制上下文；API 详情页提供受支持的请求示例和当前实现价格。"},"effectContentHtml":"","executionMode":"sync","id":"a504426a-21bf-46f1-aff6-efc7fe962d74","includedContentHtml":"","inputs":[{"description":"Username.","location":"query","name":"username","nullable":false,"required":true,"type":"string"},{"description":"chesscom or lichess.","enum_values":["chesscom","lichess"],"location":"query","name":"site","nullable":false,"required":false,"type":"string"},{"description":"YYYY-MM: games of that month.","location":"query","name":"month","nullable":false,"required":false,"type":"string"},{"description":"Games to return (chess.com 1-500, lichess 1-100; default 50).","location":"query","name":"limit","nullable":false,"required":false,"type":"integer"},{"description":"lichess only: bullet, blitz, rapid, classical, correspondence, chess960 ...","location":"query","name":"perf","nullable":false,"required":false,"type":"string"},{"description":"lichess only: true rated games only, false casual only.","location":"query","name":"rated","nullable":false,"required":false,"type":"boolean"},{"description":"lichess only: `next_until` from the previous page.","location":"query","name":"until","nullable":false,"required":false,"type":"string"},{"description":"Only games of this time class: bullet, blitz, rapid, daily (lichess: correspondence) or classical (lichess). On lichess it stands in for `perf` when `perf` is not given.","enum_values":["bullet","blitz","rapid","daily","classical"],"location":"query","name":"time_class","nullable":false,"required":false,"type":"string"},{"description":"Only games the player had this colour in.","enum_values":["white","black"],"location":"query","name":"color","nullable":false,"required":false,"type":"string"},{"description":"Only games the player won, lost or drew. On lichess it is applied to the page of games fetched, so a page can hold fewer than `limit` games; keep paging with `next_until`.","enum_values":["win","loss","draw"],"location":"query","name":"result","nullable":false,"required":false,"type":"string"},{"description":"Only games against this username.","location":"query","name":"opponent","nullable":false,"required":false,"type":"string"},{"description":"Games played from this date (YYYY-MM-DD or epoch milliseconds). Same as `from`.","location":"query","name":"since","nullable":false,"required":false,"type":"string"},{"description":"lichess only: true for games with computer analysis, false for games without.","enum_values":["true","false"],"location":"query","name":"analysed","nullable":false,"required":false,"type":"string"},{"description":"Games played from this date (YYYY-MM-DD or epoch milliseconds).","location":"query","name":"from","nullable":false,"required":false,"type":"string"},{"description":"Games played up to this date, inclusive (YYYY-MM-DD or epoch milliseconds). chess.com pages with `next_to`.","location":"query","name":"to","nullable":false,"required":false,"type":"string"},{"description":"Only games whose opening name contains this text (e.g. sicilian defense, queens gambit declined).","location":"query","name":"opening","nullable":false,"required":false,"type":"string"},{"description":"Only games whose ECO code starts with this (e.g. B90, B9 or B).","location":"query","name":"eco","nullable":false,"required":false,"type":"string"},{"description":"lichess only: newest first (default) or oldest first (page with `next_after` as `after`).","enum_values":["newest","oldest"],"location":"query","name":"sort","nullable":false,"required":false,"type":"string"},{"description":"lichess only, with sort=oldest: `next_after` from the previous page.","location":"query","name":"after","nullable":false,"required":false,"type":"string"},{"description":"lichess only: true also returns games still being played.","enum_values":["true","false"],"location":"query","name":"ongoing","nullable":false,"required":false,"type":"string"},{"description":"lichess only: true adds the clock after every move (`clocks_centiseconds`).","location":"query","name":"clocks","nullable":false,"required":false,"type":"boolean"},{"description":"0 leaves out the bulky `raw` source blocks (often 10-30x smaller).","enum_values":["0","1"],"location":"query","name":"raw","nullable":false,"required":false,"type":"string"},{"description":"Comma-separated fields to return, e.g. `posts.id,posts.title`. Call metadata is always included.","location":"query","name":"fields","nullable":false,"required":false,"type":"string"},{"description":"1 skips the 24-hour cache and fetches live.","enum_values":["1"],"location":"query","name":"fresh","nullable":false,"required":false,"type":"string"},{"description":"JSON only for this OpenAny product. Omit output or use json; CSV and NDJSON are not supported.","enum_values":["json"],"location":"query","name":"output","nullable":false,"required":false,"type":"string"},{"description":"With output=csv|ndjson: the top-level list to turn into rows (e.g. `reviews`), or `.` for the whole object as one row.","location":"query","name":"records","nullable":false,"required":false,"type":"string"}],"logoUrl":"https://api.sh/logos/chess.png","method":"GET","name":"Chess a player's games with PGN API","nameTranslations":{},"overviewHtml":"\u003ch2\u003eChess.com \u0026amp; Lichess Player Games API\u003c/h2\u003e\n\u003cp\u003ePass username and site with supported filters. from/since accept dates or epoch milliseconds, to is inclusive; pagination differs between Chess.com next_to and Lichess next_until/next_after.\u003c/p\u003e\n\u003ch2\u003eQuick Facts\u003c/h2\u003e\n\u003ctable\u003e\n\u003cthead\u003e\n\u003ctr\u003e\n\u003cth\u003eFact\u003c/th\u003e\n\u003cth\u003eValue\u003c/th\u003e\n\u003c/tr\u003e\n\u003c/thead\u003e\n\u003ctbody\u003e\n\u003ctr\u003e\n\u003ctd\u003eAccess\u003c/td\u003e\n\u003ctd\u003eOpenAny REST\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003eAuthentication\u003c/td\u003e\n\u003ctd\u003eOpenAny API key in the Authorization header\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003eCore inputs\u003c/td\u003e\n\u003ctd\u003eRequired: username. Optional: site, month, limit, perf, rated, until, time_class, color, result, opponent, since, analysed, from, to, opening, eco, sort, after, ongoing, clocks. JSON output; fresh=1 bypasses cache and raw=0 omits raw source blocks.\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003eSelected implementation\u003c/td\u003e\n\u003ctd\u003eapish · Chess a player\u0026#39;s games with PGN API\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003eBilling\u003c/td\u003e\n\u003ctd\u003eSee the pricing area for the selected implementation and request options\u003c/td\u003e\n\u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n\u003ch2\u003eWhat You Can Build\u003c/h2\u003e\n\u003cul\u003e\n\u003cli\u003e\u003cstrong\u003eChess reference\u003c/strong\u003e: Keep source site and entity identity.\u003c/li\u003e\n\u003cli\u003e\u003cstrong\u003eRecord navigation\u003c/strong\u003e: Preserve the site-specific category and time-control scope.\u003c/li\u003e\n\u003c/ul\u003e\n\u003ch2\u003eReturned Data\u003c/h2\u003e\n\u003ctable\u003e\n\u003cthead\u003e\n\u003ctr\u003e\n\u003cth\u003eField\u003c/th\u003e\n\u003cth\u003eMeaning\u003c/th\u003e\n\u003c/tr\u003e\n\u003c/thead\u003e\n\u003ctbody\u003e\n\u003ctr\u003e\n\u003ctd\u003e\u003ccode\u003egames[].id\u003c/code\u003e\u003c/td\u003e\n\u003ctd\u003eSource game identifier\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003e\u003ccode\u003egames[].pgn\u003c/code\u003e\u003c/td\u003e\n\u003ctd\u003eSource PGN text within the JSON game record\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003e\u003ccode\u003egames[].time_class\u003c/code\u003e\u003c/td\u003e\n\u003ctd\u003eSource game time class\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003e\u003ccode\u003egames[].result\u003c/code\u003e\u003c/td\u003e\n\u003ctd\u003eSource game result notation\u003c/td\u003e\n\u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n\u003ch2\u003eQuick Start\u003c/h2\u003e\n\u003col\u003e\n\u003cli\u003eSet OPENANY_API_KEY to your OpenAny API key.\u003c/li\u003e\n\u003cli\u003eReview the selected implementation and pricing, then adapt the request below to your target.\u003c/li\u003e\n\u003cli\u003eCheck the HTTP response and business result before reading optional fields.\u003c/li\u003e\n\u003c/ol\u003e\n\u003cpre\u003e\u003ccode class=\"language-bash\"\u003ecurl --request GET --get \\\n  https://api.openany.si/v1/agent-apis/apish/chess/v1/games \\\n  -H \u0026#34;Authorization: Bearer ${OPENANY_API_KEY}\u0026#34; \\\n  --data-urlencode limit=1 \\\n  --data-urlencode output=json \\\n  --data-urlencode raw=0 \\\n  --data-urlencode username=hikaru\n\u003c/code\u003e\u003c/pre\u003e\n\u003ch2\u003eRequest and Response Examples\u003c/h2\u003e\n\u003cp\u003eThe response example is a documentation reference and may be abbreviated. The documented request is a calling template; use the published contract and returned response for the selected implementation.\u003c/p\u003e\n\u003cp\u003e\u003ca href=\"https://openany.si/api/v1/agent-apis/a504426a-21bf-46f1-aff6-efc7fe962d74\"\u003ePublished Chess.com \u0026amp; Lichess Player Games API implementation contract\u003c/a\u003e.\u003c/p\u003e\n\u003ch2\u003ePricing and Billing\u003c/h2\u003e\n\u003cp\u003eThe pricing area reflects the selected API implementation. Review its billing unit and any request-dependent rules before calling; a source service\u0026#39;s public availability does not determine OpenAny billing.\u003c/p\u003e\n\u003ch2\u003eFrequently Asked Questions\u003c/h2\u003e\n\u003ch3\u003eIs the response a raw PGN file?\u003c/h3\u003e\n\u003cp\u003eThis implementation returns JSON containing game PGN text. The source sites’ direct export formats do not change this output contract.\u003c/p\u003e\n\u003ch3\u003eHow do I continue games?\u003c/h3\u003e\n\u003cp\u003eChess.com uses next_to as to. Lichess newest-first uses next_until as until; oldest-first uses next_after as after. A filtered Lichess page can be shorter than limit and still have another cursor.\u003c/p\u003e\n\u003ch3\u003eWhich limits and site-specific filters apply?\u003c/h3\u003e\n\u003cp\u003elimit is 1–500 for Chess.com or 1–100 for Lichess, default 50. perf, rated, analysed and ongoing are documented Lichess options.\u003c/p\u003e\n\u003ch3\u003eHow do I interpret Lichess clocks?\u003c/h3\u003e\n\u003cp\u003eclocks=true adds clocks_centiseconds. Preserve hundredths-of-a-second clock values separately from date-filter epoch milliseconds.\u003c/p\u003e\n\u003ch3\u003eHow do I bypass cached results?\u003c/h3\u003e\n\u003cp\u003ePass fresh=1. A cache bypass retrieves available source data; it does not make unpublished or restricted records available.\u003c/p\u003e\n\u003ch3\u003eCan I request CSV or NDJSON?\u003c/h3\u003e\n\u003cp\u003eThis OpenAny implementation serves JSON only. Omit output or set output=json.\u003c/p\u003e\n\u003ch2\u003eRelated APIs\u003c/h2\u003e\n\u003cul\u003e\n\u003cli\u003e\u003ca href=\"https://openany.si/market/apis/chess/chess-club-or-team-profile-and-members-api\"\u003eChess club or team profile and members API\u003c/a\u003e\u003c/li\u003e\n\u003cli\u003e\u003ca href=\"https://openany.si/market/apis/chess/chess-com-country-players-or-clubs-api\"\u003eChess.com country players or clubs API\u003c/a\u003e\u003c/li\u003e\n\u003cli\u003e\u003ca href=\"https://openany.si/market/apis/chess/chess-com-or-lichess-leaderboard-api\"\u003eChess.com or lichess leaderboard API\u003c/a\u003e\u003c/li\u003e\n\u003c/ul\u003e\n","pagePath":"/markets/apis/chess/chess-a-player-s-games-with-pgn-api?offering=a504426a-21bf-46f1-aff6-efc7fe962d74","providerId":"apish","publicPath":"/v1/agent-apis/apish/chess/v1/games","requestContentType":"none","revision":3,"samples":[{"http_status":200,"name":"Official example · Live API.SH response · Minimal request","request":{"body":null,"headers":{},"path":{},"query":{"limit":"1","output":"json","raw":"0","username":"hikaru"}},"response_body":{"cached":false,"count":1,"credits_used":1,"fetched_at":"2026-11-19T12:20:22.790Z","games":[{"accuracies":{"black":68.59,"white":66.72},"black":{"rating":3080,"result":"resigned","username":"Carnivoras"},"eco":"A01","end_time":"2026-11-19T01:35:02.000Z","fen":"1Q2k3/2Rb2q1/3p3r/3P1p2/4p2p/PP2PpP1/5P2/6K1 b - - 1 39","id":"9dd53891-e3b8-11f1-baf4-33d19f01000f","opening":"Nimzowitsch Larsen Attack Modern Variation 2.Bb2 Nc6 3.c4 g6","pgn":"[Event \"Live Chess\"]\n[Site \"Chess.com\"]\n[Date \"2026.11.19\"]\n[Round \"-\"]\n[White \"Hikaru\"]\n[Black \"Carnivoras\"]\n[Result \"1-0\"]\n[CurrentPosition \"1Q2k3/2Rb2q1/3p3r/3P1p2/4p2p/PP2PpP1/5P2/6K1 b - - 1 39\"]\n[Timezone \"UTC\"]\n[ECO \"A01\"]\n[ECOUrl \"https://www.chess.com/openings/Nimzowitsch-Larsen-Attack-Modern-Variation-2.Bb2-Nc6-3.c4-g6\"]\n[UTCDate \"2026.11.19\"]\n[UTCTime \"01:29:08\"]\n[WhiteElo \"3465\"]\n[BlackElo \"3080\"]\n[TimeControl \"180\"]\n[Termination \"Hikaru won by resignation\"]\n[StartTime \"01:29:08\"]\n[EndDate \"2026.11.19\"]\n[EndTime \"01:35:02\"]\n[Link \"https://www.chess.com/game/live/187517802954\"]\n\n1. b3 {[%clk 0:03:00]} 1... e5 {[%clk 0:03:00]} 2. Bb2 {[%clk 0:02:59.1]} 2... Nc6 {[%clk 0:02:59.7]} 3. c4 {[%clk 0:02:58.3]} 3... g6 {[%clk 0:02:57.1]} 4. g3 {[%clk 0:02:57.2]} 4... Bg7 {[%clk 0:02:56.5]} 5. Bg2 {[%clk 0:02:56.9]} 5... f5 {[%clk 0:02:49.9]} 6. e3 {[%clk 0:02:55.3]} 6... d6 {[%clk 0:02:49.6]} 7. Ne2 {[%clk 0:02:54.4]} 7... Nf6 {[%clk 0:02:49]} 8. d4 {[%clk 0:02:53.8]} 8... e4 {[%clk 0:02:47.7]} 9. O-O {[%clk 0:02:51.8]} 9... O-O {[%clk 0:02:46.9]} 10. a3 {[%clk 0:02:49.6]} 10... Ne7 {[%clk 0:02:45.5]} 11. d5 {[%clk 0:02:48.7]} 11... g5 {[%clk 0:02:43.4]} 12. Nbc3 {[%clk 0:02:36]} 12... Ng6 {[%clk 0:02:40.2]} 13. Qc2 {[%clk 0:02:34.2]} 13... Ne5 {[%clk 0:02:33]} 14. Rad1 {[%clk 0:02:33.2]} 14... Qe8 {[%clk 0:02:28.6]} 15. Nd4 {[%clk 0:02:30.2]} 15... g4 {[%clk 0:02:23.4]} 16. Nce2 {[%clk 0:02:25.8]} 16... Nf3+ {[%clk 0:02:21.2]} 17. Bxf3 {[%clk 0:02:23.6]} 17... gxf3 {[%clk 0:02:09]} 18. Nf4 {[%clk 0:02:23]} 18... Bh6 {[%clk 0:01:57.6]} 19. Kh1 {[%clk 0:01:46.6]} 19... Ng4 {[%clk 0:01:47.2]} 20. Qc3 {[%clk 0:01:43.9]} 20... Bg7 {[%clk 0:01:38.6]} 21. h3 {[%clk 0:01:40.8]} 21... Ne5 {[%clk 0:01:37.4]} 22. c5 {[%clk 0:01:19.4]} 22... Bd7 {[%clk 0:01:24.1]} 23. cxd6 {[%clk 0:01:14.2]} 23... cxd6 {[%clk 0:01:23]} 24. Qc7 {[%clk 0:01:13.9]} 24... Rc8 {[%clk 0:01:08.8]} 25. Qxb7 {[%clk 0:01:12.9]} 25... Rf6 {[%clk 0:00:55.6]} 26. Nde6 {[%clk 0:01:09.7]} 26... Rh6 {[%clk 0:00:38]} 27. Nxg7 {[%clk 0:01:07.6]} 27... Kxg7 {[%clk 0:00:37.9]} 28. Rc1 {[%clk 0:00:59.2]} 28... Kf8 {[%clk 0:00:31.6]} 29. Rxc8 {[%clk 0:00:57.1]} 29... Bxc8 {[%clk 0:00:31.5]} 30. Qc7 {[%clk 0:00:56.1]} 30... Bd7 {[%clk 0:00:29]} 31. Kg1 {[%clk 0:00:46.8]} 31... Qe7 {[%clk 0:00:22.5]} 32. Rc1 {[%clk 0:00:42]} 32... Ng6 {[%clk 0:00:21.4]} 33. Nxg6+ {[%clk 0:00:25.8]} 33... hxg6 {[%clk 0:00:20.5]} 34. h4 {[%clk 0:00:25.5]} 34... g5 {[%clk 0:00:19.9]} 35. Qb8+ {[%clk 0:00:23.6]} 35... Kf7 {[%clk 0:00:18.8]} 36. Rc7 {[%clk 0:00:23.3]} 36... gxh4 {[%clk 0:00:17.8]} 37. Qxa7 {[%clk 0:00:23.1]} 37... Ke8 {[%clk 0:00:09.2]} 38. Bg7 {[%clk 0:00:21.1]} 38... Qxg7 {[%clk 0:00:07.7]} 39. Qb8+ {[%clk 0:00:20.3]} 1-0\n","rated":true,"result":"1-0","rules":"chess","start_time":"2026-11-19T01:29:08Z","termination":"Hikaru won by resignation","time_class":"blitz","time_control":"180","url":"https://www.chess.com/game/live/187517802954","white":{"rating":3465,"result":"win","username":"Hikaru"}}],"month":"2026-11","months":["2026-11","2026-10","2026-09","2026-08","2026-07","2026-06","2026-05","2026-04","2026-03","2026-02","2026-01","2025-12","2025-11","2025-10","2025-09","2025-08","2025-07","2025-06","2025-05","2025-04","2025-03","2025-02","2025-01","2024-12","2024-11","2024-10","2024-09","2024-08","2024-07","2024-06","2024-05","2024-04","2024-03","2024-02","2024-01","2023-12","2023-11","2023-10","2023-09","2023-08","2023-07","2023-06","2023-05","2023-04","2023-03","2023-02","2023-01","2022-12","2022-11","2022-10","2022-09","2022-08","2022-07","2022-06","2022-05","2022-04","2022-03","2022-02","2022-01","2021-12","2021-11","2021-10","2021-09","2021-08","2021-07","2021-06","2021-05","2021-04","2021-03","2021-02","2021-01","2020-12","2020-11","2020-10","2020-09","2020-08","2020-07","2020-06","2020-05","2020-04","2020-03","2020-02","2020-01","2019-12","2019-11","2019-10","2019-09","2019-08","2019-07","2019-06","2019-05","2019-04","2019-03","2019-02","2019-01","2018-12","2018-11","2018-10","2018-09","2018-08","2018-07","2018-06","2018-05","2018-04","2018-03","2018-02","2018-01","2017-12","2017-11","2017-10","2017-09","2017-08","2017-07","2017-06","2017-05","2017-04","2017-03","2017-02","2017-01","2016-12","2016-11","2016-10","2016-09","2016-08","2016-07","2016-06","2016-05","2016-04","2016-03","2016-02","2016-01","2015-12","2015-11","2015-10","2015-09","2015-08","2015-07","2015-06","2015-05","2015-04","2015-03","2015-02","2015-01","2014-12","2014-11","2014-10","2014-09","2014-08","2014-07","2014-06","2014-05","2014-04","2014-03","2014-02","2014-01"],"previous_month":"2026-10","site":"chesscom","username":"hikaru"}}],"seoDescription":"Get Chess.com or Lichess player games with PGN in JSON via REST or MCP powered by Apish. Pay per call, no subscription. Ideal for chess reference.","updatedAt":"2026-12-03T02:47:46.637Z","usageInstructionsHtml":""}}