JSON-LD
JSON-LD is a structured data format that helps search engines and answer engines understand your content and entities via Schema.org.
Definition
JSON-LD (JavaScript Object Notation for Linked Data) is a way to embed structured data in JSON format. It’s commonly used for Schema.org markup (Organization, WebSite, Article, FAQPage, etc.) to describe entities and relationships.
Why it matters
- Improves content understanding and eligibility for rich results
- Makes information easier to extract and cite for AEO
- More maintainable than microdata (separate from HTML structure)
- Google explicitly prefers JSON-LD format
- Can describe off-page entities (authors, organizations)
- Supports nested structures and entity relationships (@id references)
- Easy to generate programmatically, ideal for pSEO
How to implement
- Place JSON-LD in <script type="application/ld+json">
- Ensure markup matches visible content (especially FAQ/HowTo)
- Validate with tools (Schema Validator / Google Rich Results Test)
- Avoid adding unrelated schema just to 'add more'
- Use @id to create entity references and relationships
- Prioritize schema types that Google supports
- Keep JSON syntax correct (commas, quotes, escaping)
Examples
html
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "Organization",
"@id": "https://example.com/#organization",
"name": "Developer SEO Hub",
"url": "https://example.com",
"logo": "https://example.com/logo.png",
"sameAs": [
"https://twitter.com/devseo",
"https://github.com/devseo"
]
}
</script>typescript
// Dynamic Article JSON-LD generation
interface ArticleSchema {
title: string;
description: string;
author: string;
publishDate: string;
url: string;
}
function generateArticleJsonLd(article: ArticleSchema): string {
const schema = {
'@context': 'https://schema.org',
'@type': 'Article',
headline: article.title,
description: article.description,
author: {
'@type': 'Person',
name: article.author
},
datePublished: article.publishDate,
mainEntityOfPage: article.url
};
return JSON.stringify(schema);
}Related
Tutorials
FAQ
Common questions about this term.