JSON-LD ("JSON for Linking Data") is how a page tells machines what it is about: this is an Article, written by this Person, published by this Organization on this date. You write it once in a <script type="application/ld+json"> tag, and crawlers read it.
The four keywords
{
"@context": "https://schema.org",
"@type": "Article",
"@id": "https://example.com/blog/post#article",
"headline": "The JSON Schema Guide"
}
- @context: the vocabulary. Almost always
https://schema.org. - @type: what the thing is:
Article,Product,Organization,Event,Recipeand so on. - @id: a stable URI for the entity, so other nodes can reference it.
- @graph: an array of several entities in one block.
Article
{
"@context": "https://schema.org",
"@type": "Article",
"headline": "The JSON Schema 2020-12 Guide",
"image": ["https://example.com/cover.png"],
"datePublished": "2026-11-21T09:00:00+00:00",
"dateModified": "2026-11-21T09:00:00+00:00",
"author": { "@type": "Person", "name": "Jane Doe", "url": "https://example.com/authors/jane" }
}
Product with an Offer
{
"@context": "https://schema.org",
"@type": "Product",
"name": "Trail Runner 3",
"image": "https://example.com/shoe.png",
"brand": { "@type": "Brand", "name": "Acme" },
"offers": {
"@type": "Offer",
"price": "129.00",
"priceCurrency": "USD",
"availability": "https://schema.org/InStock"
}
}
FAQPage
{
"@context": "https://schema.org",
"@type": "FAQPage",
"mainEntity": [{
"@type": "Question",
"name": "Does tsconfig.json allow comments?",
"acceptedAnswer": { "@type": "Answer", "text": "Yes, it is parsed as JSONC." }
}]
}
Linking entities with @graph
Rather than repeating your Organization on every node, define it once with an @id and reference it:
{
"@context": "https://schema.org",
"@graph": [
{ "@type": "Organization", "@id": "https://example.com/#org", "name": "Example Inc." },
{ "@type": "Article", "headline": "...", "publisher": { "@id": "https://example.com/#org" } }
]
}
Mistakes that cost you rich results
- Markup that doesn't match the page. Prices, ratings and FAQs must be visible to users too.
- Dates without a timezone. Use full ISO 8601:
2026-11-21T09:00:00+00:00. - Relative URLs. Use absolute URLs for
image,urland@id. - Invalid JSON. One trailing comma and the whole block is ignored, silently.
Security notes
- When you render JSON-LD server-side, escape
</(for example as\u003c/). A user-supplied value containing</script>can otherwise break out of the tag and cause XSS. - Structured data is public and crawled. Never put private fields in it.
Open the JSON-LD template and ask the workspace to "convert this to a Product with an Offer" or "add an FAQPage node to the @graph", then validate the diff.