Structured Data JSON-LD: How to Add Schema Markup — Guide
structured data json-ld: Learn what structured data and JSON-LD do, how to add schema markup, and why valid markup does not guarantee a rich result.

Structured data is machine-readable information that describes entities and relationships on a webpage. JSON-LD is a common way to place that data in a script element without changing the visible page layout. Search engines may use eligible markup to understand a page, but markup alone does not guarantee a rich result or higher ranking. Add only facts users can also find on the page, validate the JSON syntax, and follow the current policies of each search engine.
Choose a schema type that matches the page
Use a type from Schema.org that accurately describes the page, such as Article, Product, Event, or LocalBusiness. Do not choose a type only because it appears to offer a search feature. Required and recommended properties differ by type and search feature, and eligibility rules can change. Represent real values from the page, including the correct name, dates, prices, and availability. Avoid inventing reviews or ratings to fill optional properties.
Add JSON-LD without changing visible content
Place a script with type application/ld+json in the document head or body. The value must be valid JSON: use double quotes, escape special characters, and do not include comments or trailing commas. Connect nested entities with stable identifiers when useful. Keep the markup synchronized with what a visitor can see; if the offer, date, or product changes, update structured data as part of the same publishing workflow.
Validate syntax and search eligibility separately
A JSON parser checks syntax, while a search engine’s rich-results test checks support for specific search features. Search Console can later report detected data and issues for crawled pages. These are separate checks: a document can be syntactically valid but not eligible for a rich result. Correct errors, request recrawling where appropriate, and monitor changes. Never promise rankings based on markup alone; usefulness, content quality, and search policies still matter.
Worked example
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "Article",
"headline": "A practical guide"
}
</script>Does JSON-LD guarantee a Google rich result?
No. Valid structured data can make a page eligible for supported features, but Google decides whether and when to show them.


