# 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:** 3 total users, 1 monthly users, 94.9% runs succeeded, 0 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/actors/running/actors-in-store.md#pay-per-usage

## 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 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(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 '{
  "startUrls": [
    {
      "url": "https://www.apify.com/"
    }
  ]
}' |
apify call tom2turnt/schema-validator --silent --output-dataset

```

## MCP server setup

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

```

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/jgE9Fk2gjfUERrG5L/builds/3wZHobU8t1lmyeqVq/openapi.json
