GetPicked

AI search glossary

JSON-LD: what it is, how it works, and a copy-ready example

JSON-LD (JSON for Linking Data) is a W3C standard for describing things and the links between them in plain JSON. On websites it is placed in a script tag so search engines and other machines can read facts about the page, such as who publishes it and what product it sells.

Also called: JSON for Linking Data, JSON-LD structured data, ld+json

Why it matters for AI search

JSON-LD states facts about your business in a form machines can parse without guessing: your name, logo, official profiles, products and prices. Google says no special markup is needed to appear in its AI features, but the same crawlers and indexes that feed AI answers read this data, and consistent facts across markup and visible text make your entity easier to identify. It is cheap to add and hard to misread.

How JSON-LD works

JSON-LD 1.1 became a W3C Recommendation on 16 July 2020, replacing the 2014 version. It is ordinary JSON with a few reserved keywords that turn plain keys into globally defined terms:

  • @context says which vocabulary the keys come from. On the web this is almost always https://schema.org, so name means schema.org's name.
  • @type says what kind of thing is being described, such as Organization, Product or Article.
  • @id gives the thing a stable identifier (a URL), so other blocks on your site can point to the same entity instead of describing it twice.
  • @graph holds several connected things in one block.

Because the data sits in its own script tag, it does not change how the page looks. Browsers ignore it; crawlers parse it.

A working example

This block tells a crawler who publishes a site and links the company to its official profiles:

<script type="application/ld+json">
{
  "@context": "https://schema.org",
  "@type": "Organization",
  "@id": "https://www.example.com/#org",
  "name": "Example Coffee Co.",
  "url": "https://www.example.com/",
  "logo": "https://www.example.com/logo.png",
  "sameAs": [
    "https://www.linkedin.com/company/example-coffee",
    "https://www.instagram.com/examplecoffee"
  ]
}
</script>

A product page on the same site can then say "brand": { "@id": "https://www.example.com/#org" } instead of repeating the company details.

Rules that keep JSON-LD useful

Google's general structured data guidelines apply whatever format you use:

  1. Mark up only what readers can see. If the page does not show a price or a rating, the markup should not claim one.
  2. Do not block the page. A page disallowed in robots.txt or tagged noindex cannot have its structured data read.
  3. Keep it accurate. Misleading markup, such as fake reviews, can lead to a manual action that removes rich result eligibility.
  4. Test it. Use Google's Rich Results Test before launch and the URL Inspection tool afterwards to confirm Google found it.

JSON-LD is the most common way to write schema markup. The types that matter most for being identified and recommended are Organization schema on your home or about page and Product schema on product pages. Both help search engines connect your pages to one entity in their knowledge graph. Google is clear that markup is not a ticket into AI Overviews, so treat JSON-LD as a way to remove ambiguity, alongside clear on-page text that answers the questions buyers ask.

Questions

Is JSON-LD better than Microdata or RDFa?
Google supports all three formats when they are valid, but it recommends JSON-LD if your setup allows it. JSON-LD lives in one script block instead of being woven into your HTML attributes, so it is easier to add, review and update.
Where do I put JSON-LD on a page?
Inside a script element with type application/ld+json, usually in the head, though the body also works. It must describe content that is visible on the same page.
Can JavaScript inject JSON-LD?
Yes. Google says it can read JSON-LD generated with JavaScript, but you should test the rendered result. For product prices and availability, Google recommends putting the markup in the initial HTML because generated markup can make Shopping crawls less reliable.
Does JSON-LD guarantee rich results or AI citations?
No. Google states it does not guarantee that structured data will show up in search results, and it says no special structured data is needed for AI Overviews or AI Mode. JSON-LD makes facts easy to read; it does not force any engine to use them.

Related terms

Sources