# Structured Data Validator + Rich Results & AEO Checker (`tom2turnt/schema-validator`) Actor

Detect ALL schema.org structured data (JSON-LD + microdata) on any public page, validate each type against Google Rich Results requirements, and get a 0-100 validity score, per-type eligibility, AEO readiness signals, and concrete prop-level fixes.

- **URL**: https://apify.com/tom2turnt/schema-validator.md
- **Developed by:** [Tommy G](https://apify.com/tom2turnt) (community)
- **Categories:** AI, SEO tools, Lead generation
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, NaN bookmarks
- **User rating**: No ratings yet

## Pricing

Pay per usage

This Actor is paid per platform usage. The Actor is free to use, and you only pay for the Apify platform usage, which gets cheaper the higher subscription plan you have.

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

## What's an Apify Actor?

Actors are a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
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.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp.md).

If your project is in a different language, use 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 Validator + Rich Results & AEO Checker (Apify Actor)

Give it any public **page URL** and it detects **every schema.org structured-data type** on the
page (both **JSON-LD** and **microdata**), validates each type against **Google Rich Results
requirements**, and tells you exactly what's missing to win a rich result — plus an **AEO
(Answer-Engine Optimization)** readiness read for AI search. HTML-only (no headless browser),
fast, cheap, deterministic.

Built for **SEO audits at scale, rich-result eligibility monitoring, schema QA in CI, competitor
structured-data teardown, and AEO readiness checks**.

### What it validates
Per-type Google REQUIRED + RECOMMENDED property coverage for:

- **Article / NewsArticle / BlogPosting**, **Product** (merchant listing *and* product snippet),
  **Offer / AggregateOffer**, **AggregateRating / Review**, **Recipe**, **Event**,
  **JobPosting**, **LocalBusiness** (+ subtypes like Restaurant/Store), **FAQPage**, **HowTo**,
  **BreadcrumbList**, **VideoObject**, **Organization**, **Course**.

It encodes the real-world gotchas: **HowTo is deprecated** (detected for AEO but never a rich
result), **FAQPage rich results are deprecated** (validated structurally only), **Article &
Organization have no Google-required props**, **Product splits into two experiences**,
**conditional-required** logic (offers ⇒ price), **nested vs standalone** ratings/reviews,
**BreadcrumbList needs ≥2 items**, **ratingValue must be in range**, and **microdata counts
exactly like JSON-LD**.

### Input
```json
{ "startUrls": [{ "url": "https://www.example.com/product/123" }], "maxConcurrency": 5, "maxPages": 100 }
````

`maxPages` capped at 200, `maxConcurrency` at 20.

### Output — one STABLE record per URL (ok *and* error rows share the shape)

```json
{
  "status": "ok",
  "requested_url": "...",
  "final_url": "...",
  "http_status": 200,
  "found": true,
  "complete": true,
  "page_type": "rich-eligible",
  "source": "json-ld",
  "detected_types": ["Product", "Offer", "AggregateRating", "BreadcrumbList"],
  "entities": [
    {
      "type": "Product",
      "source": "json-ld",
      "required_missing": [],
      "recommended_missing": ["offers.shippingDetails", "offers.hasMerchantReturnPolicy"],
      "rich_result_eligible": true,
      "errors": []
    }
  ],
  "rich_result_eligible_types": ["Product", "BreadcrumbList"],
  "validity_score": 88,
  "aeo_signals": {
    "has_faq": false,
    "has_howto": false,
    "has_breadcrumb": true,
    "has_article_meta": false,
    "answer_upfront": false
  },
  "fixes": [
    "Product.offers.priceCurrency missing — add ISO 4217 code for merchant listing eligibility."
  ],
  "extracted_at": "2026-06-04T..."
}
```

#### Field guide

- **detected\_types** — every distinct schema.org `@type` found (JSON-LD + microdata, `@graph` and
  nested types flattened in, deduped, first-seen order).
- **entities\[]** — one per recognized typed node: its `required_missing`, `recommended_missing`,
  `rich_result_eligible`, and hard `errors` (malformed date, rating out of range, non-numeric
  price, breadcrumb < 2 items, conditional-required miss).
- **rich\_result\_eligible\_types** — types where at least one entity fully passes Google's REQUIRED
  props for a *live* rich result.
- **validity\_score** — integer 0-100. REQUIRED-coverage dominates (80%), RECOMMENDED is bonus
  (20%), hard errors subtract. Capped at **79** until at least one type is rich-result eligible
  (so a page can't score "green" without a real, eligible type). `0` when nothing is found.
- **aeo\_signals** — `has_faq`, `has_howto`, `has_breadcrumb`, `has_article_meta`, `answer_upfront`
  (answer-first content ≤300 chars) for Answer-Engine Optimization.
- **fixes\[]** — concrete, prop-level remediation naming `Type.property` + why it matters.

#### found / complete semantics

- **found = true** iff ≥1 entity exists with a recognized non-empty schema.org `@type`
  (JSON-LD **or** microdata). A page with only `<title>`/OpenGraph, or only empty `{}` /
  `@type`-less nodes ⇒ **found = false** (never overbills).
- **complete = true** iff at least one type is **rich\_result\_eligible**. HowTo (deprecated) and
  bare FAQPage never make a page complete on their own.

### Run locally / test

```bash
npm install
npm test     ## 60 unit tests on the pure validator (node:test) — rich-result rules + edge cases
```

### Publish to Apify (account-holder's step)

```bash
npm install -g apify-cli && apify login && apify push
```

### Notes / safety

- SSRF-guarded, robots-respecting, rate-limited, cost-capped (shared `src/lib/actor_runner.js`).
- Stores only derived validation results — no raw page bodies.
- HTML-only: client-rendered pages that inject JSON via JS return `found:false` with
  `render_required:true`. Core logic in `src/validate.js` (pure, deterministic, unit-tested).
- Validation rules web-verified against `developers.google.com/search/docs` structured-data docs
  (June 2026).

````

# Actor input Schema

## `startUrls` (type: `array`):

Public page URLs to scan for schema.org structured data and validate against Google Rich Results requirements.
## `maxConcurrency` (type: `integer`):

Pages validated in parallel (capped at 20).
## `maxPages` (type: `integer`):

Cost guard: maximum pages per run (hard ceiling 200).

## Actor input object example

```json
{
  "startUrls": [
    {
      "url": "https://www.apify.com"
    }
  ],
  "maxConcurrency": 5,
  "maxPages": 100
}
````

