# GTIN, EAN, UPC & ISBN Validator & Fixer — Bulk Barcode Checker (`nezucloud/gtin-ean-upc-isbn-validator-fixer`) Actor

Fix barcodes Excel broke. Bulk-validate GTIN, EAN, UPC & ISBN, repair lost zeros and check digits, convert formats, get a clean CSV. $1 per 1,000 codes. Instant, no scraping.

- **URL**: https://apify.com/nezucloud/gtin-ean-upc-isbn-validator-fixer.md
- **Developed by:** [NEZU SAS](https://apify.com/nezucloud) (community)
- **Categories:** Developer tools, E-commerce, Integrations
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.00 / 1,000 code checkeds

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## GTIN, EAN, UPC & ISBN Validator & Fixer — Bulk Barcode Checker

**Excel just wrecked your barcodes? Fix them in seconds.** Paste a list (or point to a CSV) and get, for every code: **is it valid, why not, and the most likely fix** — plus a clean file ready to import. No scraping, no proxies, no personal data: pure, instant validation.

![Validator results: status, type, suggested fix and GS1 region for each code](https://api.apify.com/v2/key-value-stores/E38MAT6DtK9ddzgPL/records/validator-results.png)

| Before (what Excel gave you) | After (what you get) |
|---|---|
| `4.006381333931E+12` | `4006381333931` ✅ valid EAN-13 · Germany prefix |
| `36000291452` (lost leading zero) | `036000291452` ✅ fixed, UPC-A · high confidence |
| `4006381333392` (typo) | ⚠️ needs review · expected check digit `1` · candidate fixes listed |
| `4.00638E+12` (rounded by Excel) | ❌ clearly flagged: the digits are gone, export the column as text |
| `04252614` (UPC-E) | ✅ valid · expanded to UPC-A `042100005264` |

### Why you'll like it

- ⏱️ **Fast:** 1,000,000 codes in about 40 seconds in our tests. A typical list finishes in 2–3 seconds.
- 🎯 **Honest fixes:** it tells you *how sure it is*. A lost zero is "high", one clear swapped-digit is "medium", several possibilities or a check-digit-only change is "low" — it never guesses blindly.
- 🧹 **Repairs Excel damage:** scientific notation (`1.23E+12`) is recovered when the digits survived, and clearly reported when they didn't.
- 🔁 **Converts formats for you:** UPC-A ⇄ EAN-13 ⇄ GTIN-14 ⇄ GTIN-8, UPC-E → UPC-A, ISBN-10 ⇄ ISBN-13.
- 🌍 **Knows where a prefix was issued:** GS1 prefix region for every valid code (and flags prefixes reserved for in-store use or coupons).
- 🧾 **Ready to import:** a `corrected_codes.csv` with the final code for each row.
- 🔒 **Private by design:** your codes are processed inside the run. The only network access is downloading your CSV if you give a `fileUrl`.

### What it does for each code

1. **Cleans** spaces, hyphens, quotes, trailing `.0` and spreadsheet scientific notation.
2. **Detects the type:** GTIN-8, UPC-A, UPC-E, EAN-13, GTIN-14, ISBN-10, ISBN-13, ISSN.
3. **Checks the check digit** and tells you the one it should have.
4. **Suggests the fix** with an honest confidence level (lost leading zero, swapped adjacent digits, check digit).
5. **Converts** to the other formats and gives a normalized GTIN-14.
6. **Shows the GS1 prefix region** (where the code was issued — not where the product is made).
7. **Finds duplicates** in your list.

### Real-world numbers

We ran **500 real barcodes from a public product database** (Open Food Facts) through the validator:

- the **100 most scanned products**: 99% valid
- **200 products from Ecuador**: 97.5% valid
- **200 recently added products**: 91.5% valid — **about 1 in 12 had an error**

Most invalid codes had several possible fixes, so the Actor lists the candidates instead of choosing one for you.

### Perfect for

- 🛒 Cleaning supplier price lists before importing them into your store, ERP or marketplace feed
- 📚 Checking ISBN and ISSN lists (and converting ISBN-10 to ISBN-13)
- 📦 Auditing inventory and catalog exports
- 🔗 Adding a barcode check to any automation (Make, Zapier, n8n, Google Sheets, your own code)

### Input

| Field | What it is |
|---|---|
| `codes` | List of codes, exactly as they come from your sheet. |
| `fileUrl` | Optional public https URL of a CSV. The code column is detected automatically (barcode, gtin, ean, upc, isbn…). |
| `column` | Optional exact header of the code column. |
| `includeSuggestions` | Add the list of suggested fixes (default on). |
| `onlyProblems` | Return only invalid, empty and duplicated codes. |
| `maxCodes` | Safety limit (default 100,000, up to 1,000,000). |

Example:

```json
{ "codes": ["4006381333931", "36000291452", "4006381333392", "4.00638E+12", "04252614"] }
```

### Output

![Summary of a run and the corrected_codes.csv file](https://api.apify.com/v2/key-value-stores/E38MAT6DtK9ddzgPL/records/validator-csv.png)

One dataset row per code, plus two records in the key-value store: `SUMMARY` (counts of valid, fixable, invalid, empty, duplicated and Excel-damaged codes) and `corrected_codes.csv`.

A row looks like this:

```json
{
  "row": 2,
  "input": "36000291452",
  "status": "corrected",
  "valid": false,
  "type": "unknown",
  "issues": ["invalid_length"],
  "bestFix": "036000291452",
  "suggestions": [
    { "fix": "036000291452", "kind": "lost_leading_zero", "confidence": "high",
      "note": "Added 1 leading zero(s) (spreadsheets often drop them)." }
  ]
}
```

Main fields: `status` (`valid`, `corrected`, `needs_review`, `invalid`, `empty`), `type`, `normalizedGtin14`, `ean13`, `upca`, `isbn13`, `isbn10`, `expectedCheckDigit`, `issues`, `bestFix` (only when the confidence is high or medium), `suggestions`, `gs1Prefix`, `gs1Region`, `validForGtinFeeds`, `notes`.

### Use it from code

```python
from apify_client import ApifyClient

client = ApifyClient("<YOUR_APIFY_TOKEN>")
run = client.actor("nezucloud/gtin-ean-upc-isbn-validator-fixer").call(
    run_input={"codes": ["4006381333931", "36000291452"]}
)
for row in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(row["input"], row["status"], row["bestFix"])
```

Every field is documented in the Actor's output schema, so AI agents (through the Apify API or MCP server) can use the results without guessing.

### Pricing

**Pay per event: $1.00 per 1,000 codes checked** ($0.001 per code), plus a tiny start fee of $0.00005 per run (Apify covers the compute of the first 5 seconds).

- Empty rows are free. Failed runs are free.
- 10,000 codes = $10. 100 codes = $0.10.
- You can set a maximum cost per run; the Actor stops cleanly when it is reached and marks the result as `partial`.

### FAQ

**How do I validate EAN-13 codes in bulk?** Paste the list in `codes` or give a CSV in `fileUrl`; every row comes back with `valid` and the expected check digit.

**Excel changed my barcodes to 1.23E+12. Can you recover them?** If Excel kept all the digits (for example `4.006381333931E+12`), yes. If it rounded them (`4.00638E+12`), the digits are gone: export the column as text and run again.

**My UPC lost its leading zero.** The Actor tries the shortest valid length and suggests the code with the zeros restored.

**What is the "prefix region"?** The GS1 member organisation that issued the prefix. It does not mean the product is made there.

**Does it check that the product exists?** No. It checks format and check digit only. It cannot tell whether a code has been assigned to a product.

**Is my data stored or sent anywhere?** Codes are processed inside the run. The only network access is downloading your CSV when you set `fileUrl`.

**What if the run has many codes?** It processes in batches, so a million codes fits comfortably.

### Limits

Format and check-digit validation only. Not affiliated with GS1; "GS1" is a trademark of GS1 AISBL. Prefix regions are informational.

### Support

Found a bug or need another format? Open an issue on the Actor page: reports are answered quickly.

***

Data attribution for the figures above: contains information from Open Food Facts (https://world.openfoodfacts.org), made available under the Open Database Licence (ODbL).

# Actor input Schema

## `codes` (type: `array`):

GTIN-8/12/13/14, UPC-A, UPC-E, EAN-13, ISBN-10/13 or ISSN. Paste them as they come from your spreadsheet, even with spaces, hyphens or scientific notation (1.23457E+12).

## `fileUrl` (type: `string`):

Public https URL of a CSV file. The column with the codes is detected automatically (names like barcode, gtin, ean, upc, isbn) or you can set it below.

## `column` (type: `string`):

Exact header of the column that holds the codes. Leave empty to auto-detect.

## `includeSuggestions` (type: `boolean`):

For invalid codes, add the list of suggested corrections with their confidence.

## `onlyProblems` (type: `boolean`):

Skip codes that are valid and unique; return invalid, empty and duplicated ones. The summary still counts everything.

## `maxCodes` (type: `integer`):

Safety limit on how many codes are processed in one run.

## Actor input object example

```json
{
  "codes": [
    "4006381333931",
    "036000291452",
    "36000291452",
    "4006381333391",
    "4.00638E+12",
    "9780306406157",
    "0306406153",
    "04252614",
    " 5901234123457 "
  ],
  "includeSuggestions": true,
  "onlyProblems": false,
  "maxCodes": 100000
}
```

# Actor output Schema

## `results` (type: `string`):

One row per code: status, type, suggested fix, converted formats, GS1 prefix region and issues.

## `summary` (type: `string`):

Counts of valid, fixable, invalid, empty and duplicated codes.

## `correctedCodesCsv` (type: `string`):

CSV with row, input, status and final code, ready to import.

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "codes": [
        "4006381333931",
        "036000291452",
        "36000291452",
        "4006381333391",
        "4.00638E+12",
        "9780306406157",
        "0306406153",
        "04252614",
        " 5901234123457 "
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("nezucloud/gtin-ean-upc-isbn-validator-fixer").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = { "codes": [
        "4006381333931",
        "036000291452",
        "36000291452",
        "4006381333391",
        "4.00638E+12",
        "9780306406157",
        "0306406153",
        "04252614",
        " 5901234123457 ",
    ] }

# Run the Actor and wait for it to finish
run = client.actor("nezucloud/gtin-ean-upc-isbn-validator-fixer").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "codes": [
    "4006381333931",
    "036000291452",
    "36000291452",
    "4006381333391",
    "4.00638E+12",
    "9780306406157",
    "0306406153",
    "04252614",
    " 5901234123457 "
  ]
}' |
apify call nezucloud/gtin-ean-upc-isbn-validator-fixer --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,nezucloud/gtin-ean-upc-isbn-validator-fixer"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/S04OPzDBAhx57VpC2/builds/c1bS3mkeP4ydnbxuO/openapi.json
