No. 20SEO8 min read2,161 words
Structured data for rich results: a JSON-LD guide
A developer's guide to structured data for rich results: which schema types Google still shows in 2026, how to add JSON-LD in Next.js, and how to validate it.
- Written by
- Lazy Devs
- Published
- Updated
- Sources
- Cited inline

Key takeaways ยท 05
The short version
- 01Structured data makes a page eligible for rich results only when three things line up: a type Google currently supports, valid markup with the required properties, and content that is actually visible on the page.
- 02Use JSON-LD. Google recommends it, it lives in one script tag, and in Next.js you render it from a server component with the less-than character escaped.
- 03Check Google's search gallery, not old tutorials. FAQ and HowTo rich results no longer show, and Google phased out several more types in 2025, while Product, Breadcrumb, Article, Organization, Event and Review snippets remain.
- 04Never mark up what is not on the page. Ratings without visible reviews, or self-serving reviews of your own business, can lose you rich result eligibility through a manual action.
- 05Validate every change with the Rich Results Test and the Schema Markup Validator, and add a CI test that parses your JSON-LD so a renamed field cannot silently break it.
On this page ยท 09
Structured data earns rich results when you mark up a content type Google currently supports, include its required properties in valid JSON-LD, and describe only content that is visible on the page. Get those three right and your listing becomes eligible for stars, prices, breadcrumbs or event dates. Get any of them wrong and the markup is ignored, or worse, earns a manual action.
Structured data is one of the few SEO levers where real engineering work produces a visible payoff. It is also one of the most over-promised parts of technical SEO, mostly because people copy a snippet from an old tutorial, never validate it, and assume Google rewards effort. Google rewards correctness, and it rewards markup that matches the page.
What rich results are and what they require
A rich result is Google's name for a search listing with extra visual treatment: a product price and rating, a breadcrumb trail instead of a URL, event dates, a recipe card. Google's introduction to structured data is clear that markup makes a page eligible; it does not guarantee anything.
To be eligible, you need:
- A supported type. Google's search gallery lists the features it currently shows. That list changes.
- Valid markup with the required properties for that feature, as defined in Google's documentation for it.
- Content that matches the page. Google's structured data policies say not to mark up content that is not visible to readers, and not to mark up misleading content such as fake reviews.
Google reads three formats: JSON-LD, Microdata and RDFa. Use JSON-LD. Google recommends it, it lives in a single script tag instead of being woven through your markup, and Google can read it even when it is injected by JavaScript. There is no reason to scatter itemprop attributes through your components in 2026.
The vocabulary versus the eligibility list
Schema.org defines hundreds of types and properties. That is the vocabulary. Google's rich results are a much smaller subset, each with its own required and recommended fields. You can write perfectly valid schema.org markup that earns nothing because Google does not feature that type. Always check Google's page for the specific feature you want, not just schema.org.
Which schema types still earn rich results in 2026
This is where most tutorials are out of date. Google has been removing features steadily:
- HowTo rich results were removed in 2023.
- FAQ rich results were limited to well-known government and health sites in 2023, and Google has since deprecated the FAQ rich result entirely, with the feature no longer appearing in Search from May 2026.
- In 2025, Google phased out Course Info, Claim Review, Estimated Salary, Learning Video, Special Announcement and Vehicle Listing as part of simplifying the results page, and later Practice Problem too. Book Actions was on the original list but Google kept it, which is a good reminder to check the documentation updates log rather than a summary.
Here is how we prioritize what is left for typical business sites:
| Type | Rich result | Worth it for | Watch out for |
|---|---|---|---|
Product with Offer | Price, availability, ratings | Any store or priced product page | Ratings must come from reviews visible on the page |
BreadcrumbList | Readable trail instead of a URL | Any site with hierarchy | Must match the visible breadcrumb |
Article / BlogPosting | Better title, image and date display | Blogs, news, guides | Keep dateModified honest |
Organization | Logo and details in knowledge panels | Every business site, on the homepage | Keep details consistent with your profiles |
Event | Dates and venue | Venues, conferences, ticketing | Remove or update past and cancelled events |
LocalBusiness | Hours, location, actions | Businesses with physical premises | Match your business profile exactly |
JobPosting | Jobs experience | Job boards, career pages | Remove filled roles promptly |
Review snippets | Star ratings | Sites that review other things | No self-serving reviews of your own business |
FAQPage, HowTo | None in Google any more | Not for Google rich results | Still valid vocabulary for other consumers |
Most business sites need three or four of these: Organization on the homepage, BreadcrumbList everywhere, and Product or BlogPosting depending on what you publish. Listing sites are the exception: if you are building a job board, JobPosting is what gets your roles into Google's jobs experience, so it belongs in the first version.
How to add JSON-LD in Next.js
The Next.js JSON-LD guide recommends rendering structured data as a script tag in your page or layout component. Build the object in TypeScript so you get type checking and reuse, then serialize it safely.
// app/blog/[slug]/page.tsx
import type { BlogPosting, WithContext } from "schema-dts";
import { getPost } from "@/lib/posts";
const SITE = "https://lazydevsagency.com";
function toJsonLd(data: object): string {
// Escape "<" so a value containing "</script>" cannot break out of the tag.
return JSON.stringify(data).replace(/</g, "\\u003c");
}
export default async function Page({
params,
}: {
params: Promise<{ slug: string }>;
}) {
const { slug } = await params;
const post = await getPost(slug);
const jsonLd: WithContext<BlogPosting> = {
"@context": "https://schema.org",
"@type": "BlogPosting",
headline: post.title,
description: post.excerpt,
datePublished: post.publishedAt,
dateModified: post.updatedAt ?? post.publishedAt,
image: [`${SITE}${post.coverImage}`],
author: {
"@type": "Organization",
name: "Lazy Devs",
url: `${SITE}/about`,
},
publisher: {
"@type": "Organization",
name: "Lazy Devs",
logo: { "@type": "ImageObject", url: `${SITE}/logo.png` },
},
mainEntityOfPage: `${SITE}/blog/${slug}`,
};
return (
<>
<script
type="application/ld+json"
dangerouslySetInnerHTML={{ __html: toJsonLd(jsonLd) }}
/>
<article>{/* ... */}</article>
</>
);
}A few things to call out:
schema-dtsgives you typed schema objects. The package is published by Google, so@typeautocompletes and property names are checked at compile time. It checks vocabulary, not Google's eligibility rules, so it does not replace validation.dangerouslySetInnerHTMLis correct here. You are intentionally injecting a JSON string. The danger is thatJSON.stringifydoes not escape the less-than character, so a title or user-supplied field containing a closingscripttag could break out of it. ThetoJsonLdhelper replaces it with its unicode escape, which is exactly what the Next.js docs recommend.- Derive every value from the same data the page renders. If the headline in your JSON-LD comes from a different field than the visible
h1, they will drift. - Use absolute URLs for
image,urland@idvalues.
Several entities on one page
Many pages describe more than one thing: a product with a breadcrumb trail, or an article published by an organization. Put them in one @graph and connect them with @id references instead of scattering separate, possibly contradictory blocks:
const graph = {
"@context": "https://schema.org",
"@graph": [
{
"@type": "Organization",
"@id": "https://lazydevsagency.com/#org",
name: "Lazy Devs",
url: "https://lazydevsagency.com",
logo: "https://lazydevsagency.com/logo.png",
},
{
"@type": "BreadcrumbList",
itemListElement: [
{ "@type": "ListItem", position: 1, name: "Blog", item: "https://lazydevsagency.com/blog" },
{ "@type": "ListItem", position: 2, name: "Structured data" },
],
},
],
};In Google's breadcrumb documentation, the last item can omit item, since it is the current page.
The schema types worth your time, in detail
Article and BlogPosting
For editorial content, Google's Article documentation lists only recommended properties: headline, image, datePublished, dateModified and author. Give the author a url that identifies them, such as an about page or profile. Article markup does not create a flashy card, but it helps Google show the right title, image and date, and the dates matter for freshness.
Product with offers and reviews
This is the one that earns price, availability and star ratings. Google splits product markup into product snippets for pages that review or describe products, and merchant listings for pages where you can buy them, so check which applies.
const product: WithContext<Product> = {
"@context": "https://schema.org",
"@type": "Product",
name: "Linen Overshirt",
image: ["https://example-store.com/images/linen-overshirt.webp"],
description: "Relaxed-fit overshirt in washed European linen.",
sku: "LO-221-BLU-M",
offers: {
"@type": "Offer",
price: "89.00",
priceCurrency: "USD",
availability: "https://schema.org/InStock",
url: "https://example-store.com/products/linen-overshirt",
},
};The trap: do not add an aggregateRating unless real reviews are visible on that page. Marking up ratings with no on-page source is exactly the kind of misleading markup the policies prohibit. Price and availability must also update when the page does, which means generating them from your product data, not hardcoding them.
Organization and LocalBusiness
Put Organization markup on your homepage with your logo, legal name, contact details and links to official profiles. For businesses with premises, LocalBusiness adds hours and address. Google's review snippet rules exclude self-serving reviews: you cannot mark up reviews of your own business on your own site to get stars.
BreadcrumbList
Cheap, broadly eligible and it replaces the URL in your listing with a readable trail. If your site has any hierarchy, add it, and generate it from the same route data that renders the visible breadcrumb.
Mistakes that get structured data ignored
Most broken implementations we find fail in the same few ways:
| Mistake | Consequence | Fix |
|---|---|---|
| Ratings or reviews with no visible source | Loss of eligibility, possible manual action | Only mark up reviews shown on the page |
| Implementing FAQ or HowTo for rich results | Nothing shows | Check the current search gallery first |
Hardcoded or stale dateModified | Lost freshness signal, misleading dates | Derive it from your content source |
| Duplicate or contradictory blocks from plugins and code | Parser confusion | One source of truth, one @graph |
Unescaped JSON.stringify output | Broken markup, XSS risk | Escape the less-than character |
Relative URLs in image and url | Values misread or rejected by some consumers | Always use absolute URLs |
| Markup only in client-rendered code paths | Inconsistent pickup | Render it on the server |
| Prices that differ from the page | Merchant and snippet errors | Generate from the same product data |
That duplicate row deserves a note. When we take over a site, especially one moving from WordPress to Next.js, we often find two or three SEO plugins and a theme all emitting their own JSON-LD for the same page. Pick one source of truth.
A structured data manual action, per Google's policies, removes the page's eligibility for rich results; it does not affect normal ranking. Check the Manual Actions report in Search Console if rich results disappear suddenly.
How to validate structured data, by hand and in CI
Every change needs two checks, because they answer different questions:
- Rich Results Test: is this page eligible for a Google rich result, and are the required properties present?
- Schema Markup Validator: is this valid schema.org vocabulary, regardless of Google?
After launch, watch the enhancement reports in Search Console. They show errors across every page of a type, not just the one you tested.
A validation test you can automate
You do not have to validate by hand on every release. Fetch the rendered HTML in a test and assert that the JSON-LD parses and carries the fields you expect:
import { expect, test } from "vitest";
const BASE = process.env.TEST_BASE_URL ?? "http://localhost:3000";
test("blog post emits valid BlogPosting JSON-LD", async () => {
const html = await fetch(`${BASE}/blog/structured-data-that-earns-rich-results`)
.then((res) => res.text());
const blocks = [...html.matchAll(
/<script type="application\/ld\+json">(.*?)<\/script>/gs,
)].map((m) => JSON.parse(m[1]));
const post = blocks.find((b) => b["@type"] === "BlogPosting");
expect(post).toBeDefined();
expect(post.headline).toBeTruthy();
expect(post.author?.name).toBeTruthy();
expect(Number.isNaN(Date.parse(post.datePublished))).toBe(false);
});Run it against a preview deployment or a locally started production build. It catches the regressions that silently kill rich results: a renamed field, a null author, a malformed date. It is the kind of cheap, high-value test we argue for in a testing strategy that pays off.
Structured data, AI answers and what to expect
Structured data also helps any system that parses it understand who published a page, what it describes and when it changed. That can include AI search features, but no AI answer product publishes a guarantee that it reads schema.org markup, so treat it as a side benefit rather than a strategy. What reliably helps both search and AI answers is clear visible content: direct answers, descriptive headings and accurate dates, which is also why we pair structured data with fast pages from our Core Web Vitals checklist.
If your content lives in a CMS, the fields that feed your structured data (prices, dates, authors, ratings) need to be real, validated fields that editors fill in, not free text. We cover how to model that in headless CMS for marketing teams.
Make rich results routine, not luck
Structured data pays off when the markup is honest and the type is one Google still features. Start with Organization, BreadcrumbList, and Product or BlogPosting, build the objects in typed TypeScript, escape them safely, generate every value from the data the page renders, and validate each change with the Rich Results Test and a CI assertion. Skip the types Google no longer shows, never describe content that is not on the page, and keep your dates honest.
We set this up as part of our Next.js development and SEO work, and we audit existing schema setups regularly. If you want a second pair of eyes on yours, tell us about your site.
FAQ ยท 05 questions
Frequently asked questions
Does structured data improve Google rankings?
Not directly. Google says structured data helps it understand a page and can make the page eligible for rich results, but it is not a general ranking boost. The practical benefit is a more prominent, more informative listing, which can earn more clicks for the same position.
Why is my structured data valid but no rich result shows?
Valid markup only makes a page eligible. Google does not guarantee rich results, and it may skip them because the type is no longer supported, required properties are missing, the marked-up content is not visible on the page, or its systems decide a plain result is better for that query. Check the Search Console enhancement reports and the Manual Actions report.
Do FAQ rich results still work?
No. Google limited FAQ rich results to well-known government and health sites in 2023 and then deprecated the feature entirely in 2026. FAQPage markup is still valid schema.org vocabulary that other consumers can read, but it will not produce an FAQ accordion in Google Search.
Should I use JSON-LD, Microdata or RDFa?
Use JSON-LD. Google supports all three, but recommends JSON-LD because it is easiest to implement and maintain. It sits in a single script tag rather than being woven through your HTML, and Google can read it even when it is injected by JavaScript.
Does structured data help with AI search and answer engines?
It can help any system that parses it understand who published a page, what it is about and when it was updated. No AI search product publishes a guarantee that it uses schema.org markup, so treat that as a side benefit. Clear, well-structured visible content matters more.