# Ecommerce Schema Markup Audit and Fix Backlog (`practical_ai_lab_jp/pal-website-merchant-structured-data-suite`) Actor

Audit public product and collection pages for broken schema.org Product, Offer, image, availability, currency and review markup. Get a severity-ranked fix backlog and repeat-run change reports.

- **URL**: https://apify.com/practical_ai_lab_jp/pal-website-merchant-structured-data-suite.md
- **Developed by:** [Practical AI Lab](https://apify.com/practical_ai_lab_jp) (community)
- **Categories:** E-commerce, Developer tools
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 61.5% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.00 / 1,000 remediation delta reports

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

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

## Ecommerce Schema Markup Audit and Fix Backlog

Audit the public product and collection pages of an online store for broken schema.org Product, Offer, image, availability, currency and review markup. The Actor turns what it finds into a severity-ranked fix backlog and, on repeat runs, a change report that shows what is new, worse, better or resolved since the last run.

### Who it is for

Store owners, ecommerce SEO specialists and agencies that need to keep structured data healthy after theme edits, app installs or catalog imports. Only audit stores you own or are allowed to audit.

### What it does

1. Validates that the start URL is a public HTTPS site root (no credentials, ports, IP addresses or private hostnames).
2. Reads robots.txt and honors its rules and Crawl-delay. If robots.txt blocks the audit, nothing is crawled.
3. Discovers product and collection URLs from the public sitemap (including sitemap indexes and gzip files).
4. Fetches a bounded, stable-hash sample of pages one at a time, with redirects limited to the same origin.
5. Extracts JSON-LD, product meta tags and microdata, then checks four buyer outcomes:
   - Product and offer markup completeness
   - Product image markup
   - Price, currency and availability consistency
   - Review and rating markup integrity
6. Ranks issues by priority, flags likely template-level defects, and gives a concrete fix for each issue.
7. Saves a per-domain baseline in a named key-value store, so the next run reports changes.

### Safe built-in example

The prefilled Store input runs with `demoMode: true` and `startUrl: https://shop.example.com/`. This uses a **synthetic, labeled in-memory sitemap and product markup**, exercises the real audit pipeline, and makes **no network requests, persistent baseline writes or charges**. It does not represent findings about any real merchant. For live use, uncheck `demoMode` and enter a store you are authorized to audit.

### Input

- **Store root URL**: the site root, for example https://www.your-store-domain.com/
- **Maximum pages to audit**, **Also audit collection pages**, **Maximum sitemap files**, **Maximum sitemap URLs**, **Maximum page size**, **Delay between requests**: bounds that keep every run small and polite.
- **Baseline storage name**: use the same name for scheduled runs so the baseline survives between runs.
- **Reset baseline**: start over for the domain.

### Output

The dataset contains three record types: SUMMARY (status, sample size, outcome breakdown, change counts, caveats), BACKLOG_ITEM (one ranked row per issue type with example URLs and the fix) and PAGE_FINDING (evidence per page). REMEDIATION_BACKLOG.csv, PAGE_EVIDENCE.csv and OUTPUT are also saved to the key-value store.

### Repeat runs and billing

The first run for a domain creates a baseline and reports BASELINE_CREATED. Later runs report CHANGES_DETECTED or NO_CHANGES. Only runs that detect verified changes emit the remediation-delta-report event; baseline, unchanged and failed runs are never billed. An issue is called resolved only when at least half of its previously affected pages were re-audited; otherwise it is reported as NOT_VERIFIED.

### Limitations

Results describe the audited sample, not the whole catalog. Pages are read as static HTML, so markup injected by JavaScript is not seen. The Actor is not a replacement for Google's Rich Results Test or Merchant Center diagnostics. It reads no logins, personal data or visible page text, and review author names are never copied into the output.

# Actor input Schema

## `demoMode` (type: `boolean`):

Prefilled Store example with synthetic HTML and schema data; no live crawl, persistent baseline or payment. Use only with https://shop.example.com/. Uncheck for a real website audit.

## `startUrl` (type: `string`):

Public HTTPS site root of the store you own or are allowed to audit, for example https://www.your-store-domain.com/ . No path, query, port, credentials or IP address. Replace the prefilled placeholder with your own store.

## `maxPages` (type: `integer`):

Upper bound on product and collection pages fetched in one run. Pages are chosen by a stable hash of their URL, so repeat runs re-check the same pages. Results describe this sample, not the whole catalog.

## `includeCollections` (type: `boolean`):

Reserve up to about 20% of the page budget for collection or category pages and check product list markup.

## `maxSitemapFiles` (type: `integer`):

Upper bound on sitemap and sitemap index files read (index recursion is limited to two levels).

## `maxSitemapUrls` (type: `integer`):

Stop collecting URLs after this many same-origin HTTPS entries across all sitemap files.

## `maxPageKb` (type: `integer`):

Pages larger than this are not parsed because their markup may be cut off. They are counted in the summary.

## `requestDelayMs` (type: `integer`):

Minimum pause between requests. A longer Crawl-delay from robots.txt (up to 30 seconds) takes precedence. Requests are strictly sequential.

## `stateStoreName` (type: `string`):

Named key-value store (3-63 lowercase letters, digits or hyphens) that keeps one baseline per domain between runs. Use the same name for scheduled runs. Leave empty to use the run's own default store (the baseline then does not survive into new runs on the Apify platform).

## `resetBaseline` (type: `boolean`):

Discard the stored baseline for this domain and create a new one (the run reports BASELINE_CREATED and is not billable).

## Actor input object example

```json
{
  "demoMode": true,
  "startUrl": "https://shop.example.com/",
  "maxPages": 40,
  "includeCollections": true,
  "maxSitemapFiles": 5,
  "maxSitemapUrls": 5000,
  "maxPageKb": 768,
  "requestDelayMs": 1000,
  "stateStoreName": "pal-merchant-schema-baselines",
  "resetBaseline": false
}
```

# 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 = {
    "demoMode": true,
    "startUrl": "https://shop.example.com/"
};

// Run the Actor and wait for it to finish
const run = await client.actor("practical_ai_lab_jp/pal-website-merchant-structured-data-suite").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 = {
    "demoMode": True,
    "startUrl": "https://shop.example.com/",
}

# Run the Actor and wait for it to finish
run = client.actor("practical_ai_lab_jp/pal-website-merchant-structured-data-suite").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 '{
  "demoMode": true,
  "startUrl": "https://shop.example.com/"
}' |
apify call practical_ai_lab_jp/pal-website-merchant-structured-data-suite --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,practical_ai_lab_jp/pal-website-merchant-structured-data-suite"
        }
    }
}
```

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/hhIo1j1WZF9POZvWJ/builds/DNld5CNqBIjHVXqM1/openapi.json
