South Star

GS1 GTIN Parser Check Digit Toolkit API

Free tier included · Commerce
Compute GTIN check digits and parse GS1-128, DataMatrix & QR AI strings into JSON.

GS1/GTIN Toolkit covers and more. It computes or validates GTIN-8/12/13/14 check digits (GS1 mod-10), and parses GS1 element strings across every GS1 Application Identifier: HRI `(01)...(10)...` syntax or raw FNC1/GS separators, including full GS1-128, DataMatrix and QR payloads. New endpoints add batch GTIN validation (up to 100 items), raw DataMatrix auto-parsing (with ASCII GS 0x1D or FNC1), and a flattened `/parse/full` that returns dedicated top-level fields for GTIN, serial, lot, expiry, weight, price and SSCC.

Use it when you need one hosted endpoint instead of installing and pinning a GS1 library: e-commerce catalogue ingestion, label-printing pipelines, inventory/ETL systems, and no-code/low-code integrations that must turn barcodes into structured data. Validation is regex plus arithmetic over embedded constants — fast and deterministic — and the service is stateless with no databases and no request logs.

Honest limits: this is offline numbering only. A valid check digit does not confirm a barcode exists in any registry. Input caps are enforced per endpoint: `gtin`/`gtin12` max 20 chars, `ai_string` max 512 chars (configurable via `GS1_MAX_LEN`), up to 64 AIs (configurable via `GS1_MAX_AIS`), and `/batch/validate` is capped at 100 items. Raw DataMatrix parsing accepts the GS (0x1D) or bracketed AI syntax. Dates follow DD=00 = last day of month, and implied-decimal AIs (e.g. 310x weight) are decoded per the GS1 Barcode Syntax Dictionary.

Endpoints

MethodPathWhat it does
GET/API metadata: name, version, and paths to the interactive docs and health endpoint.
GET/healthLiveness probe; returns status "ok" while the process is up.
GET/check-digitCompute or append the GS1 mod-10 check digit for a GTIN-8/12/13/14, with or without a trailing check digit. gtin12 is a required query parameter (max 20 chars).
GET/validateValidate a complete GTIN-8/12/13/14 including its check digit. gtin is a required query parameter (max 20 chars).
GET/parseParse a GS1-128 AI string (HRI brackets or raw FNC1/GS separators) into structured application-identifier fields. ai_string is required (max 512 chars).
GET/parse/fullFlattened GS1 barcode parser: parses any GS1 element string (DataMatrix, QR, GS1-128) and returns a clean, flat JSON object with dedicated top-level fields for GTIN, serial, lot, expiry date, weight, price, and SSCC, plus full item details. ai_string is required.
GET/datamatrix/parseRaw DataMatrix & GS separator auto-parser: accepts a raw DataMatrix scan string (including ASCII Group Separator 0x1D or explicit FNC1) and automatically extracts all standard fields into a structured JSON response. raw_barcode is required.
GET/batch/validateBatch GTIN check-digit validation: validates multiple GTINs in a single request (capped at 100 items). Returns an array of validation results with check-digit correctness. gtins is a required comma-separated query parameter (max 100 items).

Quick start

curl -X GET "https://gs1.p.rapidapi.com/check-digit?gtin12=03600029145" \
  -H "X-RapidAPI-Key: YOUR_RAPIDAPI_KEY" \
  -H "X-RapidAPI-Host: gs1.p.rapidapi.com"

FAQ

Does a valid check digit mean the product is registered in a GS1 registry?

No. This API performs offline numbering only — it computes/validates the GS1 mod-10 check digit and parses AI syntax. It does not confirm a barcode exists in any GS1 registry.

Does the API make any external network calls?

No. All check-digit math and AI parsing use embedded constants (biip, generated from the GS1 Barcode Syntax Dictionary). There are no databases and no request logs.

Can I send a GTIN without a check digit to /check-digit?

Yes. `/check-digit` accepts a GTIN-8/12/13/14 with or without a trailing check digit and returns the computed check digit plus the full normalized GTIN.

How many GTINs can I validate in one /batch/validate call?

Up to 100 items per request as a comma-separated `gtins` query parameter. Each GTIN is capped at 20 characters.

Try GS1 GTIN Parser Check Digit Toolkit free

Free tier on every plan. Get an API key and start calling in under a minute.

Open on RapidAPI

Related APIs