# JSON-LD Schema Auditor (`phoenix2810/json-ld-schema-auditor`) Actor

Audit a public page's JSON-LD structured data in one API call. Checks script count, parse errors, schema types, missing @type values, and SEO readiness.

- **URL**: https://apify.com/phoenix2810/json-ld-schema-auditor.md
- **Developed by:** [Sanskar Jaiswal](https://apify.com/phoenix2810) (community)
- **Categories:** SEO tools, Developer tools, Open source
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.005 / actor start

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

## JSON-LD Schema Auditor

Fetches one public web page and audits its JSON-LD structured data. It reports script counts, parse errors, detected schema types, missing `@type` values, and a simple readiness score.

### Use cases

- Check structured data during SEO launches and migrations.
- Monitor important landing pages for broken JSON-LD.
- Feed schema-readiness results into SEO QA dashboards.
- Verify that pages expose common schema types such as Organization, WebSite, Article, Product, BreadcrumbList, FAQPage, or LocalBusiness.

### Input

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `startUrl` | string | Yes | Public HTTP or HTTPS page URL to audit. URLs with credentials, localhost, private IPs, or private DNS targets are blocked. |
| `timeoutSeconds` | integer | No | Request timeout. Values are clamped from 3 to 30 seconds. Default is 10. |
| `maxHtmlBytes` | integer | No | Maximum HTML bytes to read. Values are clamped from 100,000 bytes to 2 MB. Default is 1 MB. |

### Output

| Field | Type | Description |
| --- | --- | --- |
| `inputUrl` | string | Original URL supplied by the user. |
| `normalizedInputUrl` | string | URL after default HTTPS normalization. |
| `finalUrl` | string | Final URL after safe redirects. |
| `ok` | boolean | True when the page was fetched successfully. |
| `status` | integer or null | HTTP status code for the final response. |
| `checkedAt` | string | ISO 8601 timestamp for the audit. |
| `score` | integer | Readiness score from 0 to 100. |
| `grade` | string | Letter grade from A to F. |
| `scriptCount` | integer | Number of `application/ld+json` scripts found. |
| `validItemCount` | integer | Number of parsed JSON-LD objects, including `@graph` nodes. |
| `schemaTypes` | array | Unique detected `@type` values. |
| `itemsMissingType` | integer | Count of JSON-LD items without `@type`. |
| `parseErrors` | array | JSON parse errors with script index and message. |
| `issues` | array | Human-readable audit issues. |
| `recommendations` | array | Suggested fixes. |
| `error` | string or null | Fetch or validation error, if any. |

### Example input

```json
{
  "startUrl": "https://example.com/",
  "timeoutSeconds": 10,
  "maxHtmlBytes": 1048576
}
```

### Example output

```json
{
  "inputUrl": "https://example.com/",
  "normalizedInputUrl": "https://example.com/",
  "finalUrl": "https://example.com/",
  "ok": true,
  "status": 200,
  "checkedAt": "2026-07-10T12:00:00.000Z",
  "score": 90,
  "grade": "A",
  "scriptCount": 1,
  "validItemCount": 1,
  "schemaTypes": ["Organization"],
  "itemsMissingType": 0,
  "parseErrors": [],
  "issues": [],
  "recommendations": [],
  "error": null
}
```

### Security

This actor only fetches public HTTP and HTTPS pages. It rejects URL credentials, non-HTTP schemes, private IPv4 and IPv6 literals, localhost-style targets, and DNS resolutions to private ranges. Redirect targets are revalidated before fetching. Response size is capped to reduce accidental large downloads.

### Pricing

| Event | Price |
| --- | ---: |
| Actor start | `$0.005` |
| Page audited | `$0.01` |

Typical cost for one page audit is about `$0.015`.

### FAQ

#### Does this validate against Google Rich Results requirements?

No. It checks JSON-LD presence, parseability, detected types, missing `@type`, and common SEO readiness signals. Use Google Rich Results Test for Google-specific eligibility.

#### Does it crawl a whole website?

No. It audits one page per run. Use multiple runs or a wrapper workflow for batches.

#### Does it require login or browser automation?

No. It fetches public HTML with a simple HTTP request and does not collect credentials.

#### What is the keep metric?

Keep or improve if it receives organic Store impressions, runs, revenue, or inbound questions within 60 to 90 days. Archive it if it receives no discovery and no usage.

# Actor input Schema

## `startUrl` (type: `string`):

Public HTTP or HTTPS page URL to audit. Private IPs, localhost, and credentialed URLs are blocked.

## `timeoutSeconds` (type: `integer`):

Request timeout, clamped between 3 and 30 seconds.

## `maxHtmlBytes` (type: `integer`):

Maximum response size to read, clamped to 2 MB.

## Actor input object example

```json
{
  "startUrl": "https://example.com/",
  "timeoutSeconds": 10,
  "maxHtmlBytes": 1048576
}
```

# Actor output Schema

## `dataset` (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 = {
    "startUrl": "https://example.com/"
};

// Run the Actor and wait for it to finish
const run = await client.actor("phoenix2810/json-ld-schema-auditor").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 = { "startUrl": "https://example.com/" }

# Run the Actor and wait for it to finish
run = client.actor("phoenix2810/json-ld-schema-auditor").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 '{
  "startUrl": "https://example.com/"
}' |
apify call phoenix2810/json-ld-schema-auditor --silent --output-dataset

```

## MCP server setup

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

```

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/acts/PaNM0a0JQUvEPs98F/builds/WzrCzvKmazGO6Fucg/openapi.json
