Introduction
Structured data tells search engines exactly what your content is about. Instead of guessing from HTML, they can reliably extract product prices, article authors, FAQ answers, and more.
The payoff is rich snippets — enhanced search results with ratings, prices, and answers. Pages with rich snippets see 20-30% higher click-through rates.
This guide covers the most impactful structured data types with JSON-LD, Google's recommended format.
Key Concepts
JSON-LD Format
{
"@context": "https://schema.org",
"@type": "Article",
"headline": "How to Implement Structured Data",
"author": { "@type": "Person", "name": "Jane Developer" },
"datePublished": "2024-01-15",
"image": "https://example.com/article-image.jpg"
}
Practical Examples
1. Product Schema
{
"@context": "https://schema.org",
"@type": "Product",
"name": "Premium Headphones",
"offers": {
"@type": "Offer",
"price": "199.99",
"priceCurrency": "USD",
"availability": "https://schema.org/InStock"
},
"aggregateRating": {
"@type": "AggregateRating",
"ratingValue": "4.5",
"reviewCount": "127"
}
}
2. FAQ Schema
{
"@context": "https://schema.org",
"@type": "FAQPage",
"mainEntity": [{
"@type": "Question",
"name": "What is structured data?",
"acceptedAnswer": {
"@type": "Answer",
"text": "Structured data is a standardized format for providing page information."
}
}]
}
3. Dynamic JSON-LD in Next.js
export function JsonLd({ data }) {
return <script type="application/ld+json"
dangerouslySetInnerHTML={{ __html: JSON.stringify(data) }} />;
}
// Usage
const jsonLd = {
'@context': 'https://schema.org',
'@type': 'Article',
headline: post.title,
datePublished: post.publishedAt,
};
<JsonLd data={jsonLd} />
Best Practices
- ✅ Use JSON-LD format (Google's recommendation)
- ✅ Test with Google's Rich Results Test before deploying
- ✅ Include all required properties for each schema type
- ✅ Keep structured data matching visible page content
- ✅ Generate JSON-LD dynamically from CMS data
- ❌ Don't add structured data for invisible content
Common Pitfalls
- 🚫 Mismatched data — prices differing from visible content
- 🚫 Missing required fields
- 🚫 Self-serving reviews without real user ratings
- 🚫 Not validating JSON syntax