Answers.Body: <p>The project <a href="https://github.com/noobpwnftw/chessdb" rel="nofollow noreferrer">https://github.com/noobpwnftw/chessdb</a> provides an API for getting engine evaluations including also the PV, with the FEN of a position as input.</p>
  <p>E.g., try an example from the readme:</p>
  <p><a href="https://www.chessdb.cn/cdb.php?action=querypv&amp;board=rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR%20w%20KQkq%20-%200%201&amp;json=1" rel="nofollow noreferrer">https://www.chessdb.cn/cdb.php?action=querypv&amp;board=rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR%20w%20KQkq%20-%200%201&amp;json=1</a></p>
  <p>The response I got is:</p>
  <pre><code>{
    &quot;status&quot;: &quot;ok&quot;,
    &quot;score&quot;: 8,
    &quot;depth&quot;: 39,
    &quot;pv&quot;: [
      &quot;e2e4&quot;, &quot;c7c5&quot;, &quot;d2d4&quot;, &quot;c5d4&quot;, &quot;g1f3&quot;, &quot;e7e5&quot;, &quot;c2c3&quot;, &quot;b8c6&quot;, &quot;f1c4&quot;, &quot;g8f6&quot;, &quot;f3g5&quot;, &quot;d7d5&quot;, &quot;e4d5&quot;, &quot;c6a5&quot;, &quot;c4b5&quot;, &quot;c8d7&quot;, &quot;d1e2&quot;, &quot;f8d6&quot;, &quot;b2b4&quot;, &quot;h7h6&quot;, &quot;g5f3&quot;, &quot;e8g8&quot;, &quot;b4a5&quot;, &quot;d4d3&quot;, &quot;e2b2&quot;, &quot;f6d5&quot;, &quot;b1d2&quot;, &quot;d7b5&quot;, &quot;b2b5&quot;, &quot;d5c3&quot;, &quot;b5d3&quot;, &quot;d6b4&quot;, &quot;d3d8&quot;, &quot;f8d8&quot;, &quot;a5a6&quot;, &quot;b7a6&quot;, &quot;a2a3&quot;, &quot;b4a5&quot;, &quot;e1f1&quot;
    ],
    &quot;pvSAN&quot;: [
      &quot;e4&quot;, &quot;c5&quot;, &quot;d4&quot;, &quot;cxd4&quot;, &quot;Nf3&quot;, &quot;e5&quot;, &quot;c3&quot;, &quot;Nc6&quot;, &quot;Bc4&quot;, &quot;Nf6&quot;, &quot;Ng5&quot;, &quot;d5&quot;, &quot;exd5&quot;, &quot;Na5&quot;, &quot;Bb5+&quot;, &quot;Bd7&quot;, &quot;Qe2&quot;, &quot;Bd6&quot;, &quot;b4&quot;, &quot;h6&quot;, &quot;Nf3&quot;, &quot;O-O&quot;, &quot;bxa5&quot;, &quot;d3&quot;, &quot;Qb2&quot;, &quot;Nxd5&quot;, &quot;Nbd2&quot;, &quot;Bxb5&quot;, &quot;Qxb5&quot;, &quot;Nxc3&quot;, &quot;Qxd3&quot;, &quot;Bb4&quot;, &quot;Qxd8&quot;, &quot;Rfxd8&quot;, &quot;a6&quot;, &quot;bxa6&quot;, &quot;a3&quot;, &quot;Ba5&quot;, &quot;Kf1&quot;
    ]
  }
  </code></pre>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-07-06T17:44:52.377Z
Answers.Text: It is essentially functioning as an opening book api and not able to evaluate unknown positions on-the-fly. e.g. https://www.chessdb.cn/cdb.php?action=querypv&board=8/7K/P2P4/1b1k3p/3Pp3/P6p/PBPp2P1/3B4%20w%20-%20-%200%201&json=1
Answers.UserDisplayName: prusswan
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-10-22T02:32:35.110Z
Answers.Text: That's what I infer too. Funny comment at bottom "Expect no further documentation except this one but the code should be self-explanatory", even though there isn't a single line explaining what it is :)
Answers.UserDisplayName: Peter Cotton
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-10-25T13:06:43.450Z
Answers.Text: Interesting find. I awarded the bounty although this question remains open. I'm rather surprised that in 2021 the world doesn't have a chess position evaluation API !
Answers.UserDisplayName: Peter Cotton
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-08-27T05:38:21.657Z
Answers.Text: It appears to be giving perfectly legitimate results. I ran queries from this FEN: `r1bqkb1r/ppp2ppp/5n2/n2Pp1N1/2B5/8/PPPP1PPP/RNBQK2R w KQkq - 1 6` and it gave the expected results.
Answers.UserDisplayName: Jim Ratliff
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2023-10-11T09:32:01.137Z
Answers.Text: @PeterCotton is the "Request for Analysis" here what you are looking for? https://www.chessdb.cn/cloudbookc_api_en.html
  Depending on the current load it can take a bit for the analysis to happen, but then you can probe it.
