GTIN / Barcode API avatar

GTIN / Barcode API

Pricing

from $1.00 / 1,000 api calls

Go to Apify Store
GTIN / Barcode API

GTIN / Barcode API

Validate, generate, and convert EAN, UPC, GTIN and ISBN barcodes via a simple HTTP API.

Pricing

from $1.00 / 1,000 api calls

Rating

0.0

(0)

Developer

Fatih Şahinbaş

Fatih Şahinbaş

Maintained by Community

Actor stats

0

Bookmarked

1

Total users

0

Monthly active users

2 days ago

Last modified

Share

GTIN / Barcode API — Validate, Generate & Convert EAN, UPC and ISBN

A fast HTTP API for barcode validation and check digit calculation. Verify EAN-13, EAN-8, UPC-A, UPC-E, GTIN-14, ISBN-13 and ISBN-10 codes, generate valid barcodes, and convert between formats — all through simple GET requests.

Catch bad product codes before they hit your catalog, your ERP, or your marketplace feed.

What it does

  • Validate any barcode — automatic format detection plus check-digit verification, with clear error messages.
  • 🔢 Calculate check digits — give it a code without the last digit and get the complete, valid barcode back.
  • 🎲 Generate valid barcodes — for testing, seeding databases, or reserving internal codes. Pin a GS1 country/company prefix if you need one.
  • 🔄 Convert between formats — UPC-A ↔ EAN-13, UPC-E ↔ UPC-A, ISBN-10 ↔ ISBN-13, and EAN-13/UPC-A → GTIN-14.

Supported formats

FormatLengthUsed for
EAN-1313Global retail standard
EAN-88Small packaging
UPC-A12North American retail
UPC-E8Zero-suppressed UPC-A
GTIN-1414Cases, cartons, ITF-14
ISBN-1313Books (978/979 prefix)
ISBN-1010Legacy books (mod-11, X check digit)

Who it's for

E-commerce teams validating supplier catalogs, ERP and PIM integrators cleaning product master data, marketplace sellers preparing feeds for Amazon/eBay/Trendyol, and developers building product-entry forms that shouldn't accept broken codes. Also useful for publishers and libraries handling ISBN migrations.

Endpoints

All endpoints are GET and return JSON.

EndpointPurposeKey params
/validateValidate and detect formatcode, format (optional hint)
/checkdigitCompute the missing check digitpartial, format (optional)
/generateCreate a valid barcodeformat, prefix (optional)
/convertConvert between formatscode, to, src (optional hint)

Spaces and hyphens in input are ignored, so 978-0-306-40615-7 works exactly like 9780306406157.

Examples

Validate

GET /validate?code=978-0-306-40615-7
{
"valid": true,
"format": "isbn13",
"normalized": "9780306406157",
"checkDigit": "7",
"errors": []
}

Catch a bad code

GET /validate?code=4006381333930
{
"valid": false,
"format": "ean13",
"normalized": "4006381333930",
"checkDigit": "1",
"errors": ["check digit mismatch (expected 1)"]
}

Check digit

GET /checkdigit?partial=400638133393
{ "format": "ean13", "partial": "400638133393", "checkDigit": "1", "full": "4006381333931" }

Generate with a GS1 prefix

GET /generate?format=ean13&prefix=869
{ "format": "ean13", "code": "8698780044561", "checkDigit": "1" }

Convert ISBN-10 to ISBN-13

GET /convert?code=0306406152&to=isbn13
{ "from": "isbn10", "to": "isbn13", "code": "9780306406157" }

How it works

The API runs in Standby mode — send HTTP requests directly, no run to start. Validation uses the GS1 modulo-10 algorithm for the whole GTIN family and modulo-11 for ISBN-10 (including the X check character). UPC-E conversion implements the standard GS1 zero-suppression rules in both directions, so expand-then-compress round-trips cleanly.

Tips

  • Eight-digit codes are ambiguous between EAN-8 and UPC-E. Pass format=upce (on /validate) or src=upce (on /convert) to disambiguate.
  • Only 978-prefixed ISBN-13 codes can be converted back to ISBN-10; 979 codes have no ISBN-10 equivalent.
  • Only UPC-A codes with number system 0 or 1 can be compressed to UPC-E, and not all of them qualify.
  • Use /generate with a prefix to create realistic test data that still matches your GS1 range.

Pricing

Pay-per-event: $0.001 per successful API call. Readiness/health checks are never charged. No subscription, no minimums.