Schema markup for AI search: which JSON-LD actually matters
Short answer: For AI search, three JSON-LD types do almost all the work: Organization (who you are, so models attribute facts to the right entity), Product with an Offer (so an agent can read price, currency, and availability as data, not pixels), and FAQPage (so question-shaped content maps cleanly onto the questions users ask assistants). Everything else is optional polish. Structured data won't make a model cite you, but it removes ambiguity about your facts — and ambiguity is what gets you misquoted or skipped. Below: what each type buys you, copy-paste Next.js App Router examples, and what to ignore.
Why JSON-LD helps AI engines at all
AI engines don't read your page the way a browser renders it; they extract facts from it. When your price is plain text and your company name is "Acme" in the header but "Acme Inc." in the footer and "ACME Software LLC" in the about page, a model has to guess which is canonical — and it guesses wrong sometimes, which is how hallucinated facts about your product happen. JSON-LD is a small, unambiguous block of machine-readable facts that says "here is the authoritative version." It uses the schema.org vocabulary in a <script type="application/ld+json"> tag, separate from your visible markup.
Two ground rules from Google's structured data guidelines that apply equally to AI engines:
- The structured data must match the visible content. Marking up a price you don't show, or an FAQ that isn't on the page, is the fastest way to get distrusted (and, on Google, manually penalized).
- Use the most specific type that fits, and fill the properties that carry real information. A skeleton
Organizationwith only a name is barely worth the bytes.
The three that matter
Organization — anchor your identity
Organization tells engines who you are and stitches your brand to a single canonical entity (with sameAs links to your profiles). Put it once, site-wide (in your root layout), with a stable @id so other schema can reference it.
{
"@context": "https://schema.org",
"@type": "Organization",
"@id": "https://echoranked.com/#organization",
"name": "EchoRanked",
"url": "https://echoranked.com",
"logo": "https://echoranked.com/logo.png",
"description": "AI-readiness scanning that runs real agents against your site and names the fixes, reported with confidence bands.",
"sameAs": [
"https://twitter.com/echoranked",
"https://www.linkedin.com/company/echoranked"
]
}Product + Offer — make price machine-readable
This is the highest-leverage type for anyone selling something, and the direct fix for the "agent can't parse the price" failure in can an AI agent buy from your website. The Offer carries the facts an agent needs to transact: price, priceCurrency, availability.
{
"@context": "https://schema.org",
"@type": "Product",
"name": "EchoRanked Pro",
"description": "Daily scans, five engines, the content agent, and hallucination watch.",
"brand": { "@id": "https://echoranked.com/#organization" },
"offers": {
"@type": "Offer",
"price": "99.00",
"priceCurrency": "USD",
"availability": "https://schema.org/InStock",
"url": "https://echoranked.com/pricing"
}
}Match the visible price exactly, and keep availability honest — stale InStock markup on a sold-out item erodes trust fast.
FAQPage — map onto how people ask assistants
People query assistants in questions. FAQPage markup turns your Q&A content into clean question/answer pairs an engine can lift directly. It only applies to genuine FAQ content that's actually visible on the page — don't wrap your whole blog post in it.
{
"@context": "https://schema.org",
"@type": "FAQPage",
"mainEntity": [
{
"@type": "Question",
"name": "Does EchoRanked publish content automatically?",
"acceptedAnswer": {
"@type": "Answer",
"text": "No. EchoRanked drafts content but never publishes. A human review and approval is always required."
}
}
]
}This is exactly the structure the FAQ section at the bottom of every post on this blog is built to feed.
Diagram — three blocks, one knowledge graph: Show a page with three labeled JSON-LD blocks (Organization, Product, FAQPage) on the left. Arrows carry their facts into a small "entity card" on the right — company name + logo (from Organization), price + availability (from Product/Offer), and a question/answer pair (from FAQPage) — which an AI engine assembles into a confident, correctly-attributed answer. A dotted line shows the alternative path without JSON-LD: the engine scraping ambiguous HTML and producing a hedged or wrong answer. The point: three small blocks resolve the ambiguity that causes misattribution.
Copy-paste: rendering JSON-LD in Next.js App Router
The cleanest pattern in the App Router is a tiny server component that serializes an object into a script tag. Build the object on the server, stringify it, and inject it with dangerouslySetInnerHTML (safe here because you control the data, but never interpolate untrusted user input into it).
// components/json-ld.tsx — a reusable server component
export function JsonLd({ data }: { data: Record<string, unknown> }) {
return (
<script
type="application/ld+json"
// JSON.stringify escapes the data; this is the documented Next.js pattern.
dangerouslySetInnerHTML={{ __html: JSON.stringify(data) }}
/>
);
}Use it in a layout (for Organization, site-wide) or a page (for Product/FAQPage):
// app/pricing/page.tsx
import { JsonLd } from "@/components/json-ld";
const productLd = {
"@context": "https://schema.org",
"@type": "Product",
name: "EchoRanked Pro",
brand: { "@id": "https://echoranked.com/#organization" },
offers: {
"@type": "Offer",
price: "99.00",
priceCurrency: "USD",
availability: "https://schema.org/InStock",
url: "https://echoranked.com/pricing",
},
};
export default function PricingPage() {
return (
<>
<JsonLd data={productLd} />
{/* ...the visible pricing page, showing the same $99 price... */}
</>
);
}A few practical notes:
- Render it server-side. JSON-LD injected by client JavaScript may be missed by crawlers that don't execute scripts — the same rendering trap covered elsewhere. App Router server components emit it in the initial HTML, which is what you want.
- One entity, one
@id. Reference yourOrganizationby@idfromProduct.brandand elsewhere so engines connect the dots instead of inferring separate entities. - Validate it. Run every page through Google's Rich Results Test and the Schema Markup Validator before shipping. A schema with a syntax error is worse than none — it signals carelessness on the exact facts you most want trusted.
What to skip
Schema.org has hundreds of types. For AI search, most are noise:
WebSite/WebPage/BreadcrumbList— fine to have, but low marginal value for AI answers; don't agonize over them.Speakable,SiteNavigationElement, niche e-commerce extensions — situational; ignore unless you have a specific reason.- Anything you can't keep accurate. Markup that drifts from your visible content is a liability. Three well-maintained types beat twenty stale ones every time.
Structured data is one half of being legible to models; the curated-map half is llms.txt. Together they answer the two questions an engine has about you: what are your authoritative facts (JSON-LD) and which pages should I read (llms.txt). EchoRanked generates and validates both as part of a fix PR, then re-measures with confidence bands so you can tell whether it actually moved anything.
Frequently asked questions
Does JSON-LD directly improve my AI search rankings?
Not directly. Structured data doesn't force a model to cite you; it removes ambiguity about your facts so that when you are surfaced, you're attributed and quoted correctly. That reduces hallucinated claims about your product and makes prices and answers machine-readable — which is why it's worth doing even though it's not a ranking lever.
Which schema types matter most for AI search?
Three: Organization (canonical identity), Product with Offer (machine-readable price, currency, and availability), and FAQPage (question/answer pairs that map onto how people query assistants). Done well and kept consistent with your visible content, these three cover almost all the value. Most other schema types are optional.
Where should JSON-LD go in a Next.js app, and does it need to be server-rendered?
Render it server-side via a small component that serializes your data into a <script type="application/ld+json"> tag, placed in a layout (for site-wide Organization) or a page (for Product/FAQPage). Server rendering matters because crawlers that don't execute JavaScript would miss client-injected schema. Validate every page with Google's Rich Results Test before shipping.
Where to go next
Pair your structured data with a curated llms.txt so engines know both your facts and your best pages — then measure the result honestly with confidence intervals, not a single score.
Keep reading
Can an AI agent actually buy from your website? We tested it.
We pointed a real browser agent at storefronts and gave it four buyer tasks: find a product, parse the price, choose between options, and start checkout. Here's where agents fail most — JS-only forms, unparseable pricing, login walls — and how to fix each.
Why your AI visibility score is probably noise
Most AI visibility tools hand you one number. But LLM answers vary run to run, so a single score is a sample, not a measurement. Here's why bare numbers mislead, what run-to-run variance actually looks like, and how a confidence interval fixes it.
GPTBot, ClaudeBot, PerplexityBot: the complete AI crawler list (and how to verify them)
A dated, verifiable reference for AI crawler user agents — OpenAI, Anthropic, Perplexity, Google, Apple, and the rest — with each operator's official IP-range source, robots.txt token, and a warning about user-agent spoofing. Reviewed monthly.