STOCKFISH 14–19Latest release: 19Explore engines ↗

Learn

Search depth

How many plies ahead the engine has fully searched; cost grows about 1.6× per ply.

Depth 20 means the main line has been examined 20 half-moves deep, with selective extensions going further. Each extra ply costs roughly 1.6× more nodes, so depth 30 costs about 100× more than depth 20. For most purposes depth 14 to 18 is enough to pick a good move; depth 24+ is for analysis you will publish. This API prices requests by the node budget a depth implies, so GET /v1/price tells you the cost before you call.

Example

♜♝♛♚♝♜♟♟♟♟♟♟♟♞♞♗♟♙♘♙♙♙♙♙♙♙♖♘♗♕♔♖
curl -s https://stockfishapi.com/v1/eval \
  -H "Authorization: Bearer $STOCKFISH_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"fen":"r1bqkb1r/pppp1ppp/2n2n2/1B2p3/4P3/5N2/PPPP1PPP/RNBQK2R w KQkq - 4 4","depth":14}'
const res = await fetch("https://stockfishapi.com/v1/eval", {
  method: "POST",
  headers: { Authorization: `Bearer ${process.env.STOCKFISH_API_KEY}`, "Content-Type": "application/json" },
  body: JSON.stringify({
    "fen": "r1bqkb1r/pppp1ppp/2n2n2/1B2p3/4P3/5N2/PPPP1PPP/RNBQK2R w KQkq - 4 4",
    "depth": 14
  }),
});
const data = await res.json();
import os, requests

r = requests.post(
    "https://stockfishapi.com/v1/eval",
    headers={"Authorization": f"Bearer {os.environ['STOCKFISH_API_KEY']}"},
    json={
        "fen": "r1bqkb1r/pppp1ppp/2n2n2/1B2p3/4P3/5N2/PPPP1PPP/RNBQK2R w KQkq - 4 4",
        "depth": 14
    },
)
data = r.json()