Barcode validity check

The barcode.check facet validates a barcode and returns forensic GS1 metadata along with a product teaser when the GTIN is found in the nudger.fr index. This facet is free (0 credits) and available both as a public no-auth endpoint (rate-limited per IP) and as an authenticated API-key endpoint.

Public endpoint (no authentication)

Use this endpoint for anonymous checks - no API key required. Requests are rate-limited per IP address.

GET /api/v1/barcodes/check?barcode={barcode}

Parameters

ParameterTypeRequiredDescription
barcodestringYesRaw barcode value (GTIN-8, GTIN-12, GTIN-13, GTIN-14, ISBN-10, ISBN-13, ISSN)

Example request

curl "https://api.product-data-api.com/api/v1/barcodes/check?barcode=3017620422003"

Authenticated endpoint

For higher rate limits and audit-trail tracking, pass your API key.

GET /api/v1/barcodes/{barcode}/check
Authorization: Bearer pdapi_YOUR_KEY_HERE

Example request

curl -H "Authorization: Bearer pdapi_YOUR_KEY_HERE" \
  "https://api.product-data-api.com/api/v1/barcodes/3017620422003/check"

Response schema

Both endpoints return the same JSON structure.

{
  "barcode": "3017620422003",
  "forensics": {
    "valid": true,
    "type": "GTIN_13",
    "gs1Prefix": "301",
    "issuingCountryCode": "FR",
    "issuingCountryName": "France",
    "flagUrl": "https://flagcdn.com/fr.svg",
    "gs1Class": "GTIN",
    "gs1ClassLabel": "Standard trade item",
    "packagingIndicator": null,
    "isbnRegistrationGroup": null,
    "normalizedGtin14": "03017620422003",
    "normalizedGtin13": "3017620422003",
    "checkDigit": 3
  },
  "product": {
    "gtin": "3017620422003",
    "title": "Nutella - Ferrero - 400g",
    "coverImageUrl": "https://www.nudger.fr/api/image/...",
    "offersCount": 14,
    "bestPrice": 3.49,
    "currency": "EUR",
    "productUrl": "https://www.nudger.fr/fr/product/3017620422003"
  }
}

forensics fields

FieldTypeDescription
validbooleanWhether the barcode passes check-digit validation
typestringDetected barcode type (GTIN_8, GTIN_12, GTIN_13, GTIN_14, ISBN_10, ISBN_13, ISSN)
gs1PrefixstringFirst 3 digits of the GS1 prefix
issuingCountryCodestringISO 3166-1 alpha-2 country code of the GS1 issuing organization
issuingCountryNamestringHuman-readable country name
flagUrlstringURL to a country flag SVG (flagcdn.com)
gs1ClassstringGS1 barcode class (GTIN, ISBN_BOOKLAND, ISMN_MUSIC, ISSN_PERIODICAL, RESTRICTED_INTERNAL, COUPON, UNKNOWN)
gs1ClassLabelstringHuman-readable label for the GS1 class
packagingIndicatorintegerFor GTIN-14 only: packaging level indicator (first digit, 1-8)
isbnRegistrationGroupstringFor ISBN-13 only: registration group element (4th digit after 978/979 prefix)
normalizedGtin14stringBarcode left-padded to 14 digits
normalizedGtin13stringBarcode normalized to 13 digits (EAN-13 canonical form, null for GTIN-14 with packaging indicator ≠ 0)
checkDigitintegerThe check digit (last digit)

product field

The product field is null when the GTIN is not found in the nudger.fr index. When present:

FieldTypeDescription
gtinstringCanonical GTIN
titlestringProduct display name
coverImageUrlstringCover image URL (may be null)
offersCountintegerNumber of live price offers
bestPricenumberBest available price in currency
currencystringISO 4217 currency code
productUrlstringDirect link to the product page on nudger.fr

Billing

  • Credits consumed: 0 (always free)
  • Billable: never
  • Rate limiting: IP-based for the public endpoint; key-based for the authenticated endpoint

GS1 class reference

ClassDescriptionExample prefix range
ISBN_BOOKLANDBooks (978-979)978, 979
ISMN_MUSICSheet music (979-0)979 + 4th digit 0
ISSN_PERIODICALPeriodicals / magazines977
RESTRICTED_INTERNALIn-store / internal use only20-29, 40-49, 200-299
COUPONCoupons and vouchers980-999
GTINStandard trade itemAll other prefixes

Quickstarts