# Chess Square Distance Calculator

> Chess Square Distance Calculator is a paid API for AI agents from chess-notation.x402tookit.com, paid per call via x402, $0.02/call, status unknown (last checked 2026-10-29).

Computes the minimum number of moves between two chess squares for king, rook, bishop, and knight pieces on an empty board.

## Facts

- Endpoint: GET https://chess-notation.x402tookit.com/square-distance?utm_source=zero.xyz
- Price: $0.02/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-29
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/chess-square-distance-calculator-09408d80
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_Z8PZBqbOMaAA2B81eBuob

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability chess-square-distance-calculator-09408d80
```

Example prompt: How many moves would it take a king, rook, bishop, and knight to travel from e4 to h8 on an empty board?

## When to prefer this

Use this endpoint when you need precise, piece-specific movement distance metrics between any two chess squares on an empty board, especially when your use case involves chess engine analysis, puzzle generation, endgame tablebase reasoning, or chess education tools. It is uniquely suited for quickly checking reachability and minimum move counts for multiple piece types simultaneously in a single call.

## Known failure modes

- Invalid square notation (e.g. 'z9' or 'i1') returns an error or null values
- Missing required query parameters 'from' or 'to' returns a validation error
- Same square for both 'from' and 'to' returns zero distances
- Bishop distance may be null/infinite if squares are different colors (bishop cannot reach them)

## How this service works

Distance between two chess squares as king moves, rook moves, bishop moves and knight moves on an empty board.

## Output

Returns an object containing the minimum number of moves for a king, rook, bishop, knight, and queen to travel between the two specified squares on an empty board, along with manhattan distance, file difference, rank difference, and whether the two squares share the same color.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "required": [
      "from",
      "to"
     ],
     "properties": {
      "to": {
       "type": "string",
       "description": "Second square such as h8"
      },
      "from": {
       "type": "string",
       "description": "First square such as a1"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "properties": {
      "to": {
       "type": [
        "null",
        "string"
       ]
      },
      "asOf": {
       "type": [
        "null",
        "string"
       ]
      },
      "from": {
       "type": [
        "null",
        "string"
       ]
      },
      "source": {
       "type": [
        "null",
        "string"
       ]
      },
      "reasons": {
       "type": [
        "array",
        "null"
       ],
       "items": {
        "type": "string"
       }
      },
      "summary": {
       "type": [
        "null",
        "string"
       ]
      },
      "verdict": {
       "type": [
        "null",
        "string"
       ]
      },
      "degraded": {
       "type": [
        "boolean",
        "null"
       ]
      },
      "kingMoves": {
       "type": [
        "null",
        "number"
       ]
      },
      "manhattan": {
       "type": [
        "null",
        "number"
       ]
      },
      "rookMoves": {
       "type": [
        "null",
        "number"
       ]
      },
      "disclaimer": {
       "type": [
        "null",
        "string"
       ]
      },
      "notChecked": {
       "type": [
        "array",
        "null"
       ],
       "items": {
        "type": "string"
       }
      },
      "queenMoves": {
       "type": [
        "null",
        "number"
       ]
      },
      "bishopMoves": {
       "type": [
        "null",
        "number"
       ]
      },
      "knightMoves": {
       "type": [
        "null",
        "number"
       ]
      },
      "fileDifference": {
       "type": [
        "null",
… (truncated)
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/chess-square-distance-calculator-09408d80/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from chess-notation.x402tookit.com](https://www.zero.xyz/host/chess-notation.x402tookit.com/llms.txt)
