Validating Structured Data (JSON-LD) for Rich Results
What is Structured Data?
Structured data is machine-readable metadata embedded in a page's HTML. Search engines use it to understand page content and generate rich results: star ratings, FAQs, recipe cards, product prices, event dates.
JSON-LD (JavaScript Object Notation for Linked Data) is Google's preferred format,
placed in a <script type="application/ld+json"> tag.
A Basic Example
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "Product",
"name": "Widget Pro",
"description": "The best widget for professionals.",
"offers": {
"@type": "Offer",
"price": "49.99",
"priceCurrency": "USD",
"availability": "https://schema.org/InStock"
}
}
</script>
Validating via API
curl -X POST https://api.toolkitapi.io/v1/seo/validate-schema \
-H "X-API-Key: $API_KEY" \
-d '{"url": "https://example.com/products/widget-pro/"}'
{
"schemas_found": 2,
"schemas": [
{
"type": "Product",
"valid": true,
"warnings": [],
"errors": []
},
{
"type": "BreadcrumbList",
"valid": false,
"errors": ["Required property 'item' missing from ListItem"]
}
],
"rich_result_eligible": ["Product"]
}
Most Valuable Schema Types
| Type | Rich result |
|---|---|
Product |
Price, availability, reviews |
Article / BlogPosting |
Author, publish date |
FAQPage |
Expandable Q&A in SERPs |
HowTo |
Step-by-step instructions |
LocalBusiness |
Maps integration, hours |
BreadcrumbList |
Breadcrumb trail in results |
Testing in Google Search Console
After deploying structured data, use Google's Rich Results Test to verify the markup is parsed correctly. The API audit gives you the same validation locally without waiting for Googlebot to re-crawl.