Chess Position Evaluation API

Engine evaluations for chess positions (FEN) from the Lichess cloud cache: the best lines with search depth, score in centipawns or mate distance, and the move sequence, without running an engine yourself.

$0.50 per 1,000 records

You pay only for the records you get. Zero records cost zero. 10,000 free records of this API to start (5,000 at the base price of $1 per 1,000), no card.

Try it
Ready-made, maintained by usRecords, 8 fieldsv1.0

Data from lichess.org/api/cloud-eval

Get this data

Try it here with a few records, download the sample, fill a Google Sheet, or call it from your own code.

Try it

Positions
Board positions as FEN text, such as the position after 1.e4. Up to 50 per run. One per line, or separated by commas.
Example: rnbqkbnr/pppppppp/8/8/4P3/8/PPPP1PPP/RNBQKBNR b KQkq - 0 1
Linesoptional
Best lines to return for each position, from 1 to 5.
Example: 2

Run it on this page, or call it from your code with the endpoint in the developer section. A free key covers 10,000 records of this API, no card. Create a free key

For developers: the API and MCPThe endpoint, code in curl, JavaScript and Python, every input, and files for your tools
Endpoint
POSThttps://pullrow.dev/v1/apis/lichess-cloud-eval/run
  • Small runs answer in the same request; longer ones answer 202 with a run to poll.
  • fields returns only the fields you name. The examples send the ones picked on this page.
  • Idempotency-Key is optional. A retry with it is never charged twice.
  • You pay for records returned. Zero records cost zero.

Every run option, explained

Calling it needs a key
10,000 free records of this API to start. No card.
curl
curl -X POST "https://pullrow.dev/v1/apis/lichess-cloud-eval/run" \
  -H "Authorization: Bearer $PULLROW_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "input": {
    "positions": [
      "rnbqkbnr/pppppppp/8/8/4P3/8/PPPP1PPP/RNBQKBNR b KQkq - 0 1"
    ]
  },
  "max_items": 50
}'

Inputs

Send them as input in the request body. Leave one out to use its default.

positionslistrequired
Board positions as FEN text, such as the position after 1.e4. Up to 50 per run.
example: rnbqkbnr/pppppppp/8/8/4P3/8/PPPP1PPP/RNBQKBNR b KQkq - 0 1
linesnumber
Best lines to return for each position, from 1 to 5.
example: 2

What's in each record

8 fields.

Basics

  • Fen

    The position asked about, as given.

    Example rnbqkbnr/pppppppp/8/8/4P3/8/PPPP1PPP/RNBQKBNR b KQkq - 0 1

  • Cached

    False when the cloud cache holds no evaluation for the position.

    Example Yes

  • Engine search depth

    Example 60

  • Knodes

    Thousands of nodes searched.

    Example 119,133

  • Line rank

    1 for the best line, 2 for the next, and so on.

    Example 1

  • Centipawns

    Score in hundredths of a pawn for White; empty when a mate is found.

    Example 22

  • Mate in

    Moves to mate (negative when Black mates); empty without a forced mate.

    Example 1

  • Moves

    The line as moves in coordinate form, such as e7e5.

    Example e7e5, g1f3

Technical detailsField names and types for developers

Field names and types

The names your code reads in each record. "Filled" counts how many of the 3 sample records carry the field.

Field nameTypeShown on this page asFilled
fentextFen3 of 3
is_cachedyes or noCached3 of 3
depthnumberEngine search depth3 of 3
knodesnumberKnodes3 of 3
line_ranknumberLine rank3 of 3
centipawnsnumberCentipawns2 of 3
mate_innumberMate in1 of 3
moveslistMoves3 of 3

How it reads the site

Runs on a reader we built and maintain by hand for this site.

Sample records

Sample records
RecordFenCachedEngine search depthKnodesLine rankCentipawnsMate inMoves
1rnbqkbnr/pppppppp/8/8/4P3/8/PPPP1PPP/RNBQKBNR b KQkq - 0 1Yes60119,133122—e7e5, g1f3, b8c6, f1b5
2rnbqkbnr/pppppppp/8/8/4P3/8/PPPP1PPP/RNBQKBNR b KQkq - 0 1Yes60119,133227—c7c6, d2d4, d7d5, e4e5
36k1/5ppp/8/8/8/8/8/R5K1 w - - 0 1Yes4215,1221—1a1a8

Sample records from the example output this API publishes. Email addresses and phone numbers in them are masked. Hover over a column name to see the field name your code reads.

Reliability

Counted from real runs. Our own health checks are left out. A run succeeded when it finished and the site neither blocked it nor broke it.

Incidents and repairs

How it is kept working What a repair can't do

A ready-made API, maintained by us. It is not part of the daily check or the automatic rebuild yet.

  • You pay only for records returned. A run that returns none costs nothing.
Known limits
  • Only positions already in the Lichess cloud cache have an evaluation; others return one row with no evaluation and cached set to false.
  • Up to 5 lines per position and up to 50 positions per run; scores are from White's point of view.
  • One request per position, sent one at a time and spaced out; large lists take a while. If the source asks to slow down, the run stops early with the rows saved so far.
  • Game data is released under CC0 by Lichess; no credit is required but it is appreciated.

Version history

A run uses the live version unless the request names another one with version.