# Product Feed Auditor - XML, CSV & GTIN Checks (`surefeed/product-feed-auditor`) Actor

Audit product catalogs for duplicate IDs, missing fields, malformed prices, inconsistent sale currencies and invalid GTIN check digits. Clear issue codes and recommendations in English or Italian. XML, CSV, TSV and JSON. Selected feed checks, not Merchant Center approval.

- **URL**: https://apify.com/surefeed/product-feed-auditor.md
- **Developed by:** [gianluca de dominicis](https://apify.com/surefeed) (community)
- **Features:** Limited permissions
- **Stats:** 3 total users, 2 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.00 / 1,000 audited products

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 Auditor

Find actionable data problems in product catalogs before sending them to advertising or shopping platforms. Built for ecommerce agencies, feed managers and online stores. Read a public feed URL or paste XML, CSV, TSV or JSON, then export a product-by-product audit as CSV, Excel or JSON.

**Selected feed-level checks, not a Merchant Center approval tool.** It does not log in to Google, modify catalogs, repair prices or submit advertising campaigns. A result with no detected issues only passed the checks listed below.

### Quick start

1. Try the default synthetic demo: three products, with valid data and intentional errors. Every result has `syntheticDemo: true`.
2. For your catalog, fill **Public feed URL** or **Paste XML, CSV, TSV or JSON**. Use only one. Real input overrides the demo checkbox.
3. Select English or Italian and the maximum number of products. Start the Actor.
4. Open **Product checks** for issues and recommendations, or **Audit summary** for totals and truncation. Export from Apify.

No API keys or additional accounts are required beyond Apify. Uses limited Actor permissions and the run's own output storage. No third-party AI service is called.

#### Example: inline JSON

```json
{
  "language": "en",
  "maxProducts": 1000,
  "feedText": "[{\"id\":\"SKU-1\",\"title\":\"Ceramic mug\",\"description\":\"Handmade ceramic mug\",\"link\":\"https://example.com/mug\",\"image_link\":\"https://example.com/mug.jpg\",\"price\":\"19.90 EUR\",\"availability\":\"in_stock\",\"identifier_exists\":\"no\"}]"
}
```

Example URLs and identifiers above are synthetic. Use your own data for production.

### Checks included

| Area | What is checked |
| --- | --- |
| Identity | Missing ID, exact duplicates among audited rows, case-only collisions for review, ID length advisory |
| Text | Missing title/description, length advisories; structured title/description content accepted |
| URLs | Presence and syntax of product and image URLs; no credentials; HTTP(S) only |
| Prices | Amount/currency format, nonnegative values, up to two decimals; zero prices and unlisted currency codes flagged for review |
| Promotions | Currency differs from regular price; sale is not cheaper; sale date supplied without sale price |
| Availability | Supported values; preorder/backorder missing date; date-time format, timezone and past dates |
| Identifiers | GTIN length and check digit; conflicting identifier flags; missing GTIN/brand+MPN reviewed rather than automatically rejected |
| Condition | Supported new/refurbished/used values when present |

GTIN validation does **not** verify GS1 assignment, ownership, authenticity or matching to the product. Multiple GTIN values are marked for manual review. Never invent identifiers to remove a warning. Currency checks use a built-in common-currency list, not a complete ISO registry. Country-, destination-, campaign- and category-specific exceptions require human review.

### Understand the result

- `errors`: at least one checked data error, such as a duplicate ID or malformed price.
- `review`: no checked errors, but at least one condition needs review.
- `no_issues_in_checked_rules`: no findings within this limited ruleset. **Not** Google approval or a compliance certificate.

Each product includes `rowNumber`, `productId`, `title`, `errorCount`, `reviewCount`, stable `issueCodes`, localized `recommendations`, full `issues`, prices, availability and GTIN. `ruleset` and `checkedAt` make reports traceable. `landingPageChecked`, `imageContentChecked` and `merchantApprovalChecked` are always false in this release.

The `SUMMARY` record contains total parsed/audited products, counts, issue frequencies and `truncated` (the input audit cap). Cloud runs also report `savedProducts`, `outputComplete` and `chargeLimitReached`. Audit counts describe all analyzed rows; if a charge cap cuts output short, `savedProducts` is smaller and `outputComplete` is false. Products with errors and products needing review can overlap. Product-origin text that could start a spreadsheet formula is prefixed with an apostrophe in output; GTINs and IDs are treated as strings. Preserve text types when importing CSV into Excel.

### Supported input and limits

- UTF-8 feeds, maximum **5 MiB**. Up to **10,000 audited products** per run; default 1,000. Reports explicitly state when only part of a feed was audited. Duplicate detection covers that part only.
- XML: RSS `channel/item` and Atom `feed/entry`, including Google `g:` product fields and CDATA. DTD/entity declarations are rejected. Repeated or unexpected structured fields are flagged for review.
- CSV/TSV: headers required; use product-feed names such as `id`, `title`, `description`, `link`, `image_link`, `price`, `availability` and `gtin`. There is no automatic mapping from a native WooCommerce/Shopify export: convert its column names and values first. Comma, semicolon and tab supported; quoted multiline values supported. Duplicate normalized headers and uneven rows fail parsing rather than silently shifting products.
- JSON: product array, or an object with `products`/`items` array. Preserve leading zeros by quoting IDs and GTINs. Duplicate JSON keys are rejected.
- URL retrieval: public HTTP(S), ports 80/443, bounded redirects and download size. Private addresses and embedded credentials are rejected. No proxies, browser rendering, authentication or compressed feed archives in this release. A blocked/unavailable feed fails the run rather than being classified as an invalid catalog.
- Malformed or empty feeds fail without an audit dataset. Inputs remain in your Apify run storage; avoid including secrets or customer data. The tool does not need them.

### What this does not check

It does not visit product or image URLs, compare a feed to live checkout prices, inspect image dimensions/quality, validate all attributes, check shipping/tax rules, or determine legal or Merchant Center policy compliance. Those rules vary with destination, country and product category. Feed URLs should be provided by their owner or authorized operator.

### Pricing

Store price: **$1 per 1,000 audited products** ($0.001 per output row), plus the automatic Actor start event ($0.00005 at up to 1 GB). Check the actual Store pricing before starting a run. Platform usage is included under pay-per-event pricing. No paid source Actor or AI API is used. At this rate and up to 1 GB, 1,000 saved audit rows cost $1.00005 including the start event; the three-row demo costs $0.00305. These examples exclude any plan-specific discount; the Pricing tab is authoritative.

Each product audit row saved and charged counts, whether it has issues or not. Analyzed rows that are not saved because the charge limit is reached are reflected in the summary, not a complete paid export. The three-row synthetic demo counts too. `SUMMARY` is not an additional paid event. `maxProducts` limits the number of rows; Apify's maximum charge setting is a separate control. A parsing failure does not produce product audit rows, although a start event can still apply. Results are saved in batches through the Apify SDK: a storage failure or charge limit can leave partial output, so check run status and SUMMARY before treating an export as complete. An abort event saves the progress tally in ABORTED. Runs made by the owner may show usage cost rather than customer event prices.

### Automation

Use the Actor API or Apify integrations to check updated catalogs and route rows with nonzero `errorCount` to your own workflow. This Actor does not create schedules or send messages itself. Issue codes remain English in both report languages for stable filtering.

### Development and references

Python 3.13 on Apify with the official Apify SDK 4.x. The parsing and audit engine uses the standard library only and can be tested without installing the cloud SDK. Docker: `apify/actor-python:3.13`. Local engine tests:

```sh
python3 -m unittest discover -s test -v
python3 main.py --local examples/input-demo.json
```

Rules are a documented subset informed by the [Google Merchant Center product data specification](https://support.google.com/merchants/answer/7052112?hl=en). Check that specification for current complete requirements. SureFeed is independent of Google and makes no approval or revenue guarantee.

### Security and resource limits (November 2026)

Feed downloads have a total 60-second budget covering DNS, connection, TLS, redirects, headers and body. A separate worker is terminated when the budget expires; process startup and OS scheduling/cleanup can add overhead. HTTPS redirects must remain HTTPS.

Parsing accepts at most 50,000 products, 256 fields/columns, depth 32 and 100,000 structural units (JSON punctuation outside strings; XML elements plus attributes). Structural limits can reject complex feeds sooner; split them into smaller feeds. The audit cap remains 10,000 and the byte cap remains 5 MiB. Errors expose controlled validation messages rather than raw library exceptions.

# Actor input Schema

## `feedUrl` (type: `string`):

Optional public HTTP(S) feed, UTF-8, up to 5 MiB; total download budget 60 seconds. HTTPS redirects stay HTTPS. No credentials or private-network URLs. Leave empty with feedText.

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

Alternative to feedUrl. Up to 5 MiB, 50,000 parsed products, 256 fields per product and bounded nesting/structure. Split larger or complex feeds. JSON array or products/items; CSV headers; RSS/Atom XML without DTD/entities.

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

Auto detects XML/JSON and comma, semicolon or tab-delimited text. Choose an explicit format when needed.

## `language` (type: `string`):

Stable machine-readable issue codes are the same in both languages.

## `maxProducts` (type: `integer`):

Audit only the first N products. SUMMARY declares truncation. Duplicate checks cover the audited rows only. Every audited product creates one billed result, including products without issues.

## `demo` (type: `boolean`):

Three built-in synthetic products to demonstrate results. Real input always takes precedence. Demo results are labelled and count as normal output rows for pricing.

## Actor input object example

```json
{
  "feedUrl": "",
  "feedText": "",
  "format": "auto",
  "language": "en",
  "maxProducts": 1000,
  "demo": true
}
```

# Actor output Schema

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

No description

## `summary` (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 = {
    "language": "en",
    "maxProducts": 1000,
    "demo": true
};

// Run the Actor and wait for it to finish
const run = await client.actor("surefeed/product-feed-auditor").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 = {
    "language": "en",
    "maxProducts": 1000,
    "demo": True,
}

# Run the Actor and wait for it to finish
run = client.actor("surefeed/product-feed-auditor").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 '{
  "language": "en",
  "maxProducts": 1000,
  "demo": true
}' |
apify call surefeed/product-feed-auditor --silent --output-dataset

```

## MCP server setup

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

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/YFR6oQFhRaeMJ8HsN/builds/7lzY3WIT77YpSvudx/openapi.json
