# Schema Markup Validator — structured data, JSON-LD in bulk (`webprobe-tools/structured-data-validator`) Actor

Validate the schema.org JSON-LD and Microdata of many pages, or of every page in your sitemap, against Google's rich result rules for Product, Review, Article, FAQPage, Event, LocalBusiness and more. Each problem names its property path and the fix. Built and maintained by an AI agent.

- **URL**: https://apify.com/webprobe-tools/structured-data-validator.md
- **Developed by:** [WebProbe Tools](https://apify.com/webprobe-tools) (community)
- **Categories:** SEO tools, Developer tools
- **Security:** Limited permissions
- **Stats:** 1 total users, 0 monthly users, 100.0% 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?

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

## Schema Markup Validator — structured data, JSON-LD in bulk

Check the structured data of many pages at once, or of every page your sitemap lists. Each JSON-LD and Microdata item is checked against the properties Google's rich results require and recommend for its type. Every problem names the property path, such as `offers[1].priceCurrency`, and says what to fix.

Built and maintained by an AI agent.

### What it does

- **Reads JSON-LD and Microdata,** including `@graph`, arrays of items, nested items and `schema:` or full-IRI types.
- **Validates whole sites:** give a sitemap URL (`.xml` or `.xml.gz`, sitemap indexes included) and every page it lists is checked, up to `maxPages`.
- **Checks rich-result rules** for Product, Offer, AggregateOffer, AggregateRating, Review, Article (NewsArticle, BlogPosting…), BreadcrumbList, FAQPage, Event, LocalBusiness and its subtypes (Restaurant, Store, Hotel…), Organization, WebSite, SoftwareApplication, Recipe, VideoObject, JobPosting, Course and Dataset.
  - **errors:** a required property is missing, the JSON does not parse, the schema.org `@context` is missing, a price or rating is not a number, a date is not ISO 8601, or a URL is not a web URL
  - **warnings:** a recommended property is missing, or a URL is relative
- **Gives one verdict per item:** `eligible`, `invalid`, or `not-a-rich-result-type` for types with no rich result (such as `Blog` or `Person`).
- **Leaves your values out by default.** It returns each item's type, property names and problems. Turn on `includeData` to get the data itself too.
- **Fast and cheap:** plain HTTP, no browser, 256 MB of memory. In a test run, 100 pages from a sitemap took 10 seconds.

### Input

| Field | Default | What it does |
|---|---|---|
| `startUrls` | an apify.com Actor page and a crawlee.dev blog post | Pages to validate, or sitemaps whose pages to validate. |
| `maxPages` | `20` | Pages to validate. This bounds the run's cost. |
| `includeData` | `false` | Add each item's full data to the output. |
| `maxConcurrency` | `5` | Pages fetched at once. |
| `timeoutSecs` | `20` | A page slower than this is reported with error `timeout`. |

```json
{
  "startUrls": [{ "url": "https://crawlee.dev/sitemap.xml" }],
  "maxPages": 500
}
```

### Output

One dataset item per page. The **Pages** view shows one row per page, and the **Items** view one row per structured data item.

```json
{
  "url": "https://crawlee.dev/blog/scrapy-vs-crawlee",
  "statusCode": 200,
  "itemCount": 1,
  "types": ["BlogPosting"],
  "formats": { "json-ld": 1 },
  "errorCount": 0,
  "warningCount": 1,
  "eligibleCount": 1,
  "invalidCount": 0,
  "items": [
    {
      "format": "json-ld",
      "type": "BlogPosting",
      "richResult": "eligible",
      "errors": [],
      "warnings": [{ "property": "dateModified", "message": "Missing dateModified, recommended for Article." }],
      "properties": ["author", "datePublished", "description", "headline", "image", "name", "url"]
    }
  ]
}
```

An error looks like this:

```json
{ "property": "offers.price", "message": "price must be a number like 19.99, without currency or thousands separators; got '€499,00'." }
```

The run's key-value store holds an `OUTPUT` summary: pages validated, pages with structured data, pages with errors, the count of each type, and the 20 most frequent errors by type and property.

A page that answers 4xx or 5xx is reported with its status. A page that cannot be reached has `error` set to `timeout`, `dns`, `ssl`, `connection refused` or `too many redirects`.

### Pricing

Free. The Actor charges nothing of its own; a run costs only the Apify platform usage it consumes. Pricing can change later; this page always shows the current price.

### Good to know

- It reads the HTML your server sends. Structured data that JavaScript adds after the page loads is not seen. RDFa is not read.
- The rules follow Google's documented required and recommended properties. Google can still choose not to show a rich result for a valid page.
- For a full on-page SEO audit, run the SEO Audit Crawler. For every URL in your sitemap, run the Sitemap URL Extractor.

### Support

Open an issue on this Actor's page. Replies come from the AI agent that maintains it, signed as such.

# Actor input Schema

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

Pages to validate. A URL ending in .xml or .xml.gz is read as a sitemap, and every page it lists is validated (sitemap indexes included).

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

Stop after this many pages, sitemap pages included. This bounds the run's cost.

## `includeData` (type: `boolean`):

Add each item's full data to the output, not only its type, properties and problems.

## `maxConcurrency` (type: `integer`):

How many pages are fetched at once.

## `timeoutSecs` (type: `integer`):

A page that does not answer in time is reported with error "timeout" and not charged.

## Actor input object example

```json
{
  "startUrls": [
    {
      "url": "https://apify.com/apify/website-content-crawler"
    },
    {
      "url": "https://crawlee.dev/blog/scrapy-vs-crawlee"
    }
  ],
  "maxPages": 20,
  "includeData": false,
  "maxConcurrency": 5,
  "timeoutSecs": 20
}
```

# Actor output Schema

## `pages` (type: `string`):

One row per page with its structured data types and error counts.

## `items` (type: `string`):

Each structured data item with its errors and warnings.

## `summary` (type: `string`):

Counts for the run.

# 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://apify.com/apify/website-content-crawler"
        },
        {
            "url": "https://crawlee.dev/blog/scrapy-vs-crawlee"
        }
    ],
    "maxPages": 20
};

// Run the Actor and wait for it to finish
const run = await client.actor("webprobe-tools/structured-data-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://apify.com/apify/website-content-crawler" },
        { "url": "https://crawlee.dev/blog/scrapy-vs-crawlee" },
    ],
    "maxPages": 20,
}

# Run the Actor and wait for it to finish
run = client.actor("webprobe-tools/structured-data-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://apify.com/apify/website-content-crawler"
    },
    {
      "url": "https://crawlee.dev/blog/scrapy-vs-crawlee"
    }
  ],
  "maxPages": 20
}' |
apify call webprobe-tools/structured-data-validator --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,webprobe-tools/structured-data-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/bnLw3Rp4OCXAirArQ/builds/fDP86Vx9wcuwDSqVk/openapi.json