Answers.UserDisplayName: koedem
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-07-05T08:24:54.143Z
Answers.LastActivityDate: 2023-03-19T22:01:51.927Z
Answers.LastEditDate: 2023-03-19T22:01:51.927Z
Answers.UserDisplayName: Fabian Fichter
Answers.Body: <p>I'm a bit late, but <a href="https://stockfish.online" rel="nofollow noreferrer">https://stockfish.online</a> is a REST GET API for Stockfish. Make requests with a FEN string, depth, and mode. For example, making a GET request to <code>https://stockfish.online/api/stockfish.php?fen=r2q1rk1/ppp2ppp/3bbn2/3p4/8/1B1P4/PPP2PPP/RNB1QRK1 w - - 5 11&amp;depth=13&amp;mode=bestmove</code> would get the best move for the given FEN string at depth 13. Hope this helps!</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2023-07-22T02:45:50.393Z
Answers.LastActivityDate: 2023-07-22T02:45:50.393Z
Answers.UserDisplayName: cobbsaladluv
Answers.Body: <p><a href="https://chess-api.com/" rel="nofollow noreferrer">https://chess-api.com/</a> - it's basically Stockfish online.</p>
  <p>Quite rich response data and WebSocket support. You pass FEN or moves.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2024-03-05T14:15:43.997Z
Answers.LastActivityDate: 2024-03-05T14:15:43.997Z
Answers.UserDisplayName: stealz
Answers.Body: <p>Here is another one: <a href="http://chess-api.online" rel="nofollow noreferrer">http://chess-api.online</a> with the actual endpoint being <a href="http://ws.chess-api.online" rel="nofollow noreferrer">http://ws.chess-api.online</a>. It's an open source Stockfish based SpringBoot app <a href="https://github.com/tim-bits/stockfishweb" rel="nofollow noreferrer">on github</a>, which can be run locally or on a cloud with minimal resource requirements (e.g. currently, it's running just on 1 GB RAM using <a href="https://aws.amazon.com/free" rel="nofollow noreferrer">AWS Free tier</a>). In addition to serving REST requests, the app also allows to validate FENs and to build a FENs by positioning pieces on its virtual chess board.<br />
  It can be deployed on both Windows and Linux. I don't have a Mac, so couldn't test it there, but it might be just a matter of adding Stockfish executables for Mac.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2024-08-15T22:35:00.327Z
