JSON-LD implementation: the format AI systems prefer

Home / Everything About / Everything About GEO / JSON-LD implementation: the format AI systems prefer

Schema markup tells machines what your content means. But the format you use matters. You can write schema markup in three different languages: Microdata, RDFa, and JSON-LD. Most of the web uses Microdata because it is old and easy. AI systems prefer JSON-LD because it is clean, structured, and unambiguous.

JSON-LD stands for JSON for Linking Data. It is a format that was invented specifically to make structured data readable by machines without cluttering your HTML. You write it in a separate script tag. Your visible content stays clean. The machine-readable data sits in its own block. AI crawlers parse JSON-LD faster and more reliably than other formats. If you want your content to be citable to AI systems, JSON-LD is how you make that happen.

Why JSON-LD beats other schema formats

Microdata looks like this. You add attributes directly to your HTML tags:

<div itemscope itemtype="https://schema.org/Article">
<h1 itemprop="headline">Article Title</h1>
<p itemprop="description">Article summary.


</div>

It works. Google reads it. But your HTML becomes cluttered with schema attributes. The content and the metadata are tangled together.

JSON-LD separates them completely:

<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "Article",
"headline": "Article Title",
"description": "Article summary"
}
</script>

Your HTML stays clean. The machine-readable data is in its own script tag. AI crawlers prefer this separation. It is clearer. It is less likely to have errors. It parses faster.

RDFa is a third format, but it is rarely used. It is more complex than both Microdata and JSON-LD. Neither Google nor AI systems prefer it. Skip RDFa.

How AI systems read JSON-LD

When an AI crawler visits your page, it does two things. It reads your visible HTML content. And it parses any JSON-LD script tags it finds.

The JSON-LD tells it: this page is an Article. It was published on this date. It was written by this author. The main topic is this. There is an image at this URL. The word count is this. All that metadata helps the AI system understand the content more deeply than it could from the text alone.

When the AI system later decides whether to cite you, it uses that metadata. A properly formatted JSON-LD Article schema with a publication date, author, and image gets cited more often than the same content with no schema at all. The metadata proves you are the original source.

The essential JSON-LD structure

Every JSON-LD block has three core parts. The @context tells the parser which vocabulary you are using (almost always schema.org). The @type tells it what kind of thing you are describing. The properties describe the specific attributes.

A basic Article schema looks like this:

<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "Article",
"headline": "Your Article Title",
"description": "Your article summary",
"image": "https://yoursite.com/image.jpg",
"datePublished": "2026-04-17",
"author": {
"@type": "Person",
"name": "Author Name"
},
"publisher": {
"@type": "Organization",
"name": "Your Brand",
"logo": {
"@type": "ImageObject",
"url": "https://yoursite.com/logo.jpg"
}
}
}
</script>

That JSON-LD block sits in the head of your page (or anywhere in the body). It tells the crawler everything it needs to know about the article.

Where to place JSON-LD on your page

The best practice is to place JSON-LD in the head section of your HTML, above the visible content. The crawler reads the head first, so it gets the schema metadata before it even starts parsing the body.

But JSON-LD works anywhere on the page. In the head. In the body. Before the content. After the content. It does not matter. As long as the JSON is valid, crawlers will find it and parse it.

Many content platforms automatically place JSON-LD in the head when you fill out metadata fields. You write a headline, description, and publication date in your CMS. The platform generates the JSON-LD automatically. You do not write it by hand.

JSON-LD for different content types

Article is the most common schema type, but JSON-LD supports many types. Each type has different required and optional properties.

FAQPage schema

If your page has a FAQ section, use FAQPage schema. It tells AI crawlers exactly where your questions and answers are:

<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "FAQPage",
"mainEntity": [
{
"@type": "Question",
"name": "What is JSON-LD?",
"acceptedAnswer": {
"@type": "Answer",
"text": "JSON-LD is a structured data format that AI systems prefer."
}
},
{
"@type": "Question",
"name": "Where do I put JSON-LD?",
"acceptedAnswer": {
"@type": "Answer",
"text": "In the head or body of your HTML page."
}
}
]
}
</script>

FAQPage schema improves the likelihood that AI systems will extract your Q&A correctly.

Product schema

For e-commerce, use Product schema:

<script type="application/ld+json">
{
"@context": "https://schema.org/",
"@type": "Product",
"name": "Product Name",
"description": "Product description",
"image": "https://yoursite.com/product.jpg",
"brand": {
"@type": "Brand",
"name": "Your Brand"
},
"offers": {
"@type": "Offer",
"url": "https://yoursite.com/product",
"priceCurrency": "USD",
"price": "99.99"
}
}
</script>

Product schema tells AI shopping agents the exact price, availability, and features of your product.

HowTo schema

For step-by-step guides, use HowTo schema:

<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "HowTo",
"name": "How to Set Up JSON-LD",
"step": [
{
"@type": "HowToStep",
"name": "Step 1",
"text": "Add a script tag to your page head."
},
{
"@type": "HowToStep",
"name": "Step 2",
"text": "Write valid JSON inside the script tag."
}
]
}
</script>

HowTo schema helps AI systems understand the sequence and extract steps in the right order.

Common mistakes with JSON-LD

The most common mistake is invalid JSON. JSON has strict syntax rules. Every string must be in double quotes. Every property must be followed by a colon. Every object or array item must be separated by a comma. Miss one comma and the entire JSON breaks.

Test your JSON before deploying. Use a JSON validator tool. Paste your JSON-LD into the validator and it will tell you if there are any syntax errors.

The second mistake is using the wrong @type. If your page is a blog post, use Article, not BlogPosting. If it is a product, use Product, not Item. The type matters because crawlers understand the structure differently based on the type.

The third mistake is missing required properties. Article schema requires a headline. Product schema requires a price. HowTo requires at least one step. Check the schema.org documentation for each type to see what is required and what is optional.

Validating and testing your JSON-LD

Google has a Rich Results Test tool. You paste your URL and it shows you all the JSON-LD it found on that page. It tells you if the JSON is valid. It tells you if any required properties are missing. It tells you what the parsed data looks like.

Schema.org has a validation tool as well. Paste your JSON-LD and it validates the syntax and the schema compliance.

Most CMS platforms have built-in validation. If you publish content with missing required schema properties, the CMS warns you before publishing.

Frequently asked questions

Do I need JSON-LD if I already use Microdata?

Can I have multiple JSON-LD blocks on the same page?

Does JSON-LD affect my site's speed?

What if I update the content but forget to update the JSON-LD?

Should I use JSON-LD for internal links or only for main content?

Can AI systems see JSON-LD hidden with CSS display:none?