{"uid":"cap_WH9bMmSWE2IDUpbE_FjGk","slug":"2s-io-gtin-barcode-validator-a4f322b9","name":"2s.io GTIN Barcode Validator","description":"Validate a product barcode — GTIN-8/12/13/14, UPC-A, EAN-13, or ISBN-10/13 — with the GS1 mod-10 check digit (ISBN-10 uses mod-11). Returns {valid, type, gtin14 (canonical 14-digit form, left-padded), checkDigit, reason}. Normalizes every product identifier to one GTIN-14 key so a product-master/ETL pipeline can dedupe and validate SKUs in one deterministic call instead of doing checksum math in an LLM.","url":"https://2s.io/api/validate/gtin","method":"GET","headers":{},"bodySchema":{"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","required":["input"],"properties":{"input":{"type":"object","required":["type","method","queryParams"],"properties":{"type":{"const":"http"},"method":{"const":"GET"},"queryParams":{"required":["gtin"],"properties":{"gtin":{"type":"string","description":"Barcode/identifier (spaces/hyphens allowed). GTIN-8/12/13/14 or ISBN-10/13."}}}}}}},"responseSchema":null,"example":{"request":{"input":{"type":"http","method":"GET","queryParams":{"gtin":"036000291452"}}},"response":{"data":{"ok":true,"items":[{"type":"GTIN-12","input":"036000291452","valid":true,"gtin14":"00036000291452","reason":null,"checkDigit":"2"}],"total":1,"source":{"url":"https://2s.io","license":"No upstream license — computed by 2s.io","provider":"2s.io GTIN validator"}},"meta":{"cost":{"usd":0.001,"tier":0},"caller":"x402","version":null,"endpoint":"validate.gtin","settlement":{"txHash":"0xbb549fe7bccd1a0a603312553d10047bd5c1f028b36b1b2ce7efe4c74f7eda4f","network":"eip155:8453","success":true}}}},"exampleRequest":{"gtin":"036000291452"},"tags":["x402"],"displayCostAmount":"0.001","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"settled","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.001/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.0025","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.0025","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_gS8mtYSFrxbA5uzu6pxqC","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.0025","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Validates product barcodes (GTIN-8/12/13/14, UPC-A, EAN-13, ISBN-10/13) using GS1 mod-10/mod-11 check digit logic and returns the canonical 14-digit GTIN-14 form.","exampleAgentPrompt":"Is the barcode 036000291452 a valid UPC-A, and what's its canonical GTIN-14 form?","exampleUseCases":null,"resultDescription":"Returns a JSON object with: valid (boolean), type (e.g. 'UPC-A', 'EAN-13', 'ISBN-13'), gtin14 (the canonical 14-digit zero-padded form), checkDigit (the expected check digit), and reason (explanation of why the barcode is valid or invalid).","failureModes":["Non-numeric or malformed input returns valid=false with a descriptive reason","Barcode of unrecognized length not matching any GTIN/ISBN format returns valid=false","Correct format but wrong check digit returns valid=false with the expected check digit","Missing required gtin query parameter causes a 400 or error response","Empty string input returns an error or valid=false"],"whenToPreferThis":"Use this endpoint when you need to validate and normalize any GS1 product identifier (UPC, EAN, GTIN, ISBN) to its canonical GTIN-14 form in a deterministic, single call — ideal for ETL pipelines, product master data deduplication, or any workflow where you'd otherwise need to implement GS1 mod-10/mod-11 checksum math yourself. Prefer this over LLM-based validation since it is deterministic and authoritative.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-14T07:21:39.912Z","isFirstParty":false}