# JSON-LD Change Monitor & Rich Result QA (`xerophylous_mercy_0wn/structured-data-change-monitor`) Actor

Monitor JSON-LD and schema.org across URLs or sitemaps. Detect rich-result regressions, removed types, score changes, and stable issue-code diffs for CI.

- **URL**: https://apify.com/xerophylous\_mercy\_0wn/structured-data-change-monitor.md
- **Developed by:** [Hryhory Sinenka](https://apify.com/xerophylous_mercy_0wn) (community)
- **Categories:** SEO tools, 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 results

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/platform/actors/running/actors-in-store#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

## Structured Data Change Monitor & Rich Result QA

Audit JSON-LD and schema.org markup on public web pages, create a persistent baseline, and detect regressions on later scheduled runs.

This Actor is built for technical SEO monitoring, storefront QA, CMS release checks, and agent/CI pipelines that need stable issue codes instead of a prose-only audit.

### Why use it

- Audit one page, a batch of URLs, or public XML sitemaps.
- Parse JSON-LD, including nested nodes and `@graph` structures.
- Detect Microdata and RDFa schema types.
- Run deterministic checks for Product, Article, BreadcrumbList, FAQPage, and LocalBusiness markup.
- Track schema types, issue codes, fingerprints, QA scores, and HTTP state between runs.
- Emit only changed pages after the baseline if desired.
- Use `baseline_only` to avoid flooding the first scheduled run.
- Export stable dataset records through Apify API, webhooks, schedules, Zapier, Make, or MCP.

### Input

Supply `urls`, `sitemapUrls`, or both. The Actor deduplicates targets and applies `maxPages` after sitemap expansion.

```json
{
  "urls": ["https://example.com/product/widget"],
  "sitemapUrls": [],
  "maxPages": 100,
  "monitorChanges": true,
  "onlyChanges": false,
  "firstRunMode": "emit_current",
  "stateStoreName": "structured-data-monitor-state",
  "stateNamespace": "storefront-production"
}
```

For scheduled regression alerts, use:

```json
{
  "sitemapUrls": ["https://example.com/sitemap.xml"],
  "maxPages": 500,
  "monitorChanges": true,
  "onlyChanges": true,
  "firstRunMode": "baseline_only",
  "stateNamespace": "storefront-production"
}
```

### Output

Each emitted dataset item contains:

- requested and final URL, HTTP status, title, canonical, and robots metadata;
- JSON-LD, Microdata, and RDFa schema types;
- JSON-LD block count;
- deterministic QA score and rule-based rich-result readiness flag;
- issues with `code`, `severity`, `message`, and associated schema type;
- a content fingerprint;
- change details: added/removed types, new/resolved issue codes, and score delta;
- check timestamp.

The `OUTPUT` key-value-store record summarizes target count, emitted items, baselines, suppressed unchanged pages, failures, and page-limit capping.

### Monitoring behavior

State is stored by namespace and URL in the named key-value store.

- `emit_current`: the first run emits current audits.
- `baseline_only`: the first run records state without dataset output.
- `onlyChanges: true`: later unchanged pages are suppressed.
- Failed fetches are reported in the run summary and never silently turned into successful audits.

### Safety and limits

- Only public HTTP(S) targets are accepted.
- Local/private IP ranges and hostnames are blocked before requests.
- Every redirect is revalidated.
- DNS results are checked before fetching.
- Per-request timeouts, retries, response-byte limits, and a page ceiling are enforced.

The readiness result is a deterministic rule set, not a claim that Google will show a rich result. Search engines apply additional eligibility, quality, policy, indexing, and site-level criteria.

### Pricing

Recommended Store pricing: **$2.00 per 1,000 audited page records**, with a minimal Actor-start event. Platform compute is included.

### Source basis

The checks are designed around public Schema.org vocabulary and Google Search structured-data guidance. They deliberately produce explicit issue codes and avoid claiming to reproduce Google's private ranking or indexing systems.

# Actor input Schema

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

Public HTTP(S) pages to audit.

## `sitemapUrls` (type: `array`):

Optional public XML sitemaps. Page URLs are extracted from <loc> entries.

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

Hard ceiling applied after page and sitemap URL deduplication.

## `monitorChanges` (type: `boolean`):

Persist page fingerprints and audit state in the named key-value store.

## `onlyChanges` (type: `boolean`):

After the baseline exists, suppress unchanged pages from the dataset.

## `firstRunMode` (type: `string`):

Emit current audits or create a silent baseline for later scheduled comparisons.

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

Named Apify key-value store used for monitoring state.

## `stateNamespace` (type: `string`):

Separates independent monitoring jobs that share a state store.

## `requestTimeoutSecs` (type: `integer`):

Maximum duration for each page or sitemap request.

## `maxRetries` (type: `integer`):

Retries for timeouts, rate limits, and transient server errors.

## `maxResponseBytes` (type: `integer`):

Reject oversized page or sitemap responses before parsing.

## Actor input object example

```json
{
  "urls": [
    "https://www.apify.com/"
  ],
  "sitemapUrls": [],
  "maxPages": 100,
  "monitorChanges": true,
  "onlyChanges": false,
  "firstRunMode": "emit_current",
  "stateStoreName": "structured-data-monitor-state",
  "stateNamespace": "default",
  "requestTimeoutSecs": 30,
  "maxRetries": 2,
  "maxResponseBytes": 2000000
}
```

# Actor output Schema

## `audits` (type: `string`):

Audited pages emitted to the default dataset.

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

Default dataset resource for API access and exports.

## `runSummary` (type: `string`):

Counts, failures, baselines, suppressed pages, and truncation evidence.

# 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("xerophylous_mercy_0wn/structured-data-change-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 = {}

# Run the Actor and wait for it to finish
run = client.actor("xerophylous_mercy_0wn/structured-data-change-monitor").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
for item in client.dataset(run["defaultDatasetId"]).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 xerophylous_mercy_0wn/structured-data-change-monitor --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=xerophylous_mercy_0wn/structured-data-change-monitor",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/YssUS5tVwqSVy6kqP/builds/yibsiaUOihpCpIBV0/openapi.json
