# Schema SEO Regression Monitor — Detect Structured Data Changes (`riad_h/schema-seo-regression-monitor`) Actor

Monitor structured data changes and detect SEO-critical schema regressions.

- **URL**: https://apify.com/riad\_h/schema-seo-regression-monitor.md
- **Developed by:** [Riad Hossain](https://apify.com/riad_h) (community)
- **Categories:**
- **Stats:** 2 total users, 1 monthly users, 83.3% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.00 / 1,000 results

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.

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

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
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.
Actors are written with capital "A".

## 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.
The best way to integrate Actors is as follows.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).

# README

## Schema SEO Regression Monitor

> Monitor structured data changes across your website and detect SEO-critical schema regressions. Know when Product, Offer, AggregateRating, Article, or Breadcrumb markup disappears — before it hurts your search visibility.

### The Problem This Solves

You deployed a website update. Did it remove important structured data?

Generic schema validators tell you what schema exists *right now*. Generic change detectors tell you *something* changed. Neither tells you what matters:

- Did a Product lose its Offer markup?
- Did AggregateRating disappear?
- Did an Article lose its author?
- Is this change a false positive (just key reordering)?

**This Actor answers: WHAT changed, WHY it matters, HOW important it is, and WHAT to investigate first.**

### Who Is It For?

- **SEO agencies** — Monitor client websites for schema regressions after deployments
- **Website owners** — Catch structured data issues before they affect search appearance
- **Developers** — Verify deployments don't accidentally remove schema markup
- **Automated pipelines** — Schedule runs via Apify tasks for continuous monitoring

### How It Works

```
Website URL
     ↓
Fetch HTML (HTTP, no browser)
     ↓
Extract JSON-LD + Microdata + RDFa
     ↓
Normalize (semantic, not textual)
     ↓
Load previous snapshot from KVS
     ↓
Compare (semantic diff)
     ↓
Classify changes by SEO impact
     ↓
Generate recommendations
     ↓
Push structured results to dataset
```

#### Key Design Principles

1. **Semantic comparison** — Key order changes don't trigger false positives
2. **Value preservation** — Price changes (100→120) are always detected
3. **Snapshot persistence** — Same URL = same snapshot key across runs
4. **Failure safety** — Fetch failures preserve previous snapshot (never false "schema removed")
5. **Baseline first** — First run creates baseline, no false regressions

### Supported Schema Types

The Actor recognizes SEO importance for:

| Schema Type | Importance | Removal Impact |
|-------------|-----------|----------------|
| Product | CRITICAL | HIGH/CRITICAL |
| Offer | CRITICAL | HIGH/CRITICAL |
| AggregateRating | CRITICAL | HIGH/CRITICAL |
| Review | HIGH | HIGH |
| FAQPage | HIGH | HIGH |
| Article / NewsArticle | HIGH | HIGH |
| BreadcrumbList | MEDIUM | MEDIUM |
| LocalBusiness | MEDIUM | MEDIUM |
| Event | MEDIUM | MEDIUM |
| JobPosting | MEDIUM | MEDIUM |
| Recipe | MEDIUM | MEDIUM |
| VideoObject | MEDIUM | MEDIUM |
| Organization | MEDIUM | MEDIUM |

### Input

```json
{
  "urls": ["https://example.com/product/1", "https://example.com/product/2"],
  "snapshotNamespace": "client-acme",
  "maxUrls": 100,
  "requestDelayMs": 500,
  "enableMicrodata": true,
  "enableRdfa": true
}
```

Or use a sitemap:

```json
{
  "sitemapUrl": "https://example.com/sitemap.xml",
  "snapshotNamespace": "client-acme",
  "maxUrls": 500
}
```

### Output

Each URL produces one dataset item:

```json
{
  "url": "https://example.com/product/iphone",
  "status": "CHANGE_DETECTED",
  "previousSchemaTypes": ["Product", "AggregateRating", "BreadcrumbList"],
  "currentSchemaTypes": ["Product", "BreadcrumbList"],
  "changeCount": 2,
  "changes": [
    {
      "type": "SCHEMA_TYPE_REMOVED",
      "schemaType": "AggregateRating",
      "impact": "CRITICAL",
      "priority": "HIGH",
      "confidence": "HIGH",
      "changeScore": 80.0,
      "recommendation": "Verify whether AggregateRating schema was intentionally removed..."
    }
  ],
  "highestPriority": "HIGH",
  "priorityScore": 80.0,
  "fetchStatus": 200,
  "timestamp": "2026-08-30T18:00:00Z",
  "snapshotId": "abc123",
  "previousSnapshotPreserved": false
}
```

