# Product Feed & GTIN Validator (`min.h/product-feed-gtin-validator`) Actor

Validate CSV/TSV product feeds: GTIN check digits, duplicate IDs, required fields, prices, currencies and availability. Structured JSON/CSV issues. No GS1 allocation lookup or crawling.

- **URL**: https://apify.com/min.h/product-feed-gtin-validator.md
- **Developed by:** [Min. H](https://apify.com/min.h) (community)
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 35.7% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$0.50 / 1,000 product row validateds

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

## Product Feed & GTIN Validator

**Validate product feeds, detect GTIN errors, and identify data quality issues before importing or submitting your product catalog.**

Product Feed & GTIN Validator helps online sellers, e-commerce teams, and developers check CSV or TSV product data for common formatting and identifier problems.

Quickly identify invalid barcodes, duplicate product IDs, missing required fields, price formatting errors, and inconsistent product identifiers.

**Pricing: $0.0005 per completed product record ($0.50 per 1,000 records).**

### Key Features

#### GTIN Barcode Validation

Validate the format and check digit of:

- GTIN-8
- GTIN-12 (UPC-A)
- GTIN-13 (EAN-13)
- GTIN-14

The Actor uses the GS1 modulo-10 check digit algorithm.

It also:

- Preserves leading zeros in GTIN values.
- Identifies invalid lengths and nonnumeric characters.
- Reports the expected check digit when applicable.
- Provides clear validation results for each product.

**Important:** A valid GTIN check digit does not prove that the number was officially issued by GS1 or assigned to the correct product.

#### Product Feed Quality Checks

Identify common product data issues:

- Duplicate product IDs
- Missing required fields
- Invalid price formats
- Missing or unsupported currency codes
- Invalid availability values
- Missing or inconsistent product identifiers
- Potential contradictions involving GTIN, brand, MPN, and `identifier_exists`

Required columns are `id`, `price`, and `availability`.

Optional columns include `gtin`, `currency`, `brand`, `mpn`, and `identifier_exists`.

Availability values supported:

- `in_stock`
- `out_of_stock`
- `preorder`
- `backorder`

#### Structured Validation Results

Each inspected product receives a status:

| Status | Meaning |
|---|---|
| OK | No issues detected by the supported checks |
| ERROR | One or more validation errors detected |
| WARNING | Potential issues requiring review |

Each issue includes the affected field, issue code, severity, and corrective guidance.

The Actor also generates a summary showing:

- Total product records
- Inspected records
- Records without detected issues
- Records with errors
- Records with warnings
- Successfully saved and confirmed charged records

### How to Use

1. Prepare your product data in CSV or TSV format.
2. Open the Actor's Input tab.
3. Paste the data into the `feedText` field.
4. Select CSV or TSV as the input format.
5. Set the maximum number of records to inspect.
6. Run the Actor.
7. Review the validation results and export JSON or CSV.

#### Example Input

```json
{
  "feedText": "id,gtin,price,availability,brand,mpn,identifier_exists\ndemo-ok,036000291452,19.99 USD,in_stock,Synthetic Brand,,yes\n",
  "format": "CSV",
  "maxRows": 1000
}
```

**Keep GTIN values as text.** Converting them to numbers may remove leading zeros.

#### Input Limits

| Setting | Limit |
|---|---|
| Feed format | CSV / TSV |
| Maximum feed text | 2 MiB |
| Maximum input records | 10,000 |
| Maximum inspected records | 10,000 |
| Default inspected records | 1,000 |
| Maximum columns | 32 |
| Maximum cell length | 4,096 characters |

Quoted fields and multiline CSV records are supported.

### Output

The Actor saves one structured Dataset row for each successfully stored inspected product.

Results are available through:

- **Apify Dataset:** Individual validation results
- **JSON:** Structured product validation output
- **CSV:** Flattened validation results
- **SUMMARY:** Inspection statistics and processing status

#### Result Fields

| Field | Description |
|---|---|
| `recordIndex` | Product record number |
| `rowNumber` | Original feed line number |
| `productId` | Product identifier |
| `gtin` | Supplied GTIN |
| `gtinStatus` | GTIN validation result |
| `expectedCheckDigit` | Expected check digit, when applicable |
| `allocationVerified` | Always false; GS1 issuance is not checked |
| `resultStatus` | OK, ERROR, or WARNING |
| `issueCodes` | Detected issue codes |
| `issues` | Detailed validation findings |
| `checkedAt` | Validation timestamp |

The Actor also provides processing summaries and export status information.

For CSV safety, certain formula-like values are escaped. When importing results into spreadsheets, configure GTIN columns as text to preserve leading zeros.

### Pricing

**$0.0005 per completed and saved product record.**

Examples:

| Completed records | Event charges |
|---|---|
| 100 | $0.05 |
| 500 | $0.25 |
| 1,000 | $0.50 |
| 5,000 | $2.50 |

Records containing detected errors or warnings are billable because the validation was completed.

Invalid input that prevents processing and records that are not inspected or saved are not charged.

The Actor uses a single Pay-per-event charge named `product-row-validated`.

Automatic start and Dataset charging events are disabled. Customers do not pay additional platform usage costs under the current pricing configuration.

A separate Actor run is a new inspection and may generate new charges. Processing may stop when the available event budget is exhausted.

### Privacy and Data Handling

The Actor processes product data supplied by the customer.

- No website crawling
- No external product data APIs
- No AI processing
- No Google Merchant account access
- No automatic modification of customer product data

Results are stored in the customer's Apify run storage.

The Actor does not transmit product data to GS1, Google, or external product information services.

Only submit data you are authorized to process. Avoid including personal information, passwords, API keys, or confidential notes.

### Important Limitations

This Actor performs a defined set of product data quality checks. It is **not a complete Google Merchant Center compliance validator**.

It does not:

- Verify whether GTINs are officially registered or assigned to a specific product.
- Check product images, descriptions, landing pages, or shipping policies.
- Validate live inventory or stock quantities.
- Verify tax or advertising policy compliance.
- Guarantee product approval by Google Merchant Center or other marketplaces.
- Automatically correct or resubmit product feeds.

Duplicate IDs are reported as errors, but separate input records are inspected and charged individually when completed.

Product feed requirements may change. Validation findings should be reviewed against the current requirements of the destination platform.

### Who Is This For?

**E-commerce sellers:** Check product feed quality before importing catalogs.

**Marketplace operators:** Identify common formatting and identifier problems.

**Product data teams:** Validate large sets of product records in a consistent format.

**Developers:** Integrate structured validation results into data processing workflows.

**Agencies:** Perform repeatable product feed quality checks for authorized customer catalogs.

***

**Improve product data quality with fast, structured, and affordable validation.**

Check your product feed before submitting it.

### Built-in example and automated checks

Apify runs marked `TEST` validate the bundled four-record feed. Results are labeled `SYNTHETIC_FIXTURE`. This test reads no Run INPUT and submits zero charge events. Regular runs use the normal pricing and private-storage checks.

# Actor input Schema

## `feedText` (type: `string`):

Paste customer-provided UTF-8 feed text (maximum 2 MiB). Required headers: id, price, availability. Synthetic example only; no download URLs. Do not include personal data or credentials.

## `format` (type: `string`):

Choose CSV (comma) or TSV (tab). Quoted multiline fields are supported.

## `maxRows` (type: `integer`):

Inspect at most this many product records; remaining records are not saved or charged. Entire input is capped at 10000 records.

## Actor input object example

```json
{
  "feedText": "id,gtin,price,availability,brand,mpn,identifier_exists\ndemo-ok,036000291452,19.99 USD,in_stock,Synthetic Brand,,yes\ndemo-duplicate,6291041500214,-5 USD,in_stock,Synthetic Brand,,yes\ndemo-warning,,0 USD,preorder,,,no\ndemo-duplicate,96385074,3 USD,out_of_stock,Synthetic Brand,,yes\n",
  "format": "CSV",
  "maxRows": 1000
}
```

# Actor output Schema

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

No description

## `csv` (type: `string`):

No description

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

No description

## `dataset` (type: `string`):

No description

# 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 = {
    "feedText": `id,gtin,price,availability,brand,mpn,identifier_exists
demo-ok,036000291452,19.99 USD,in_stock,Synthetic Brand,,yes
demo-duplicate,6291041500214,-5 USD,in_stock,Synthetic Brand,,yes
demo-warning,,0 USD,preorder,,,no
demo-duplicate,96385074,3 USD,out_of_stock,Synthetic Brand,,yes`,
    "format": "CSV",
    "maxRows": 1000
};

