Developer API Documentation

Programmatic endpoints and URL parameters for ISBN barcode generation, validation, and official International ISBN Agency prefix range datasets.

100% Free & Open Access
No API Key RequiredCORS EnabledCDN Cached

URL-Based Generation

Generate and download high-precision ISBN barcodes directly through simple URL query parameters. No SDK or complex rendering libraries are needed—ideal for automated publishing pipelines, batch book exports, inventory management systems, and direct website buttons.

Query Parameters
generate
string (required)
The 10 or 13-digit ISBN (with or without hyphens). Automatically validated and formatted using official prefix hyphenation rules.
download
flag (optional)
When present, immediately triggers a browser download of the generated barcode as a high-resolution PNG image file.

View Barcode in Generator

Test Live URL

Instantly loads the interactive generator with the prefilled ISBN, calculates accurate hyphenation, and displays the barcode ready for vector or raster export.

https://isbnbarcode.org/?generate=9781612681122

Direct PNG Barcode Download

Test Download

Generates the barcode and automatically initiates a browser download of the formatted barcode as a clean PNG image file.

https://isbnbarcode.org/?generate=9781612681122&download

Example: HTML Download Button

<!-- Direct one-click ISBN barcode download -->
<a 
  href="https://isbnbarcode.org/?generate=9781612681122&download" 
  class="button"
  download
>
  Download ISBN Barcode (PNG)
</a>

ISBN Ranges API

We provide free, unrestricted access to the complete ISBN prefix ranges database sourced directly from the official International ISBN Agency. This dataset is required to validate ISBN-13 checksums and divide ISBN numbers into their five international components:Prefix Element (978/979),Registration Group,Registrant Publisher,Publication Element, andCheck Digit.

Standard Dataset~244 KB

isbn-ranges.json

Complete, descriptive JSON representation of official ISBN International Agency XML registry. Contains verbose key names and metadata structures.

https://isbnbarcode.org/api/isbn-ranges.json
Best for: Backends & full pipelinesOpen JSON
77% Smaller
Optimized Dataset~55 KB

isbn-ranges-compact.json

High-performance, minified schema built for modern web applications, mobile devices, and serverless edge functions with instant load times.

https://isbnbarcode.org/api/isbn-ranges-compact.json
Best for: Browser, React, Vue & EdgeOpen Compact JSON
FeatureStandard (/api/isbn-ranges.json)Optimized Compact (/api/isbn-ranges-compact.json)
File Size~244 KB~55 KB (77% reduction)
Data FormatFull verbose objectsMinified rule tuples [start, end, len]
Memory FootprintStandard JSON heap sizeUltra-low heap footprint
Ideal EnvironmentNode.js server, data pipelines, batch scriptsClient-side web apps, mobile apps, Cloudflare Workers, Edge lambdas
Data Source & CurrencyInternational ISBN Agency (yearly)International ISBN Agency (yearly)
API Key RequiredNone (Free)None (Free)

Understanding the Compact JSON Schema

The optimized compact format maps international ranges into an ultra-concise structure:

p: Prefix & Group

e.g. "978-0" or "979-8"

a: Agency / Country

e.g. "English language" or "United States"

r: Rule Tuples

[startRange, endRange, publisherLength]

[
  {
    "p": "978-0",
    "a": "English language",
    "r": [
      ["0000000", "1999999", 2],
      ["2000000", "2279999", 3],
      ["2280000", "2289999", 4],
      ["9500000", "9999999", 7]
    ]
  }
]

Code Examples

1. Fetching Standard Ranges (JavaScript)

// Fetch complete ISBN ranges dataset (~244 KB)
fetch('https://isbnbarcode.org/api/isbn-ranges.json')
  .then(response => response.json())
  .then(data => {
    // Process full ISBN ranges data
    console.log('Loaded ranges:', data);
  })
  .catch(error => console.error('Error fetching ISBN ranges:', error));

2. Fetching & Querying Compact Ranges (JavaScript / TypeScript)

// Fetch lightweight compact dataset (~55 KB) for client apps & edge workers
async function getISBNPrefixGroup(isbn13) {
  const cleanIsbn = isbn13.replace(/[^0-9]/g, '');
  const res = await fetch('https://isbnbarcode.org/api/isbn-ranges-compact.json');
  const ranges = await res.json();

  for (const group of ranges) {
    const rawPrefix = group.p.replace('-', '');
    if (cleanIsbn.startsWith(rawPrefix)) {
      return {
        prefixKey: group.p,
        agencyName: group.a,
        rules: group.r // [start, end, length]
      };
    }
  }
  return null;
}

3. cURL CLI Request

# Download optimized compact ranges dataset directly
curl -s -O https://isbnbarcode.org/api/isbn-ranges-compact.json

Terms of Use & Attribution

Our API and datasets are designed to empower publishers, indie authors, and software engineers with open access to publishing standards:

100% Free for both personal and commercial applications
No API key, registration, or rate limit headers required
Data updated annually in sync with International ISBN Agency releases
Attribution requested: link back to isbnbarcode.org

Additional Developer & Publishing Resources