Back to blog

Schema Markup for AI Search and Agents: The JSON-LD You Actually Need

•AgentReady Team | MagicMakersLab

Structured data used to be an SEO bonus for rich results. For AI search and browser agents it is closer to a requirement: an agent that parses your page programmatically will trust whatever structured facts it finds, including wrong ones. This guide covers the schema types worth shipping, how to write them, and the mistakes that quietly cost you.

Why accuracy beats volume

A search engine can fall back to visible text when JSON-LD is slightly broken. An agent comparing prices or checking availability is more likely to take the markup at face value. A stale price or an InStock flag on a sold-out item is not harmless anymore. Ship fewer types, keep them correct, and generate them from the same data that renders the page.

The essential types

Organization and WebSite (homepage)

{
  "@context": "https://schema.org",
  "@type": "Organization",
  "name": "Acme Analytics",
  "url": "https://acme.example",
  "logo": "https://acme.example/logo.png",
  "sameAs": [
    "https://www.linkedin.com/company/acme-analytics",
    "https://github.com/acme-analytics"
  ]
}

Pair it with a WebSite object including the site name and URL. If you have an on-site search, a SearchAction describes how to query it.

Article (blog and guides)

{
  "@context": "https://schema.org",
  "@type": "Article",
  "headline": "What Is llms.txt?",
  "datePublished": "2026-10-12",
  "dateModified": "2026-10-12",
  "author": { "@type": "Organization", "name": "Acme Team" },
  "image": "https://acme.example/og/llms-txt.png",
  "mainEntityOfPage": "https://acme.example/blog/what-is-llms-txt"
}

Keep dateModified honest. Update it when the content changes materially, not on every deploy.

Product and Offer (commerce)

{
  "@context": "https://schema.org",
  "@type": "Product",
  "name": "Trail Running Shoe",
  "sku": "TRS-042",
  "offers": {
    "@type": "Offer",
    "price": "129.00",
    "priceCurrency": "USD",
    "availability": "https://schema.org/InStock",
    "url": "https://acme.example/p/trs-042"
  }
}

Generate this from your catalog at render time so price and availability can never drift from the page.

FAQPage (only when the Q&A is visible)

Mark up questions that appear on the page as visible text. Markup for content users cannot see violates search engine guidelines and erodes trust. Note that Google limits FAQ rich results to a small set of authoritative sites, but the markup still gives other parsers clean question and answer pairs.

BreadcrumbList

Describes where a page sits in your hierarchy. It improves how your URL appears in results and helps agents understand site structure.

Implementation tips for Next.js and React

  • Render JSON-LD on the server so it exists in the initial HTML, not only after hydration.
  • Serialize with JSON.stringify and escape < as \u003c to prevent script injection.
  • Keep one source of truth. The same object that renders the price should produce the Offer.
  • Use the @id property to link entities (for example, the Article's publisher to your Organization).

Common mistakes

  • Copying a template with another company's name or URLs.
  • Marking up reviews or ratings you do not display.
  • Duplicate or conflicting blocks from a theme plus a plugin.
  • Relative URLs where absolute URLs are expected.
  • Invalid date formats. Use ISO 8601.

Validate and monitor

  1. Run each template through Google's Rich Results Test and the Schema Markup Validator.
  2. View the rendered page source and confirm the JSON-LD is present without JavaScript.
  3. Compare values against the visible page. Mismatches are the failure to look for.
  4. Re-scan with AgentReady after redesigns. Structured data is one of the pillars of the Agent Readiness Score.

Structured data is the read layer; WebMCP is the action layer

Schema tells an agent what things are. WebMCP tells it what it can do. For a complete picture, work through our AI readiness checklist.

Frequently asked questions

Does schema markup help with AI search?

It helps machines identify what a page is and its key facts without guessing. Search engines use structured data for rich results and entity understanding, and it is a reliable way to make facts unambiguous to any system that parses your page. No AI vendor guarantees citations because of it.

Which schema types should every site have?

Organization and WebSite on the homepage, BreadcrumbList on deeper pages, Article on editorial content, and Product with Offer on commerce pages. Add FAQPage only where the questions and answers are visible on the page.

JSON-LD, Microdata or RDFa?

Use JSON-LD. It is the format Google recommends, it is easy to generate from your data, and it keeps markup separate from your HTML.

How do I validate structured data?

Use Google's Rich Results Test and the Schema Markup Validator for syntax and eligibility, then compare the JSON-LD against the visible page to confirm it matches. An AgentReady scan also flags missing or mismatched markup.

Is Your Website Ready for WebMCP?

Test your site to see your AI Readiness Score and understand exactly what you need to fix.

Check Your AI Readiness Score