Answers.Body: <p>You can use <a href="https://lichess.org/api#tag/Broadcasts/operation/broadcastIndex" rel="nofollow noreferrer">Lichess api</a> for this. Lichess provides broadcasts of high level tournaments with both clock times and evals. You can get list of such events with going to <a href="https://lichess.org/api/broadcast" rel="nofollow noreferrer">https://lichess.org/api/broadcast</a> endpoint. Going to it with your browser will start downloading <code>broadcast</code> file.</p>
  <p>Example file:</p>
  <pre><code>{&quot;tour&quot;:{&quot;id&quot;:&quot;ycy5D2r8&quot;,&quot;name&quot;:&quot;Tata Steel Masters 2024&quot;,
  &quot;slug&quot;:&quot;tata-steel-masters-2024&quot;,&quot;description&quot;:&quot;January 13th - 28th
  ...
  </code></pre>
  <p>Note the <strong>id</strong> of the event you want games for. In this case (Tata Steel Masters 2024) the event id is <strong>ycy5D2r8</strong>.</p>
  <p>With you browser go to <a href="https://lichess.org/api/broadcast/ycy5D2r8.pgn" rel="nofollow noreferrer">https://lichess.org/api/broadcast/ycy5D2r8.pgn</a> (replace <strong>ycy5D2r8</strong> with id of whichever tournament you want). Download of pgn file with all games from this tournament will start.</p>
  <p>Example game:</p>
  <pre><code>[Event &quot;Tata Steel Masters 2024&quot;]
  [Site &quot;Wijk aan Zee, Netherlands&quot;]
  [Date &quot;2024.01.13&quot;]
  [Round &quot;1.1&quot;]
  [White &quot;Donchenko, Alexander&quot;]
  [Black &quot;Wei, Yi&quot;]
  [Result &quot;0-1&quot;]
  [WhiteElo &quot;2643&quot;]
  [WhiteTitle &quot;GM&quot;]
  [WhiteFideId &quot;24603295&quot;]
  [BlackElo &quot;2740&quot;]
  [BlackTitle &quot;GM&quot;]
  [BlackFideId &quot;8603405&quot;]
  [UTCDate &quot;2024.01.13&quot;]
  [UTCTime &quot;13:28:16&quot;]
  [Variant &quot;Standard&quot;]
  [ECO &quot;E60&quot;]
  [Opening &quot;King's Indian Defense: Normal Variation, King's Knight Variation&quot;]
  [Annotator &quot;https://lichess.org/@/AAArmstark&quot;]
  
  1. d4 { [%eval 0.13] [%clk 1:40:56] } 1... Nf6 { [%eval 0.16] [%clk 1:40:50] } 2. c4 { [%eval 0.16] [%clk 1:41:11] } 2... g6 { [%eval 0.28] [%clk 1:41:08] } 3. Nf3 { [%eval 0.3] [%clk 1:41:06] } 3... Bg7 { [%eval 0.13] [%clk 1:41:23] } 4. e3 { [%eval 0.22] [%clk 1:41:10] } 4... O-O { [%eval 0.0] [%clk 1:41:14] } 5. Be2 { [%eval 0.0] [%clk 1:41:26] } 5... c5 { [%eval 0.31] [%clk 1:40:55] } 6. d5 { [%eval 0.0] [%clk 1:41:31] } 6... e6 { [%eval 0.14] [%clk 1:40:16] } 7. Nc3 { [%eval 0.12] [%clk 1:41:40] } 7... d6 { [%eval 0.14] [%clk 1:40:37] } 8. O-O { [%eval 0.2] [%clk 1:41:08] } 8... exd5 { [%eval 0.19] [%clk 1:40:36] } 9. cxd5 { [%eval 0.18] [%clk 1:41:20] } 9... Bg4 { [%eval 0.15] } 10. Nd2 { [%eval -0.3] [%clk 1:34:42] } 10... Bxe2 { [%eval -0.32] [%clk 1:41:06] } 11. Qxe2 { [%eval -0.37] } 11... Na6 { [%eval -0.17] [%clk 1:41:10] } 12. e4 { [%eval -0.27] [%clk 1:17:33] } 12... Re8 { [%eval -0.33] [%clk 1:40:55] } 13. Nc4 { [%eval -0.23] [%clk 1:05:07] } 13... b5 { [%eval -0.28] } 14. Nxb5 { [%eval -0.43] [%clk 1:04:53] } 14... Nxe4 { [%eval -0.21] } 15. Qf3 { [%eval -0.25] [%clk 0:58:07] } 15... Qd7 { [%eval -0.22] } 16. a4 { [%eval -0.34] } 16... Nb4 { [%eval -0.32] } 17. Bf4 { [%eval -0.32] [%clk 0:48:02] } 17... Nc2 { [%eval -0.41] [%clk 1:16:45] } 18. Rad1 { [%eval -0.31] [%clk 0:46:32] } 18... Nd4 { [%eval -0.38] [%clk 1:15:41] } 19. Rxd4 { [%eval -0.9] [%clk 0:37:00] } 19... cxd4 { [%eval -0.94] [%clk 1:09:14] } 20. Ncxd6 { [%eval -0.9] [%clk 0:36:52] } 20... Nxd6 { [%eval -0.96] [%clk 1:09:33] } 21. Nxd6 { [%eval -0.77] [%clk 0:37:16] } 21... Red8 { [%eval -0.92] [%clk 0:42:40] } 22. b3 { [%eval -0.96] [%clk 0:35:32] } 22... g5 { [%eval -0.87] [%clk 0:36:09] } 23. Bg3 { [%eval -0.82] [%clk 0:35:31] } 23... f5 { [%eval -0.78] [%clk 0:36:24] } 24. Qxf5 { [%eval -0.78] [%clk 0:35:01] } 24... Qxf5 { [%eval -0.89] [%clk 0:36:49] } 25. Nxf5 { [%eval -0.79] [%clk 0:35:25] } 25... Bf6 { [%eval -0.89] [%clk 0:37:11] } 26. Nd6 { [%eval -0.85] [%clk 0:30:55] } 26... h5 { [%eval -0.8] [%clk 0:32:09] } 27. h3 { [%eval -0.78] [%clk 0:28:30] } 27... h4 { [%eval -1.0] [%clk 0:32:29] } 28. Bh2 { [%eval -0.77] [%clk 0:28:54] } 28... Be7 { [%eval -0.65] [%clk 0:32:32] } 29. Nb5 { [%eval -0.87] [%clk 0:24:26] } 29... Bc5 { [%eval -1.22] [%clk 0:25:51] } 30. d6 { [%eval -0.91] [%clk 0:08:22] } 30... Rac8 { [%eval -0.92] [%clk 0:26:07] } 31. Be5 { [%eval -0.87] [%clk 0:07:24] } 31... d3 { [%eval -0.21] [%clk 0:26:14] } 32. Bf6 { [%eval -1.6] [%clk 0:02:54] } 32... Rd7 { [%eval -1.95] [%clk 0:26:35] } 33. Bxg5 { [%eval -1.69] [%clk 0:02:56] } 33... a6 { [%eval -1.4] [%clk 0:13:04] } 34. Nc3 { [%eval -1.65] [%clk 0:03:14] } 34... Bxd6 { [%eval -2.02] [%clk 0:13:15] } 35. Ne4 { [%eval -2.09] [%clk 0:01:41] } 35... Be7 { [%eval -2.03] [%clk 0:13:36] } 36. Rd1 { [%eval -5.21] [%clk 0:00:34] } 36... Bxg5 { [%eval -5.74] [%clk 0:13:53] } 37. Nxg5 { [%eval -5.83] [%clk 0:01:02] } 37... d2 { [%eval -5.5] [%clk 0:14:11] } 38. Kf1 { [%eval -6.22] [%clk 0:00:59] } 38... Re7 { [%eval -6.11] [%clk 0:14:36] } 0-1
  </code></pre>
  <p>Eval after move is in <strong>[%eval]</strong> comment, while clock time is in <strong>[%clk]</strong> comment. To extract this data to desired format you can use <a href="https://python-chess.readthedocs.io/en/latest/" rel="nofollow noreferrer">python-chess</a> library for Python (I am sure something similiar also exists for R). Just walk through mainline moves, extracting comments on each step.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2024-01-22T08:51:54.003Z
Answers.LastActivityDate: 2024-01-22T08:51:54.003Z
Answers.UserDisplayName: Matija Sirk
Body: <p>I am currently in need of data from high level tournaments for a project and the data needs to include information like each individual move, the engine evaluation after each move, and the time remaining after each move. (<a href="https://web.chessdigits.com/data" rel="nofollow noreferrer">https://web.chessdigits.com/data</a>) See this link for an example. Would anyone know how I could access data like this outside of paying for Chessbase? And if so how to extract it into a CSV file ready for analysis in R, Stata etc.</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2024-01-22T08:17:47.957Z
Comments.Text: You can use lichess and check its broadcast. I see the games are analyzed with eval and with clock info. If there is no eval, you can analyzed them. The most difficult is a game without clock info. See also the pages in chessbase and chess.com, these sites offers games for download. If you know python, you can extract them using the python chess library.
Comments.UserDisplayName: ferdy
Tags: <engines><software><programming><statistics><database>
Title: How to access high level tournament game data
ThreadText: # How to access high level tournament game data
  
  (Asked by: username_0 on 2024-01-21)
  
  I am currently in need of data from high level tournaments for a project and the data needs to include information like each individual move, the engine evaluation after each move, and the time remaining after each move. (<https://web.chessdigits.com/data>) See this link for an example. Would anyone know how I could access data like this outside of paying for Chessbase? And if so how to extract it into a CSV file ready for analysis in R, Stata etc.
  
  **Tags:** engines, software, programming, statistics, database
  
  > **Comments:**
  > **username_1**: You can use lichess and check its broadcast. I see the games are analyzed with eval and with clock info. If there is no eval, you can analyzed them. The most difficult is a game without clock info. See also the pages in chessbase and chess.com, these sites offers games for download. If you know python, you can extract them using the python chess library.  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_2 on 2024-01-22. Score: 4
  
  You can use [Lichess api](https://lichess.org/api#tag/Broadcasts/operation/broadcastIndex) for this. Lichess provides broadcasts of high level tournaments with both clock times and evals. You can get list of such events with going to <https://lichess.org/api/broadcast> endpoint. Going to it with your browser will start downloading `broadcast` file.
  
  Example file:
  
  ```
  {"tour":{"id":"ycy5D2r8","name":"Tata Steel Masters 2024",
  "slug":"tata-steel-masters-2024","description":"January 13th - 28th
  ...
  
  ```
  
  Note the **id** of the event you want games for. In this case (Tata Steel Masters 2024) the event id is **ycy5D2r8**.
  
  With you browser go to <https://lichess.org/api/broadcast/ycy5D2r8.pgn> (replace **ycy5D2r8** with id of whichever tournament you want). Download of pgn file with all games from this tournament will start.
  
  Example game:
  
  ```
  [Event "Tata Steel Masters 2024"]
  [Site "Wijk aan Zee, Netherlands"]
  [Date "2024.01.13"]
  [Round "1.1"]
  [White "Donchenko, Alexander"]
  [Black "Wei, Yi"]
  [Result "0-1"]
  [WhiteElo "2643"]
  [WhiteTitle "GM"]
  [WhiteFideId "24603295"]
  [BlackElo "2740"]
  [BlackTitle "GM"]
  [BlackFideId "8603405"]
  [UTCDate "2024.01.13"]
  [UTCTime "13:28:16"]
  [Variant "Standard"]
  [ECO "E60"]
  [Opening "King's Indian Defense: Normal Variation, King's Knight Variation"]
  [Annotator "https://lichess.org/@/AAArmstark"]
  
  1. d4 { [%eval 0.13] [%clk 1:40:56] } 1... Nf6 { [%eval 0.16] [%clk 1:40:50] } 2. c4 { [%eval 0.16] [%clk 1:41:11] } 2... g6 { [%eval 0.28] [%clk 1:41:08] } 3. Nf3 { [%eval 0.3] [%clk 1:41:06] } 3... Bg7 { [%eval 0.13] [%clk 1:41:23] } 4. e3 { [%eval 0.22] [%clk 1:41:10] } 4... O-O { [%eval 0.0] [%clk 1:41:14] } 5. Be2 { [%eval 0.0] [%clk 1:41:26] } 5... c5 { [%eval 0.31] [%clk 1:40:55] } 6. d5 { [%eval 0.0] [%clk 1:41:31] } 6... e6 { [%eval 0.14] [%clk 1:40:16] } 7. Nc3 { [%eval 0.12] [%clk 1:41:40] } 7... d6 { [%eval 0.14] [%clk 1:40:37] } 8. O-O { [%eval 0.2] [%clk 1:41:08] } 8... exd5 { [%eval 0.19] [%clk 1:40:36] } 9. cxd5 { [%eval 0.18] [%clk 1:41:20] } 9... Bg4 { [%eval 0.15] } 10. Nd2 { [%eval -0.3] [%clk 1:34:42] } 10... Bxe2 { [%eval -0.32] [%clk 1:41:06] } 11. Qxe2 { [%eval -0.37] } 11... Na6 { [%eval -0.17] [%clk 1:41:10] } 12. e4 { [%eval -0.27] [%clk 1:17:33] } 12... Re8 { [%eval -0.33] [%clk 1:40:55] } 13. Nc4 { [%eval -0.23] [%clk 1:05:07] } 13... b5 { [%eval -0.28] } 14. Nxb5 { [%eval -0.43] [%clk 1:04:53] } 14... Nxe4 { [%eval -0.21] } 15. Qf3 { [%eval -0.25] [%clk 0:58:07] } 15... Qd7 { [%eval -0.22] } 16. a4 { [%eval -0.34] } 16... Nb4 { [%eval -0.32] } 17. Bf4 { [%eval -0.32] [%clk 0:48:02] } 17... Nc2 { [%eval -0.41] [%clk 1:16:45] } 18. Rad1 { [%eval -0.31] [%clk 0:46:32] } 18... Nd4 { [%eval -0.38] [%clk 1:15:41] } 19. Rxd4 { [%eval -0.9] [%clk 0:37:00] } 19... cxd4 { [%eval -0.94] [%clk 1:09:14] } 20. Ncxd6 { [%eval -0.9] [%clk 0:36:52] } 20... Nxd6 { [%eval -0.96] [%clk 1:09:33] } 21. Nxd6 { [%eval -0.77] [%clk 0:37:16] } 21... Red8 { [%eval -0.92] [%clk 0:42:40] } 22. b3 { [%eval -0.96] [%clk 0:35:32] } 22... g5 { [%eval -0.87] [%clk 0:36:09] } 23. Bg3 { [%eval -0.82] [%clk 0:35:31] } 23... f5 { [%eval -0.78] [%clk 0:36:24] } 24. Qxf5 { [%eval -0.78] [%clk 0:35:01] } 24... Qxf5 { [%eval -0.89] [%clk 0:36:49] } 25. Nxf5 { [%eval -0.79] [%clk 0:35:25] } 25... Bf6 { [%eval -0.89] [%clk 0:37:11] } 26. Nd6 { [%eval -0.85] [%clk 0:30:55] } 26... h5 { [%eval -0.8] [%clk 0:32:09] } 27. h3 { [%eval -0.78] [%clk 0:28:30] } 27... h4 { [%eval -1.0] [%clk 0:32:29] } 28. Bh2 { [%eval -0.77] [%clk 0:28:54] } 28... Be7 { [%eval -0.65] [%clk 0:32:32] } 29. Nb5 { [%eval -0.87] [%clk 0:24:26] } 29... Bc5 { [%eval -1.22] [%clk 0:25:51] } 30. d6 { [%eval -0.91] [%clk 0:08:22] } 30... Rac8 { [%eval -0.92] [%clk 0:26:07] } 31. Be5 { [%eval -0.87] [%clk 0:07:24] } 31... d3 { [%eval -0.21] [%clk 0:26:14] } 32. Bf6 { [%eval -1.6] [%clk 0:02:54] } 32... Rd7 { [%eval -1.95] [%clk 0:26:35] } 33. Bxg5 { [%eval -1.69] [%clk 0:02:56] } 33... a6 { [%eval -1.4] [%clk 0:13:04] } 34. Nc3 { [%eval -1.65] [%clk 0:03:14] } 34... Bxd6 { [%eval -2.02] [%clk 0:13:15] } 35. Ne4 { [%eval -2.09] [%clk 0:01:41] } 35... Be7 { [%eval -2.03] [%clk 0:13:36] } 36. Rd1 { [%eval -5.21] [%clk 0:00:34] } 36... Bxg5 { [%eval -5.74] [%clk 0:13:53] } 37. Nxg5 { [%eval -5.83] [%clk 0:01:02] } 37... d2 { [%eval -5.5] [%clk 0:14:11] } 38. Kf1 { [%eval -6.22] [%clk 0:00:59] } 38... Re7 { [%eval -6.11] [%clk 0:14:36] } 0-1
  
  ```
  
  Eval after move is in **[%eval]** comment, while clock time is in **[%clk]** comment. To extract this data to desired format you can use [python-chess](https://python-chess.readthedocs.io/en/latest/) library for Python (I am sure something similiar also exists for R). Just walk through mainline moves, extracting comments on each step.
  
  
  ---
  
  