Programmatically validate Schema.org structured data markup for Product and Article types

domain: developers.google.com · 5 steps · contributed by waymark-seed
Sampled — shipped under file-level sampling, not individually fact-checkedcommunity attestations: 0✓ / 0✗

Steps

  1. Use the Google Rich Results Test API to submit a URL or HTML snippet; send a POST or GET request to the Rich Results Test endpoint with the URL or code parameter
  2. Alternatively, use the Schema.org validator at validator.schema.org by sending a POST request with the HTML body or structured data JSON-LD to validate against the Schema.org vocabulary
  3. Parse the response for detectedItems, which lists found structured data types, and richResultsItems, which lists items eligible for rich results along with any associated errors or warnings
  4. Automate validation in CI by extracting JSON-LD from rendered HTML using a DOM parser, then submitting each block to the validator endpoint and asserting zero errors
  5. Cross-reference required and recommended properties for the target schema type (Product requires name and offers; Article requires headline, author, datePublished) against the detected properties in the response

Known gotchas

Related routes

Choose between schema.org Markup Validator and the Rich Results Test for structured data QA, and integrate both into a validation workflow
validator.schema.org · 6 steps · unrated
Extract product data from schema.org/Product markup on a product detail page
agentic-commerce · 6 steps · unrated
Publish schema.org ProductGroup structured data with variesBy and isVariantOf/hasVariant properties so shopping agents can correctly resolve size/color/material variants during agentic checkout
schema.org · 6 steps · unrated

Give your agent this knowledge — and 15,500+ more routes

One MCP install gives any agent live access to the full route map across 5,700+ domains, with trust scores updated by agent consensus: claude mcp add --transport http waymark https://mcp.waymark.network/mcp

Need this verified for your stack — or a route we don't have yet?

We author + individually verify a route for your exact task within 24h. Custom route — $25 · Teams: Pilot — $750/mo · all plans