# Schema.org JSON-LD Validator & Rich Result Checker (`afkdigital/schema-org-json-ld-validator-rich-result-checker`) Actor

Audit public HTML or supplied markup with separate JSON syntax, vocabulary and selected Google profile findings.

- **URL**: https://apify.com/afkdigital/schema-org-json-ld-validator-rich-result-checker.md
- **Developed by:** [AFK Digital](https://apify.com/afkdigital) (community)
- **Categories:** SEO tools, Developer tools
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$4.00 / 1,000 document validateds

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/actors/running/actors-in-store.md#pay-per-event

## 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.org JSON-LD Validator & Rich Result Checker

Audit JSON-LD across public HTML pages, exported HTML, or supplied JSON documents. Each entity has a bounded preview of its first 16 fields. Each dataset row identifies the document, entity (when declared), JSON path, rule, severity, observation, source and verification date. Filter on `validationLayer` and `findingType` in the Findings dataset view. Start with the prefilled Product example or submit an empty input to run the built-in sample.

### Input

Select one input array. Clear the prefilled document when switching modes.

| Field | Accepted values |
|---|---|
| urls | Public HTTP(S) HTML page URLs. Redirects resolve before validation. |
| htmlFiles | Inline objects like `{"sourceUrl":"https://example.org/p","html":"<html>...</html>"}`. |
| jsonLdDocuments | JSON objects, arrays, raw JSON strings (including broken JSON), or `{"sourceUrl":"https://example.org/p","document": ...}`. |
| validationProfiles | Any subset of Product, Article, BreadcrumbList. All three by default. |
| maxUrls | 1–50 inputs across the selected mode, default 10. Oversized lists are rejected. |
| maxEntitiesPerPage | 1–100 node descriptions, default 50. A partial-result row records truncation. |

HTTP mode reads initial HTML, follows up to four redirects, restricts destination IPs and standard ports, and times out after 12 seconds per document. Up to 512 KiB per document, 64 scripts, traversal depth 48, 12,000 visited values, 100 breadcrumb entries and 256 ordinary finding rows per input. A processing limit can leave part of a document unassessed. Allow enough run time for large batches. Default run timeout 240 seconds. Identity, gzip and deflate responses are bounded before and after decoding.

### What each result means

- **Extraction and syntax** report absent JSON-LD and malformed JSON separately. A broken script does not prevent examination of other scripts. Paths are JSON bracket paths. For HTML the leading index selects a JSON-LD script, starting at zero. Standalone inputs without a supplied URL receive a synthetic urn:input identifier.
- **Schema.org** checks compact property and type names against a bundled vocabulary snapshot and follows class inheritance for domain advisories. These advisories reflect expected usage. Range validation and vocabulary extensions are outside this release. Source: [Schema.org data model](https://schema.org/docs/datamodel.html). Bundled terms and domains derived from [Schema.org vocabulary](https://schema.org/version/latest/schemaorg-current-https.jsonld), [CC BY-SA 3.0](https://schema.org/docs/terms.html).
- **Product snippets** check a nonempty name and a typed offers, review or aggregateRating alternative (including same-document references). Offer checks cover price (including priceSpecification.price) and recommended currency. AggregateOffer checks cover lowPrice and required currency. Currency validation checks three-letter uppercase format. Detailed review/rating fields, merchant listings, variants and editorial pros/cons are outside this profile. [Product snippet rules](https://developers.google.com/search/docs/appearance/structured-data/product-snippet)
- **Article**, **NewsArticle**, **BlogPosting** check presence of five recommended fields: headline, author, image, datePublished and dateModified. Omission creates a recommendation. Author subfields, date formats and image accessibility are outside this profile. [Article rules](https://developers.google.com/search/docs/appearance/structured-data/article)
- **BreadcrumbList** checks at least two entries, ListItem type, positive integer position, a name on the entry or its item, and an item URL except at the final position. [Breadcrumb rules](https://developers.google.com/search/docs/appearance/structured-data/breadcrumb)
- **Google profile coverage** is explicit. Unsupported types receive an informational row. A completed subset of checks does not certify eligibility. Markup can describe inaccurate information. Google decides whether to show a rich result. Ranking changes and display are never guaranteed.

Supports ordinary compact objects with an inherited HTTP(S) schema.org context, arrays, @graph, multiple scripts, and local @id lookups (including cross-script references). Identically named fields in multiple descriptions of the same identifier are not RDF-merged. Custom contexts, aliases, full IRI normalization, containers, full JSON-LD expansion, Microdata and RDFa are outside scope. No remote contexts are fetched. Client-rendered markup can be missing from initial HTML. Supply rendered HTML using htmlFiles if already available.

### Automation examples

In **n8n**, add an HTTP Request node, select POST, use the URL below, enable JSON body, and paste the sample. Use a Header Auth credential for Authorization (Bearer plus your Apify token). The response contains dataset rows. Add a Filter node with severity equal to error.

In **Make**, use HTTP → Make a request with the same URL, method, bearer credential and application/json body. Enable response parsing and use an Iterator on the response array. Route required findings to your issue tracker and recommended findings to a review queue.

```text
https://api.apify.com/v2/acts/afkdigital~schema-org-json-ld-validator-rich-result-checker/run-sync-get-dataset-items
```

```json
{"jsonLdDocuments":[{"@context":"https://schema.org","@type":"Product","name":"Sample mug"}],"validationProfiles":["Product"]}
```

For longer batches, start a run via POST /v2/acts/{actorId}/runs, poll /v2/actor-runs/{runId}, then read /v2/datasets/{defaultDatasetId}/items after SUCCEEDED.

### Billing unit

One document-validated event per processed page or supplied document, including malformed JSON, absent markup and partial assessments within the configured limits. Failed fetches and rejected inputs have no validation event. Finding count does not affect the event count. Repeated inputs are separate submitted documents. The account's Store configuration determines the effective price.

# Actor input Schema

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

Use one input mode. Supply exact public HTTP(S) URLs.

## `htmlFiles` (type: `array`):

Array of objects with html and optional sourceUrl.

## `jsonLdDocuments` (type: `array`):

Objects, arrays, raw JSON strings, or wrappers with document and sourceUrl. Clear the sample to use another mode.

## `validationProfiles` (type: `array`):

Subset of Product, Article and BreadcrumbList. An empty array skips Google profiles.

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

Maximum documents

## `maxEntitiesPerPage` (type: `integer`):

Entity limit per document

## Actor input object example

```json
{
  "jsonLdDocuments": [
    {
      "@context": "https://schema.org",
      "@type": "Product",
      "name": "Demo mug",
      "offers": {
        "@type": "Offer",
        "price": "12",
        "priceCurrency": "USD"
      }
    }
  ],
  "maxUrls": 10,
  "maxEntitiesPerPage": 50
}
```

# Actor output Schema

## `findings` (type: `string`):

No description

# 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 = {
    "jsonLdDocuments": [
        {
            "@context": "https://schema.org",
            "@type": "Product",
            "name": "Demo mug",
            "offers": {
                "@type": "Offer",
                "price": "12",
                "priceCurrency": "USD"
            }
        }
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("afkdigital/schema-org-json-ld-validator-rich-result-checker").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 = { "jsonLdDocuments": [{
            "@context": "https://schema.org",
            "@type": "Product",
            "name": "Demo mug",
            "offers": {
                "@type": "Offer",
                "price": "12",
                "priceCurrency": "USD",
            },
        }] }

# Run the Actor and wait for it to finish
run = client.actor("afkdigital/schema-org-json-ld-validator-rich-result-checker").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 '{
  "jsonLdDocuments": [
    {
      "@context": "https://schema.org",
      "@type": "Product",
      "name": "Demo mug",
      "offers": {
        "@type": "Offer",
        "price": "12",
        "priceCurrency": "USD"
      }
    }
  ]
}' |
apify call afkdigital/schema-org-json-ld-validator-rich-result-checker --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,afkdigital/schema-org-json-ld-validator-rich-result-checker"
        }
    }
}
```

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/YQo9WDINsYUfkLHd9/builds/iziNc7gHPoYgGGiow/openapi.json