# 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 = {
    "startUrls": [
        {
            "url": "https://www.apify.com"
        }
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("tom2turnt/schema-validator").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 = { "startUrls": [{ "url": "https://www.apify.com" }] }

# Run the Actor and wait for it to finish
run = client.actor("tom2turnt/schema-validator").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 '{
  "startUrls": [
    {
      "url": "https://www.apify.com"
    }
  ]
}' |
apify call tom2turnt/schema-validator --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=tom2turnt/schema-validator",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Structured Data Validator + Rich Results & AEO Checker",
        "description": "Detect ALL schema.org structured data (JSON-LD + microdata) on any public page, validate each type against Google Rich Results requirements, and get a 0-100 validity score, per-type eligibility, AEO readiness signals, and concrete prop-level fixes.",
        "version": "0.1",
        "x-build-id": "3wZHobU8t1lmyeqVq"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/tom2turnt~schema-validator/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-tom2turnt-schema-validator",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/acts/tom2turnt~schema-validator/runs": {
            "post": {
                "operationId": "runs-sync-tom2turnt-schema-validator",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor and returns information about the initiated run in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/runsResponseSchema"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/acts/tom2turnt~schema-validator/run-sync": {
            "post": {
                "operationId": "run-sync-tom2turnt-schema-validator",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "required": [
                    "startUrls"
                ],
                "properties": {
                    "startUrls": {
                        "title": "Page URLs",
                        "type": "array",
                        "description": "Public page URLs to scan for schema.org structured data and validate against Google Rich Results requirements.",
                        "items": {
                            "type": "object",
                            "required": [
                                "url"
                            ],
                            "properties": {
                                "url": {
                                    "type": "string",
                                    "title": "URL of a web page",
                                    "format": "uri"
                                }
                            }
                        }
                    },
                    "maxConcurrency": {
                        "title": "Max concurrency",
                        "minimum": 1,
                        "maximum": 20,
                        "type": "integer",
                        "description": "Pages validated in parallel (capped at 20).",
                        "default": 5
                    },
                    "maxPages": {
                        "title": "Max pages",
                        "minimum": 1,
                        "maximum": 200,
                        "type": "integer",
                        "description": "Cost guard: maximum pages per run (hard ceiling 200).",
                        "default": 100
                    }
                }
            },
            "runsResponseSchema": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "actId": {
                                "type": "string"
                            },
                            "userId": {
                                "type": "string"
                            },
                            "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "finishedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "status": {
                                "type": "string",
                                "example": "READY"
                            },
                            "meta": {
                                "type": "object",
                                "properties": {
                                    "origin": {
                                        "type": "string",
                                        "example": "API"
                                    },
                                    "userAgent": {
                                        "type": "string"
                                    }
                                }
                            },
                            "stats": {
                                "type": "object",
                                "properties": {
                                    "inputBodyLen": {
                                        "type": "integer",
                                        "example": 2000
                                    },
                                    "rebootCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "restartCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "resurrectCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "computeUnits": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "options": {
                                "type": "object",
                                "properties": {
                                    "build": {
                                        "type": "string",
                                        "example": "latest"
                                    },
                                    "timeoutSecs": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "memoryMbytes": {
                                        "type": "integer",
                                        "example": 1024
                                    },
                                    "diskMbytes": {
                                        "type": "integer",
                                        "example": 2048
                                    }
                                }
                            },
                            "buildId": {
                                "type": "string"
                            },
                            "defaultKeyValueStoreId": {
                                "type": "string"
                            },
                            "defaultDatasetId": {
                                "type": "string"
                            },
                            "defaultRequestQueueId": {
                                "type": "string"
                            },
                            "buildNumber": {
                                "type": "string",
                                "example": "1.0.0"
                            },
                            "containerUrl": {
                                "type": "string"
                            },
                            "usage": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "usageTotalUsd": {
                                "type": "number",
                                "example": 0.00005
                            },
                            "usageUsd": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "number",
                                        "example": 0.00005
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
