ISBN Validator API: The Complete Guide

Need to validate ISBN numbers in your application? This guide covers everything you need to know about ISBN validation via API, including ISBN-10 and ISBN-13 formats, checksum algorithms, and implementation examples in multiple languages.

What is an ISBN?

An ISBN (International Standard Book Number) is a unique numeric commercial book identifier assigned to each edition and variation of a publication. ISBNs are used by publishers, booksellers, libraries, and internet retailers for ordering, listing, and stock control.

A typical ISBN-13 looks like this: 978-3-16-148410-0

ISBN Formats Explained

There are two ISBN formats in use:

ISBN-10 (Legacy Format)

The original 10-digit format used before 2007. Contains a check digit calculated using modulo 11 arithmetic. The check digit can be 0-9 or X (representing 10).

ISBN-13 (Current Standard)

The current 13-digit format introduced in 2007. Based on EAN-13 barcode standard. Always starts with 978 or 979. Uses modulo 10 checksum like EAN codes.

Note: ISBN-10 numbers can be converted to ISBN-13 by adding the 978 prefix and recalculating the check digit.

Using the ISBN Validator API

TinyFn provides a simple endpoint to validate ISBNs:

API Request
GET https://api.tinyfn.io/v1/validate/isbn?isbn=978-3-16-148410-0
Headers: X-API-Key: your-api-key
Response
{
  "valid": true,
  "isbn": "9783161484100",
  "isbn_formatted": "978-3-16-148410-0",
  "format": "ISBN-13",
  "check_digit": "0",
  "isbn10_equivalent": "3-16-148410-X"
}

Parameters

Parameter Type Description
isbn string ISBN to validate (required)

Code Examples

JavaScript / Node.js

const response = await fetch(
  'https://api.tinyfn.io/v1/validate/isbn?isbn=978-3-16-148410-0',
  { headers: { 'X-API-Key': 'your-api-key' } }
);
const result = await response.json();
console.log(result.valid); // true
console.log(result.format); // "ISBN-13"

Python

import requests

response = requests.get(
    'https://api.tinyfn.io/v1/validate/isbn',
    params={'isbn': '978-3-16-148410-0'},
    headers={'X-API-Key': 'your-api-key'}
)
result = response.json()
print(result['valid'])  # True
print(result['format'])  # "ISBN-13"

cURL

curl "https://api.tinyfn.io/v1/validate/isbn?isbn=978-3-16-148410-0" \
  -H "X-API-Key: your-api-key"

Common Use Cases

  • Bookstores: Validate ISBNs during inventory management
  • Libraries: Verify book identification numbers
  • Publishing: Validate ISBNs before print production
  • E-commerce: Ensure accurate product listings
  • Book APIs: Validate user input before database lookups

Best Practices

  1. Accept both formats: Support both ISBN-10 and ISBN-13 input
  2. Normalize input: Remove hyphens and spaces before validation
  3. Store consistently: Store ISBNs in ISBN-13 format for consistency
  4. Display formatted: Show ISBNs with hyphens for readability

Use via MCP

Your AI agent can call this tool directly via Model Context Protocol — no HTTP code needed. Add TinyFn to Claude Desktop, Cursor, or any MCP client:

{
  "mcpServers": {
    "tinyfn-validate": {
      "url": "https://api.tinyfn.io/mcp/validate/",
      "headers": {
        "X-API-Key": "your-api-key"
      }
    }
  }
}

See all validation tools available via MCP in our Validation MCP Tools for AI Agents guide.

Try the ISBN Validator API

Get your free API key and start validating ISBNs in seconds.

Get Free API Key

Ready to try TinyFn?

Get your free API key and start building in minutes.

Get Free API Key