#### Status Values

| Status | Meaning |
|--------|---------|
| `BASELINE_CREATED` | First run — snapshot saved, no comparison |
| `NO_CHANGE` | Schemas match previous snapshot |
| `CHANGE_DETECTED` | Semantic differences found |
| `FETCH_FAILED` | Page returned same error as before — previous snapshot preserved |
| `FETCH_STATUS_CHANGED` | Page status changed (e.g. 200→500) — previous snapshot preserved |

### Priority Methodology

```
Change Score = Schema_Importance × Change_Severity × Property_Factor
```

| Score Range | Priority | Meaning |
|-------------|----------|---------|
| 75-100 | CRITICAL | Immediate investigation needed |
| 50-74 | HIGH | Likely affects structured data availability |
| 25-49 | MEDIUM | Worth investigating |
| 0-24 | LOW | Minor or positive change |

> Priority scores are SEO regression prioritization heuristics, not Google ranking scores.

### Limitations

- The Actor does not guarantee Google rich-result eligibility
- The Actor does not guarantee ranking changes
- Structured-data interpretation may change over time
- Schema.org support and search-engine feature requirements are not identical
- The Actor detects changes; it does not determine whether a change was intentional

### Pricing

**Pay-per-event: `$0.10` per `schema-regression-analysis` event**

Charged only for successfully analyzed URLs. Failed fetches and invalid URLs are not charged.

### License

MIT

# Actor input Schema

## `urls` (type: `array`):

List of URLs to check for schema changes.

## `sitemapUrl` (type: `string`):

Optional sitemap URL to extract URLs from.

## `maxUrls` (type: `integer`):

Maximum number of URLs to process. Default: 100. Max: 5000.

## `snapshotNamespace` (type: `string`):

Namespace for snapshot storage. Use different namespaces for different clients/sites to prevent collisions.

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

Delay between HTTP requests in milliseconds.

## `enableMicrodata` (type: `boolean`):

Whether to extract Microdata (itemscope/itemtype).

## `enableRdfa` (type: `boolean`):

Whether to extract RDFa (typeof/property).

## Actor input object example

```json
{
  "urls": [
    "https://example.com/product/1",
    "https://example.com/product/2"
  ],
  "sitemapUrl": "",
  "maxUrls": 100,
  "snapshotNamespace": "default",
  "requestDelayMs": 500,
  "enableMicrodata": true,
  "enableRdfa": true
}
```

# Actor output Schema

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

View all URL results with detected changes, priorities, and recommendations.

## `run_details` (type: `string`):

Full run metadata.

# 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 = {
    "urls": [
        "https://example.com/product/1",
        "https://example.com/product/2"
    ],
    "maxUrls": 100,
    "snapshotNamespace": "default",
    "requestDelayMs": 500,
    "enableMicrodata": true,
    "enableRdfa": true
};

// Run the Actor and wait for it to finish
const run = await client.actor("riad_h/schema-seo-regression-monitor").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 = {
    "urls": [
        "https://example.com/product/1",
        "https://example.com/product/2",
    ],
    "maxUrls": 100,
    "snapshotNamespace": "default",
    "requestDelayMs": 500,
    "enableMicrodata": True,
    "enableRdfa": True,
}

# Run the Actor and wait for it to finish
run = client.actor("riad_h/schema-seo-regression-monitor").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 '{
  "urls": [
    "https://example.com/product/1",
    "https://example.com/product/2"
  ],
  "maxUrls": 100,
  "snapshotNamespace": "default",
  "requestDelayMs": 500,
  "enableMicrodata": true,
  "enableRdfa": true
}' |
apify call riad_h/schema-seo-regression-monitor --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,riad_h/schema-seo-regression-monitor"
        }
    }
}

```

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/jJgbTHc5YKbUy6ukQ/builds/QxvgDbqalper6N3oT/openapi.json
