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.
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
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
- Small runs answer in the same request; longer ones answer
202with a run to poll. fieldsreturns only the fields you name. The examples send the ones picked on this page.Idempotency-Keyis optional. A retry with it is never charged twice.- You pay for records returned. Zero records cost zero.
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.
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 name | Type | Shown on this page as | Filled |
|---|---|---|---|
fen | text | Fen | 3 of 3 |
is_cached | yes or no | Cached | 3 of 3 |
depth | number | Engine search depth | 3 of 3 |
knodes | number | Knodes | 3 of 3 |
line_rank | number | Line rank | 3 of 3 |
centipawns | number | Centipawns | 2 of 3 |
mate_in | number | Mate in | 1 of 3 |
moves | list | Moves | 3 of 3 |
How it reads the site
Runs on a reader we built and maintain by hand for this site.
Save as pipeline
A pipeline remembers this API, your inputs and the fields you picked. It can run on a schedule and email you the results.
Sample records
| Record | Fen | Cached | Engine search depth | Knodes | Line rank | Centipawns | Mate in | Moves |
|---|---|---|---|---|---|---|---|---|
| 1 | rnbqkbnr/pppppppp/8/8/4P3/8/PPPP1PPP/RNBQKBNR b KQkq - 0 1 | Yes | 60 | 119,133 | 1 | 22 | — | e7e5, g1f3, b8c6, f1b5 |
| 2 | rnbqkbnr/pppppppp/8/8/4P3/8/PPPP1PPP/RNBQKBNR b KQkq - 0 1 | Yes | 60 | 119,133 | 2 | 27 | — | c7c6, d2d4, d7d5, e4e5 |
| 3 | 6k1/5ppp/8/8/8/8/8/R5K1 w - - 0 1 | Yes | 42 | 15,122 | 1 | — | 1 | a1a8 |
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.
- 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.
Manage this API
Only your workspace sees this part.
Automatic repair
Off: a rebuilt version is stored and waits for you in the version history.
Delete this API
Removes the API, its versions and the saved records of its runs. Calls to its address then answer 404. Records already charged stay charged. This cannot be undone.