Structured Data with JSON-LD: How Schema.org Markup Earns Rich Results
A practical guide to JSON-LD structured data: the script tag, schema.org types like Article, Product, FAQ and Organization, and why it helps SEO.
Structured Data with JSON-LD: How Schema.org Markup Earns Rich Results
A normal blue link in Google results tells a searcher almost nothing. A link with a star rating, a price, an author photo, or an expandable stack of questions tells them plenty before they ever click. The difference between those two listings is usually one small block of code: JSON-LD structured data. It does not change a single pixel of how your page looks to a human visitor. It quietly hands search engines a set of machine-readable facts they can trust, and those facts are what power the richer-looking search result.
This guide walks through what JSON-LD actually is, where the code goes, which schema.org types matter most, and why search engines reward pages that include it. If you want to skip the hand-coding, the JSON-LD Schema Generator builds valid markup from a short form, but it helps to understand what it is producing.
What JSON-LD Actually Is
JSON-LD stands for JavaScript Object Notation for Linked Data. In plain terms, it is a small JSON object that describes the meaning of a page using a shared vocabulary called schema.org. The vocabulary defines hundreds of types (an Article, a Product, a Recipe, an Organization) and the properties each type can carry (an author, a price, a rating, an address).
Here is the one technical detail that matters most: JSON-LD goes inside a <script type="application/ld+json"> tag, and the object inside it must declare two things. @context points at https://schema.org, which tells the parser which vocabulary you are using, and @type names the thing you are describing. Search engines read that script tag while crawling the page, extract the facts, and use them to decide whether the page qualifies for a rich result. Because the data lives in its own script tag, it sits apart from your visible HTML; you are not weaving microdata attributes through every <div>.
Where the Script Tag Goes
The script block belongs in the page, and you have two valid spots. The cleanest is inside the <head>, alongside your title and meta tags. It also works anywhere in the <body>, so if your template only lets you inject content into the article area, that is fine too. Google parses both.
A few practical rules keep things tidy. Use one script block per type per page as the default. If you run a CMS, most SEO plugins expose a custom-code or header-script slot where you paste the block. And if your framework wants you to inject structured data through its own head component rather than a raw tag, copy the raw JSON instead of the wrapped script tag and let the framework write the tag for you. The same place you manage your title and description tags (see the Meta Tag Generator for that side of on-page SEO) is usually where the JSON-LD lives too.
The Schema Types That Earn Rich Results
You do not need all of schema.org. A handful of types cover the vast majority of rich-result opportunities:
- Article carries a headline, author, publisher, and published and modified dates. It feeds the Article rich result and the Top Stories carousel for news and blog content.
- Product holds a name, an
Offer(price and currency), and anAggregateRating(a rating value and review count). Together they produce the price and gold review stars shoppers scan for. - FAQPage wraps a list of
QuestionandacceptedAnswerpairs. When the same questions appear visibly on the page, the listing can expand into collapsible Q and A. - Organization describes the entity behind the site (name, logo, social profiles, contact points), which helps build the knowledge panel.
Each type has required and optional properties. The required ones are what a rich snippet actually needs; leave a required field blank and the result simply will not show, even if the rest validates.
A Worked Example: Product and FAQ Markup
Say you sell a single product, the "Aurora Desk Lamp," at 29.99 USD, with a 4.5 rating from 120 reviews. The Product JSON-LD looks like this:
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "Product",
"name": "Aurora Desk Lamp",
"offers": {
"@type": "Offer",
"price": "29.99",
"priceCurrency": "USD"
},
"aggregateRating": {
"@type": "AggregateRating",
"ratingValue": "4.5",
"reviewCount": "120"
}
}
</script>
Notice that priceCurrency is the ISO code USD, not a dollar sign; a symbol there drops the whole Offer from eligibility. A short FAQ block on the same site follows the same shape, nesting each pair under mainEntity:
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "FAQPage",
"mainEntity": [{
"@type": "Question",
"name": "Does the lamp ship internationally?",
"acceptedAnswer": {
"@type": "Answer",
"text": "Yes, we ship to most countries within five business days."
}
}]
}
</script>
That nesting (Offer inside Product, Answer inside Question) is exactly the part people get wrong by hand, which is why generating it beats typing braces.
Why Search Engines Reward Structured Data
I added FAQ markup to a help page on a small site I run, expecting nothing immediate, since new pages take weeks to settle. About three weeks later the listing started showing two expandable questions under the link. The page had not moved much in ranking, but the listing now occupied more vertical space than the result above it, and the click-through climbed without my writing a single new word. That is the honest pitch for structured data: it rarely lifts rankings on its own, but it makes the result you already have far more clickable.
The mechanism is trust and clarity. Crawlers infer a lot from prose, but inference is fuzzy. Structured data states the facts plainly: this is the author, this is the price in this currency, this is the rating. Removing that ambiguity is what makes a page eligible for the enhanced display, and it also feeds Search Console's Enhancements reports, where you can see exactly which pages qualify and which have errors.
Testing Before and After You Ship
Never trust markup you have not validated. Run the page through Google's Rich Results Test and the schema.org validator. Both parse the live URL, list every type they found, and flag missing required properties or malformed values, like an Article with no author or a price with a symbol where a code belongs. Fix what they flag, then re-test until the report is clean.
One more guardrail: the data must match what users actually see. Marking up FAQ questions that never appear in the page body risks a manual action, not a rich result. Keep the structured data honest, validate it, and let it do its quiet work. To round out your technical SEO, pair this with a clean title and description from the Meta Tag Generator, and you have covered the parts of a result a searcher reads first.
Made by Toolora · Updated 2026-06-13