Answers.LastActivityDate: 2024-08-15T22:35:00.327Z
Answers.UserDisplayName: tim bits
Body: <p>Is there an online chess evaluation engine with a REST API? I'd like to be able to send a game or position (with castling ability presumably) to a simple REST API and get back the positional evaluation from a reasonably strong engine. </p>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2016-03-21T00:29:40.667Z
Comments.Text: Nobody expects the inquisition.  http://analysis.cpuchess.com/  is pretty close, but no API
Comments.UserDisplayName: Peter Cotton
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2016-03-21T08:26:53.587Z
Comments.Text: @Peter You can program the JavaScript to give positions to analysis.cpuchess.com and read results back.
Comments.UserDisplayName: SmallChess
Tags: <engines><analysis><programming><evaluation><online>
Title: Is there an online chess evaluation engine with a REST API?
ThreadText: # Is there an online chess evaluation engine with a REST API?
  
  (Asked by: username_0 on 2016-03-20)
  
  Is there an online chess evaluation engine with a REST API? I'd like to be able to send a game or position (with castling ability presumably) to a simple REST API and get back the positional evaluation from a reasonably strong engine.
  
  **Tags:** engines, analysis, programming, evaluation, online
  
  > **Comments:**
  > **username_0**: Nobody expects the inquisition.  http://analysis.cpuchess.com/  is pretty close, but no API  
  > **username_1**: @username_0 You can program the JavaScript to give positions to analysis.cpuchess.com and read results back.  
  
  ---
  
  ## 4 answers
  
  ### Answer by username_2 on 2019-07-05. Score: 3
  
  The project <https://github.com/noobpwnftw/chessdb> provides an API for getting engine evaluations including also the PV, with the FEN of a position as input.
  
  E.g., try an example from the readme:
  
  <https://www.chessdb.cn/cdb.php?action=querypv&board=rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR%20w%20KQkq%20-%200%201&json=1>
  
  The response I got is:
  
  ```
  {
    "status": "ok",
    "score": 8,
    "depth": 39,
    "pv": [
      "e2e4", "c7c5", "d2d4", "c5d4", "g1f3", "e7e5", "c2c3", "b8c6", "f1c4", "g8f6", "f3g5", "d7d5", "e4d5", "c6a5", "c4b5", "c8d7", "d1e2", "f8d6", "b2b4", "h7h6", "g5f3", "e8g8", "b4a5", "d4d3", "e2b2", "f6d5", "b1d2", "d7b5", "b2b5", "d5c3", "b5d3", "d6b4", "d3d8", "f8d8", "a5a6", "b7a6", "a2a3", "b4a5", "e1f1"
    ],
    "pvSAN": [
      "e4", "c5", "d4", "cxd4", "Nf3", "e5", "c3", "Nc6", "Bc4", "Nf6", "Ng5", "d5", "exd5", "Na5", "Bb5+", "Bd7", "Qe2", "Bd6", "b4", "h6", "Nf3", "O-O", "bxa5", "d3", "Qb2", "Nxd5", "Nbd2", "Bxb5", "Qxb5", "Nxc3", "Qxd3", "Bb4", "Qxd8", "Rfxd8", "a6", "bxa6", "a3", "Ba5", "Kf1"
    ]
  }
  
  ```
  
  > **Comments:**
  > **username_3**: It is essentially functioning as an opening book api and not able to evaluate unknown positions on-the-fly. e.g. https://www.chessdb.cn/cdb.php?action=querypv&board=8/7K/P2P4/1b1k3p/3Pp3/P6p/PBPp2P1/3B4%20w%20-%20-%200%201&json=1  
  > **username_0**: That's what I infer too. Funny comment at bottom "Expect no further documentation except this one but the code should be self-explanatory", even though there isn't a single line explaining what it is :)  
  > **username_0**: Interesting find. I awarded the bounty although this question remains open. I'm rather surprised that in 2021 the world doesn't have a chess position evaluation API !  
  > **username_4**: It appears to be giving perfectly legitimate results. I ran queries from this FEN: `r1bqkb1r/ppp2ppp/5n2/n2Pp1N1/2B5/8/PPPP1PPP/RNBQK2R w KQkq - 1 6` and it gave the expected results.  
  > **username_5**: @username_0 is the "Request for Analysis" here what you are looking for? https://www.chessdb.cn/cloudbookc_api_en.html Depending on the current load it can take a bit for the analysis to happen, but then you can probe it.  
  
  ---
  
  ### Answer by username_6 on 2023-07-22. Score: 2
  
  I'm a bit late, but <https://stockfish.online> is a REST GET API for Stockfish. Make requests with a FEN string, depth, and mode. For example, making a GET request to `https://stockfish.online/api/stockfish.php?fen=r2q1rk1/ppp2ppp/3bbn2/3p4/8/1B1P4/PPP2PPP/RNB1QRK1 w - - 5 11&depth=13&mode=bestmove` would get the best move for the given FEN string at depth 13. Hope this helps!
  
  
  ---
  
  ### Answer by username_7 on 2024-03-05. Score: 1
  
  <https://chess-api.com/> - it's basically Stockfish online.
  
  Quite rich response data and WebSocket support. You pass FEN or moves.
  
  
  ---
  
  ### Answer by username_8 on 2024-08-15. Score: 0
  
  Here is another one: <http://chess-api.online> with the actual endpoint being <http://ws.chess-api.online>. It's an open source Stockfish based SpringBoot app [on github](https://github.com/tim-username_8/stockfishweb), which can be run locally or on a cloud with minimal resource requirements (e.g. currently, it's running just on 1 GB RAM using [AWS Free tier](https://aws.amazon.com/free)). In addition to serving REST requests, the app also allows to validate FENs and to build a FENs by positioning pieces on its virtual chess board.  
  It can be deployed on both Windows and Linux. I don't have a Mac, so couldn't test it there, but it might be just a matter of adding Stockfish executables for Mac.
  
  
  ---
  
  