// Run the Actor and wait for it to finish
const run = await client.actor("min.h/product-feed-gtin-validator").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 = {
    "feedText": """id,gtin,price,availability,brand,mpn,identifier_exists
demo-ok,036000291452,19.99 USD,in_stock,Synthetic Brand,,yes
demo-duplicate,6291041500214,-5 USD,in_stock,Synthetic Brand,,yes
demo-warning,,0 USD,preorder,,,no
demo-duplicate,96385074,3 USD,out_of_stock,Synthetic Brand,,yes
""",
    "format": "CSV",
    "maxRows": 1000,
}

# Run the Actor and wait for it to finish
run = client.actor("min.h/product-feed-gtin-validator").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 '{
  "feedText": "id,gtin,price,availability,brand,mpn,identifier_exists\\ndemo-ok,036000291452,19.99 USD,in_stock,Synthetic Brand,,yes\\ndemo-duplicate,6291041500214,-5 USD,in_stock,Synthetic Brand,,yes\\ndemo-warning,,0 USD,preorder,,,no\\ndemo-duplicate,96385074,3 USD,out_of_stock,Synthetic Brand,,yes\\n",
  "format": "CSV",
  "maxRows": 1000
}' |
apify call min.h/product-feed-gtin-validator --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,min.h/product-feed-gtin-validator"
        }
    }
}
```

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/E5JQFEh0K8v1DfpaO/builds/z5MbKxxquWTUMKtES/openapi.json
