Validate JSON-LD Structured Data

Ensure every page has valid JSON-LD schema markup for rich results.

The Problem

Structured data (JSON-LD) powers rich results in Google, AI answer citations, and knowledge graph entries. Missing or broken schema means you’re invisible in the features that drive the highest CTR. For pSEO sites, a single broken template can eliminate rich results from thousands of pages overnight.

The Hard Way

Google’s Rich Results Test checks one URL at a time. For programmatic pages, you’d need to fetch each page, parse the <script type="application/ld+json"> blocks, validate the JSON, and check for @type. SEODiff does this across all your URLs in one API call and reports exactly which pages have parse errors.

The SEODiff Way

One API call. Results in under 2 seconds.

POST https://seodiff.io/api/v1/agent/evaluate

{"urls": ["https://example.com/product/widget-a"], "assertions": [{"rule": "has_schema"}]}

Code Examples

Copy-paste examples in your preferred language:

cURL

See the full evaluation example in cURL →

Python

See the full evaluation example in Python →

Node.js

See the full evaluation example in Node.js →

Go

See the full evaluation example in Go →

PHP

See the full evaluation example in PHP →

Related Assertions

min_schema_count

Require a minimum number of JSON-LD schema blocks per page.

selector_exists

Verify critical DOM elements are present on every page.

Use in CI/CD

Add this assertion to your deployment pipeline. Works with any CI platform:

🐙 GitHub Actions

Block bad deployments with automated SEO checks in your GitHub Actions CI/CD pipeline.

🦊 GitLab CI

Add automated SEO quality gates to your GitLab CI/CD pipelines.

▲ Vercel

Automatically validate SEO on every Vercel preview deployment before promoting to production.

Start testing in 30 seconds

Get an API key and run your first evaluation with a single cURL command.

Get API Key or Read full API docs