# Shopify Catalog and Product Feed QA (`mehdi_badawi/shopify-catalog-feed-qa`) Actor

Preflight Shopify catalog, storefront, and merchant-feed data for missing fields, variant errors, taxonomy gaps, and feed-to-page drift. Returns exact issues and proposal-only fixes.

- **URL**: https://apify.com/mehdi\_badawi/shopify-catalog-feed-qa.md
- **Developed by:** [Mehdi Badawi](https://apify.com/mehdi_badawi) (community)
- **Categories:** E-commerce, Automation, Developer tools
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.00 / 1,000 resolved product audits

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

## Shopify Catalog and Product Feed QA

Preflight Shopify catalog, storefront, and merchant-feed data for missing
fields, variant errors, taxonomy gaps, and feed-to-page drift. Get exact issues
plus an optional proposal-only fix file.

### Start in 30 seconds

1. Select **Try for free** and run with no input for a labeled demo.
2. Supply sanitized catalog, storefront, and feed records.
3. Fix violations before submitting or debugging the downstream channel.

**Price:** $0.002 per resolved product audit, plus a $0.00005 start event.
Unknown, failed, and demo results are free.

This Actor does not connect to Shopify or Google Merchant Center, crawl a
storefront, or apply fixes automatically.

### Features

- **Deterministic Rule Evaluation**:
  - Missing required metafields (e.g., custom care instructions, fabric specs, hazardous material ratings).
  - Unmapped Google Product Category (GMC) taxonomy.
  - Variant inconsistencies: missing SKU, missing barcode, zero/missing weight.
  - Pricing logic violations: inverted `compareAtPrice < price`.
  - Duplicate variant options.
  - Feed-to-page drift: price discrepancies or availability mismatches between catalog/feed and live storefront JSON-LD.
- **Explicit Unknowns**:
  - Unobserved evidence (e.g., omitted barcode, un-crawled storefront, absent feed records) is surfaced as explicit `unknown` states rather than falsely assumed compliant.
- **Non-Destructive Fix Proposal**:
  - When `generateFixFile` is enabled, outputs a proposals-only record preserving source product and variant IDs.
  - Changes are never automatically applied.
- **Offline & Credential-Free**:
  - Runs fully offline over sanitized storefront or export records.
  - Requires zero Shopify Admin or customer credentials.

### Input

Input conforms to `.actor/input_schema.json`:

```json
{
  "products": [
    {
      "id": "gid://shopify/Product/12345",
      "handle": "classic-cotton-tee",
      "title": "Classic Cotton Tee",
      "vendor": "Acme Apparel",
      "productType": "Apparel > Tops > T-Shirts",
      "googleProductCategory": "Apparel & Accessories > Clothing > Shirts & Tops",
      "variants": [
        {
          "id": "gid://shopify/ProductVariant/67890",
          "sku": "TEE-BLK-S",
          "barcode": "012345678905",
          "price": "25.00",
          "compareAtPrice": "30.00",
          "weight": 0.2,
          "weightUnit": "kg"
        }
      ],
      "metafields": [
        { "namespace": "custom", "key": "material", "value": "100% Cotton" }
      ],
      "rules": {
        "requiredMetafields": ["custom.material"],
        "requireGmcCategory": true,
        "requireSku": true,
        "requireBarcode": true
      }
    }
  ],
  "generateFixFile": true
}
```

### Output

- **Default Dataset**: One item per audited product containing status (`pass`, `violation`, or `unknown`), detailed list of `violations`, and explicit `unknowns`.
- **Key-Value Store `OUTPUT`**: Run summary envelope containing aggregate counts (`totalProducts`, `passedCount`, `violationCount`, `unknownCount`), contract version, and timestamp.
- **Key-Value Store `FIXES_PROPOSAL`**: List of non-destructive fix proposals preserving source IDs and explaining rationale.

### Local Development & Testing

Run behavioral and fixture tests locally using Node's native test runner:

```bash
npm test
```

Catalog exports may be nonpublic. Use synthetic or authorized screenshots,
minimize retained fields, and delete run datasets under your retention policy.
Fix output is proposal-only and never invents a category, vendor, or brand.
Support owner: Mehdi Badawi through the Apify Store support channel, with an
initial-response target of two business days.

# Actor input Schema

## `contractVersion` (type: `string`):

Contract version (default: 1.0.0)

## `products` (type: `array`):

List of sanitized product catalog entries including variants, metafields, storefront observations, and feed records.

## `generateFixFile` (type: `boolean`):

If true, generates a non-destructive fix proposal record in Key-Value store without mutating source data.

## `globalRules` (type: `object`):

Rules applied across all products (e.g. requireSku, requireBarcode, requireGmcCategory, requireWeight).

## Actor input object example

```json
{
  "contractVersion": "1.0.0",
  "generateFixFile": false
}
```

# Actor output Schema

## `statusRows` (type: `string`):

No description

## `runOutput` (type: `string`):

No description

## `fixProposals` (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 = {};

// Run the Actor and wait for it to finish
const run = await client.actor("mehdi_badawi/shopify-catalog-feed-qa").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 = {}

# Run the Actor and wait for it to finish
run = client.actor("mehdi_badawi/shopify-catalog-feed-qa").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 '{}' |
apify call mehdi_badawi/shopify-catalog-feed-qa --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,mehdi_badawi/shopify-catalog-feed-qa"
        }
    }
}
```

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/YHOVOKDfLBZbaQtao/builds/OjaBmmposlaT1daXd/openapi.json
