How to add schema.org structured data for AI search
Updated
What schema.org JSON-LD is, which types small businesses should add, a copy-paste example, where to put it in the HTML, and how to validate it.
Structured data is a standardized way to label the facts already on a page: the business name, the address, the product, the price, the author. AI tools can read your sentences, but a sentence can be ambiguous. Is "$19" your price, an example, or someone else's? Structured data states which fact is which.
What JSON-LD is
JSON-LD (JSON for Linked Data) writes those facts as JSON inside a <script type="application/ld+json"> tag. The vocabulary for this markup is schema.org. The same vocabulary can be written as Microdata or RDFa attributes in the HTML. Google's introduction to structured data recommends JSON-LD when your setup allows it, because the data sits beside the visible text instead of being woven through the tags, and because it is easier to keep valid.
Which types matter for a small business
Use the most specific type that is true, on the page that shows those facts. Google's structured data guidelines say not to mark up anything a visitor cannot see. These six cover most small-business sites:
- Organization. Your name, URL, logo and official profiles (
sameAs). Use it on the homepage of an online business that people do not visit in person. - LocalBusiness. A more specific Organization for a business with a location or a phone number. Add
address,telephoneand, if you publish them,openingHours. Use a subtype such asPlumberorRestaurantwhen one fits. - Product and Offer. What you sell, and the price. Put
priceandpriceCurrencyon the Offer, and attach that Offer to the Product. Use this on the product or pricing page, not on every page of the site. - FAQPage. Each question paired with the answer a person can read on the page. Google stopped showing FAQ rich results in May 2026, so this will not produce an FAQ box in Google Search. It still gives any parser the question and the answer as a pair.
- Article. A guide or post:
headline,datePublishedandauthor. Put it on the article, not the homepage. - BreadcrumbList. The path from the homepage to this page, such as Home, then Guides, then this article. It tells a crawler where the page sits.
Copy-paste example
A local-business homepage. Replace every value, and delete any property you do not publish on the page.
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "LocalBusiness",
"name": "Acme Plumbing",
"url": "https://acme.example/",
"telephone": "+1-555-0100",
"image": "https://acme.example/logo.png",
"address": {
"@type": "PostalAddress",
"streetAddress": "12 Main Street",
"addressLocality": "Springfield",
"addressRegion": "IL",
"postalCode": "62701",
"addressCountry": "US"
},
"openingHours": "Mo-Fr 08:00-17:00"
}
</script>
One page, one main type. A pricing page should describe the Product and its Offer. A guide should describe the Article. When a page genuinely contains several of these, put them in one script as an @graph array. This site's homepage does that for the organization, the report and the FAQ.
Put it in the HTML the server sends
The script has to be in the HTML response, not added later by client-side JavaScript. AI crawlers generally fetch the HTML and do not run your JavaScript (see how AI search reads JavaScript sites). Google is the exception it documents: its structured data introduction says Google can read JSON-LD that JavaScript injects into the page. A crawler that never executes JavaScript cannot.
Place the tag in the <head> or at the end of <body>, in the server-rendered or static template. Then confirm it is really in the response:
curl -s https://yoursite.com | grep ld+json
If that prints nothing, the JSON-LD is not in the initial HTML.
How to validate it
- Google's Rich Results Test fetches a URL, or the code you paste, and reports whether the markup is valid for rich results Google still supports. No rich-result preview for a type Google does not display is a normal result, not a failed test.
- The Schema Markup Validator checks the schema.org vocabulary, including types that are not Google rich results.
- Invalid JSON, such as a missing comma, a trailing comma or a smart quote, makes the whole block unreadable. Check that the JSON parses before you worry about the vocabulary.
What it does and doesn't do
Structured data helps a machine copy a fact instead of guessing it: which string is the business name, which number is the price, who wrote the article. It does not guarantee that ChatGPT, Claude, Perplexity or Google will cite you. Google's guidelines say the same about its own search results: correct markup does not guarantee that the structured data will be shown, even when the Rich Results Test reports no errors. The page still has to be allowed in robots.txt and readable as HTML. How to make your website visible to ChatGPT covers those steps.
BotVisible's free scan checks whether the raw HTML includes schema.org JSON-LD for an organization and for a product, service or article.