Developer API Documentation
Programmatic endpoints and URL parameters for ISBN barcode generation, validation, and official International ISBN Agency prefix range datasets.
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.
View Barcode in Generator
Test Live URLInstantly loads the interactive generator with the prefilled ISBN, calculates accurate hyphenation, and displays the barcode ready for vector or raster export.
Direct PNG Barcode Download
Test DownloadGenerates the barcode and automatically initiates a browser download of the formatted barcode as a clean PNG image file.
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.
isbn-ranges.json
Complete, descriptive JSON representation of official ISBN International Agency XML registry. Contains verbose key names and metadata structures.
isbn-ranges-compact.json
High-performance, minified schema built for modern web applications, mobile devices, and serverless edge functions with instant load times.
| Feature | Standard (/api/isbn-ranges.json) | Optimized Compact (/api/isbn-ranges-compact.json) |
|---|---|---|
| File Size | ~244 KB | ~55 KB (77% reduction) |
| Data Format | Full verbose objects | Minified rule tuples [start, end, len] |
| Memory Footprint | Standard JSON heap size | Ultra-low heap footprint |
| Ideal Environment | Node.js server, data pipelines, batch scripts | Client-side web apps, mobile apps, Cloudflare Workers, Edge lambdas |
| Data Source & Currency | International ISBN Agency (yearly) | International ISBN Agency (yearly) |
| API Key Required | None (Free) | None (Free) |
Understanding the Compact JSON Schema
The optimized compact format maps international ranges into an ultra-concise structure:
e.g. "978-0" or "979-8"
e.g. "English language" or "United States"
[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.jsonTerms of Use & Attribution
Our API and datasets are designed to empower publishers, indie authors, and software engineers with open access to publishing standards:
isbnbarcode.orgAdditional Developer & Publishing Resources
Embed Guide
Embed the responsive ISBN barcode generator widget into any web page.
Publishers Registry Search
Look up verified book publisher records in the Global Register of Publishers.
Price Barcode Generator
Create 5-digit EAN-5 supplemental price extension barcodes for USD, CAD, GBP, EUR.
ISBN Ranges API Tutorial
Detailed Node.js and TypeScript implementation guide for hyphenating ISBNs.
URL Generation Guide
Read the original release announcement for automated URL-based barcode workflows.
Official ISBN Agencies
Directory of national and regional agencies authorized to issue ISBN identifiers.