# Validate ISBN (`validate.isbn`)

Check an ISBN-10 or ISBN-13 check digit and convert between the two forms.

- **Route:** `POST /v1/run/validate.isbn`
- **Price:** $0.0002 per request ($0.20 per 1,000) · `cost_usd` on every response
- **Source:** GetAllAPIs compute (`compute`) · failover: no
- **Measured latency:** p50 1 ms · p95 1 ms · p99 1 ms (1 calls, 30d)
- **Heavy response:** no

## Input

| Field | Type | Required | Default | Notes |
|---|---|---|---|---|
| `isbn` | string | yes |  | ISBN-10 or ISBN-13, hyphens allowed |

## Output (`output` in the run envelope)

| Field | Meaning |
|---|---|
| `valid` | True when the check digit is correct. |
| `type` | ISBN-10 or ISBN-13. |
| `isbn10` | ISBN-10 form when one exists. |
| `isbn13` | ISBN-13 form. |
| `reason` | Why it is valid or not. |

## Example

```bash
curl -s -X POST https://getallapis.com/v1/run/validate.isbn \
  -H "Authorization: Bearer $GETALLAPIS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"isbn":"978-0-441-17271-9"}'
```

```python
from getallapis_client import Client
client = Client()  # reads GETALLAPIS_API_KEY
result = client.run('validate.isbn', {'isbn': '978-0-441-17271-9'})
print(result['cost_usd'], result['output'])
```

```bash
getallapis run validate.isbn '{"isbn":"978-0-441-17271-9"}'
```

Quote first (free, validates input): `POST /v1/quote/validate.isbn` with the same body.
