Validate Specific Schema Type
Ensure pages contain a specific JSON-LD @type (e.g. BreadcrumbList, Product).
The Problem
Having some JSON-LD isn’t enough — you need the right types. A product page without Product schema won’t get rich results. A category page without BreadcrumbList loses navigation context in search. This assertion checks that a specific @type exists in at least one JSON-LD block, catching template regressions where the wrong schema type is rendered.
The Hard Way
Parse each page’s <script type="application/ld+json"> blocks, decode the JSON, and check the @type field. For nested schemas with @graph, you need to walk the tree. At pSEO scale, this requires a custom crawler.
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_type", "value": "BreadcrumbList"}]}| Parameter | Type | Example |
|---|---|---|
value | string (@type name) | BreadcrumbList |
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
has_schema
Ensure every page has valid JSON-LD schema markup for rich results.
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.