Panduan JSON-LD

JSON-LD adalah script-based data terstruktur format Google recommends — easiest untuk implement, tidak pernah touches terlihat HTML, dan typically pairs dengan schema.org untuk SEO.

Pertama kali diterbitkan: 26 Jun 2026 · Terakhir diperbarui: 3 Agu 2026 · Advanced
Bahasa
1 sinyal bukti di halaman ini

JSON-LD (JavaScript Object Notation untuk ditautkan data) adalah sebuah data terstruktur format itu lives di sebuah <script type="application/ld+json"> tag; pada SEO side ini adalah typically paired dengan schema.org vocabulary untuk describe halaman konten, though JSON-LD itself dapat carry lainnya vocabularies too. ini adalah sebuah W3C standard (2014), dan Google recommends ini di atas Microdata dan RDFa untuk one alasan: ini adalah easiest format untuk implement dan maintain di scale, because ini sits di -nya own block dan tidak pernah touches Anda terlihat HTML. semua three formats berfungsi equally well when implemented correctly. syntax spine adalah @context ( vocabulary — schema.org untuk sebagian besar SEO markup, tetapi not satu-satunya valid nilai), @jenis ( entity), dan @id (sebuah berguna tetapi optional stable URI untuk linking entities — basis dari @graph pattern, itself one valid cara untuk organize multiple entities, not sebuah requirement). catch sebagian besar guides miss: Googlebot renders JavaScript so dynamically injected JSON-LD berfungsi untuk Google, tetapi several AI crawler — GPTBot dan ClaudeBot disertakan, sebagai tested — don't execute JavaScript; itu's provider- dan date-spesifik, not sebuah universal aturan, so verify directly jika sebuah particular crawler penting untuk Anda dan server-render markup Anda dapat't confirm otherwise. data terstruktur adalah not sebuah sinyal peringkat; ini governs rich-hasil eligibility dan entity understanding, dan ini harus describe konten actually terlihat pada halaman.

TL;DR — JSON-LD (JavaScript Object Notation untuk ditautkan data) adalah sebuah W3C Recommendation dari 2014 — dibangun pada JSON, tetapi @context adalah what membuat ini ditautkan data, not hanya JSON. ini adalah data terstruktur format Google recommends because ini adalah easiest untuk implement dan maintain di scale dan tidak pernah touches terlihat HTML; Microdata dan RDFa adalah equally valid when correct. syntax spine adalah @context (vocabulary — schema.org untuk sebagian besar SEO markup, though spec allows lainnya contexts), @type (entity), @id (sebuah berguna tetapi optional stable URI untuk cross-referencing entities — basis dari @graph, itself one valid pattern among others, not sebuah requirement). Place ini di <head> atau <body> — Google accepts either. Googlebot renders JS so dynamically injected JSON-LD berfungsi untuk Google; several AI crawler (GPTBot, ClaudeBot disertakan, sebagai tested) don’t execute JS, tetapi itu’s provider- dan date-spesifik — verify directly alih-alih assuming ini untuk setiap AI crawler, dan server-render what Anda dapat’t confirm. data terstruktur adalah not sebuah sinyal peringkat — ini drives rich-hasil eligibility dan entity understanding, dan ini harus describe konten terlihat pada halaman.

JSON-LD adalah sebuah format, not sebuah vocabulary

pertama, sebuah distinction itu clears up sebuah lot dari confusion: JSON-LD adalah format; schema.org adalah vocabulary. JSON-LD adalah how Anda write markup; schema.org’s Article, Product, Organization jenis adalah what Anda say. Rich hasil adalah fitur layer pada top dari both. ini halaman adalah tentang format. ( vocabulary-untuk-AI angle lives di Schema Markup untuk AI.)

JSON-LD adalah sebuah W3C Recommendation, pertama published di 2014 — ini predates -nya SEO adoption dan adalah designed untuk umum ditautkan-data interoperability di seluruh web, not specifically untuk search. itu history adalah why sebuah property like @id exists di semua, dan ini adalah spec-tingkat poin sebagian besar SEO guides skip: JSON-LD adalah not hanya JSON. ini adalah dibangun pada JSON syntax, tetapi @context declaration adalah what membuat data ditautkan — identifiable dan connectable di seluruh web. Strip @context dan Anda’ve got data sebuah parser dapat’t interpret.

JSON-LD juga isn’t married untuk schema.org. spec lets @context reference apa pun published vocabulary — -nya own contoh tautan untuk non-schema.org contexts — so JSON-LD adalah right jawaban untuk “what format” (terjemahan) “what format” while schema.org adalah one jawaban, umum one untuk search dan AI-search markup, untuk “what vocabulary.” (terjemahan) “what vocabulary.” sebuah halaman dapat validly gunakan JSON-LD dengan sebuah berbeda vocabulary; ini hanya wouldn’t menjadi schema.org markup anymore.

JSON-LD vs. Microdata vs. RDFa

ada three cara untuk express data terstruktur, dan Google mendukung semua dari them:

JSON-LDMicrodataRDFa
Where ini livessebuah separate <script> blockInline itemprop attributes pada Anda HTMLInline property attributes pada Anda HTML
Touches terlihat HTML?NoYesYes
dapat menjadi injected oleh JS / tag manager?Yes (cleanly)AwkwardAwkward
Google’s stanceRecommendeddidukungdidukung
Error-pronenessLowestHigher (tangled dengan markup)Higher (tangled dengan markup)

Google’s recommendation adalah explicit tetapi narrowly scoped: “In general, Google recommends using JSON-LD for structured data if your site’s setup allows it, as it’s the easiest solution for website owners to implement and maintain at scale (in other words, less prone to user errors).” (terjemahan) “di umum, Google recommends menggunakan JSON-LD untuk data terstruktur jika Anda situs’s setup allows ini, sebagai ini adalah easiest solusi untuk situs web owners untuk implement dan maintain di scale (di lainnya kata, less prone untuk pengguna errors).”

nuance competitors biasanya drop — dan one worth keeping — comes dari sama Google halaman: “All 3 formats are equally fine for Google, as long as the markup is valid and properly implemented per the feature’s documentation.” (terjemahan) “semua 3 formats adalah equally fine untuk Google, sebagai panjang sebagai markup adalah valid dan properly implemented per fitur’s documentation.” So recommendation adalah tentang implementation ease dan error rate, not parsing speed atau peringkat advantage. menggunakan Microdata adalah not sebuah penalty. JSON-LD hanya wins dalam praktik because ini doesn’t entangle data terstruktur dengan markup sebuah designer mungkin edit tomorrow.

syntax: @context, @jenis, @id, properties, nesting

Here’s sebuah annotated Article block:

<script type="application/ld+json">
{
  "@context": "https://schema.org",          // the vocabulary — the common value for SEO
  "@type": "Article",                          // the entity type
  "@id": "https://example.com/post#article",   // a stable URI for this entity
  "headline": "How JSON-LD Works",            // a property (key/value)
  "datePublished": "2026-06-26",
  "author": {                                  // a nested entity
    "@type": "Person",
    "name": "Patrick Stox",
    "url": "https://patrickstox.com/"
  }
}
</script>
  • @context — establishes semantic framework ( vocabulary). untuk schema.org SEO markup ini adalah typically "https://schema.org", tetapi itu’s sebuah convention, not sebuah aturan: @context maps istilah untuk identifiers, dan spec lets ini poin untuk lainnya vocabularies. ini tells parser cara interpret setiap property name itu mengikuti. ini adalah bagian itu membuat ini ditautkan data.
  • @type — declares entity: Article, Product, Organization, BreadcrumbList, etc. ini maps untuk sebuah schema.org jenis. gunakan sebagian besar spesifik applicable jenisNewsArticle di atas Article jika ini fits.
  • @id — sebuah unique URI identifying resource. ini adalah mechanism itu lets Anda reference one entity dari lainnya (see @graph below), dan ini adalah worth setting pada anything Anda’ll cross-reference — tetapi ini adalah not universally diperlukan. JSON-LD spec permits unidentified blank nodes, so valid JSON-LD dapat omit @id pada entities Anda tidak pernah perlu untuk reference elsewhere.
  • Properties — ordinary JSON key/nilai pairs, menggunakan vocabulary istilah dari @context.
  • Nesting — child entities adalah expressed sebagai nested JSON objects ( author object above) atau arrays dari objects.

@graph pattern ( scalable approach)

sebagian besar halaman perlu more daripada one entity: sebuah Organization, sebuah WebSite, sebuah BreadcrumbList, dan Article atau WebPage itself. naive approach adalah four separate <script> blocks itu repeat data. sebuah scalable alternative adalah sebuah single block dengan @graph — sebuah array dari entities, cross-referenced oleh @id. Neither JSON-LD spec nor Google mandates @graph sebagai ** pattern — ini adalah syntax untuk expressing sebuah graph, dan lainnya valid layouts exist (separate typed blocks, nested objects without sebuah top-tingkat @graph, blank nodes dengan no @id di semua) — tetapi pada sebuah situs dengan several cross-referenced entities, ini adalah pattern itu menghindari repeating yang sama Organization atau WebSite data pada setiap halaman:

Declare each entity once and connect the graph with stable `@id` references instead of repeating full objects. Sumber: Nested Schema

One Organization is referenced as publisher by the WebSite and Article. The WebPage belongs to the WebSite and is connected to the Article. Each entity is declared once, and the same stable ID string is reused for every reference.

© Patrick Stox LLC · CC BY 4.0 ·

<script type="application/ld+json">
{
  "@context": "https://schema.org",
  "@graph": [
    {
      "@type": "Organization",
      "@id": "https://example.com/#org",
      "name": "Example Co",
      "url": "https://example.com/"
    },
    {
      "@type": "WebSite",
      "@id": "https://example.com/#website",
      "url": "https://example.com/",
      "publisher": { "@id": "https://example.com/#org" }   // reference, not a copy
    },
    {
      "@type": "WebPage",
      "@id": "https://example.com/post#webpage",
      "isPartOf": { "@id": "https://example.com/#website" },
      "breadcrumb": { "@id": "https://example.com/post#breadcrumb" }
    }
  ]
}
</script>

Define Organization once, lalu poin di ini dengan { "@id": "...#org" } everywhere else alih-alih repeating name, logo, dan URL. ini adalah how major CMS schema plugins bangun mereka output, dan ini adalah why @id exists. Bing membuat yang sama case untuk JSON-LD’s nesting: ini “makes defining links and relationships between data and entities… easy because it supports nested data.” (terjemahan) “membuat defining tautan dan relationships antara data dan entities… easy because ini mendukung nested data.”

Where untuk place ini: <head> atau <body>

Google confirms both berfungsi“You can put the JSON-LD data in the <head> or the <body> of the page.” (terjemahan) “Anda dapat put JSON-LD data di undefined atau undefined dari halaman.” <head> adalah conventional, tetapi plenty dari CMS plugins inject ini near end dari <body>, dan itu’s fine. Bing agrees ini dapat sit “in the header, body or foot of the page.” (terjemahan) “di header, body atau foot dari halaman.” Don’t burn time relocating sebuah valid block dari body untuk head; ini perubahan nothing. Evidence for this claim Google permits JSON-LD in either the head or body of an HTML document for supported structured-data features. Scope: Google Search JSON-LD guidance; markup must still match visible page content. Confidence: high · Verified: Google: Structured data introduction

Generating JSON-LD dynamically — dan AI crawler catch

Anda dapat bangun JSON-LD pada fly dengan JavaScript, dan Google documents two cara untuk melakukan ini:

Evidence for this claim Dynamically generated structured data is acceptable to Google when it is rendered and complies with content and quality guidelines. Scope: Google Search JavaScript and structured-data guidance; crawlability and rendering remain prerequisites. Confidence: high · Verified: Google: Generate structured data with JavaScript
  1. Google Tag Manager — sebuah Custom HTML tag containing JSON-LD, pulling nilai dari GTM variables. (hindari duplicating data antara halaman dan tag.)
  2. Custom JavaScript — buat script element programmatically:
  const script = document.createElement('script');
  script.setAttribute('type', 'application/ld+json');
  script.textContent = structuredDataText;
  document.head.appendChild(script);

ini berfungsi untuk Googlebot, because Google renders halaman: “Google Search can understand and process structured data that’s available in the DOM when it renders the page.” (terjemahan) “Google Search dapat memahami dan process data terstruktur itu’s available di DOM when ini renders halaman.” So far, so baik.

Here’s catch sebagian besar guides miss, stated carefully. Several AI crawler — including GPTBot dan ClaudeBot, sebagai commonly tested — memiliki not executed JavaScript. jika Anda JSON-LD hanya exists setelah sebuah client-side script runs, sebuah JS-skipping crawler tidak pernah sees ini — ini adalah invisible untuk itu bot bahkan though Googlebot reads ini fine, because Google documents rendering DOM sebelum ini looks untuk data terstruktur.

Two honest caveats pada itu AI-crawler perilaku: ini adalah Google’s own documentation itu establishes Googlebot side; AI-crawler side comes dari testing dan reporting pada individual providers, not sebuah spec apa pun dari them publish, so ini adalah provider- dan date-spesifik — sebuah crawler’s JavaScript mendukung dapat perubahan, dan I haven’t verified setiap provider directly. Don’t treat “AI crawlers skip JS” (terjemahan) “AI crawler skip JS” sebagai sebuah universal aturan untuk bangun pada; treat ini sebagai sebuah alasan untuk periksa crawler Anda actually care tentang (atau default untuk server rendering when Anda dapat’t periksa). jika ini isn’t di server-rendered HTML dan Anda haven’t confirmed crawler executes JS, assume ini dapat’t see ini. untuk AI-search visibilitas, render JSON-LD server-side ke static HTML unless Anda’ve verified otherwise. (ini adalah JavaScript-rendering masalah dari sebuah structured-data angle — see JavaScript SEO.)

There’s sebuah kedua caveat untuk ecommerce: Google warns itu dynamically generated Product markup “can make Shopping crawls less frequent and less reliable,” (terjemahan) “dapat membuat Shopping melakukan crawl less frequent dan less reliable,” which adalah sebuah nyata masalah untuk fast-changing price dan availability. untuk products, prefer rendering sisi server regardless dari AI.

policies (ini memiliki teeth now)

Google’s data terstruktur guidelines adalah pendek dan muat-bearing:

  • “Don’t mark up content that is not visible to readers of the page.” (terjemahan) “Don’t mark up konten itu adalah not terlihat untuk readers dari halaman.”
  • “Don’t mark up irrelevant or misleading content, such as fake reviews.” (terjemahan) “Don’t mark up irrelevant atau misleading konten, such sebagai fake reviews.”
  • “Put the structured data on the page that it describes.” (terjemahan) “Put data terstruktur pada halaman itu ini describes.”
  • “Use the most specific applicable type and property names defined by schema.org.” (terjemahan) “gunakan paling spesifik applicable jenis dan property names defined oleh schema.org.”
  • Don’t block Anda structured-data halaman dari Googlebot via robots.txt atau noindex.

terlihat-konten aturan adalah one untuk internalize. Schema itu describes konten not ditampilkan pada halaman memiliki selalu telah sebuah violation; enforcement dari “invisible” (terjemahan) “invisible” schema memiliki tightened. Bing puts warning bluntly: “even though the markup is not visible on your page, it is still read by the search engines, and putting spam data in the markup can hamper your presence.” (terjemahan) “bahkan though markup adalah not terlihat pada Anda halaman, ini adalah masih read oleh mesin pencari, dan putting spam data di markup dapat hamper Anda presence.”

umum JSON-LD mistakes

  • Markup itu doesn’t match terlihat halaman — #1 policy masalah (sebuah rating di JSON-LD itu no pengunjung sees).
  • Malformed JSON — sebuah trailing comma, sebuah unescaped quote, atau kata smart quotes (" alih-alih ") itu silently break whole block. JSON-LD adalah strict.
  • Wrong property names — inventing properties itu aren’t di schema.org, atau misspelling nyata ones, so parser ignores them.
  • sebuah generic jenis where sebuah spesifik one existsThing atau Article where Recipe atau NewsArticle adalah warranted.
  • Duplicate, inconsistent Organization blocks di seluruh halaman dengan conflicting names/logos.
  • Missing diperlukan properties untuk rich hasil Anda’re targeting (setiap fitur lists -nya own diperlukan fields).
  • JS-injected markup assumed untuk menjadi terlihat untuk setiap crawler — Google renders ini, tetapi beberapa AI crawler memiliki not, dan itu’s worth verifying per crawler ( catch above).

Validating JSON-LD

Four berbeda pertanyaan get ditanyakan di bawah “is my JSON-LD valid,” (terjemahan) “adalah my JSON-LD valid,” dan mereka’re not sama pertanyaan — passing one doesn’t pass others:

TestProvesmelakukan not prove
JSON parses (apa pun JSON linter, atau Rich hasil Test’s parse langkah)syntax adalah legal JSON — no trailing commas, unescaped quotes, atau smart-quote breakageitu apa pun property name adalah nyata schema.org vocabulary, atau itu Google akan tampilkan anything
Schema.org Validatorproperties dan jenis exist di schema.org vocabularyitu Google mendukung jenis sebagai sebuah rich hasil, atau itu diperlukan fields untuk sebuah spesifik fitur adalah present
Rich hasil Testmarkup meets Google’s requirements untuk sebuah spesifik didukung rich-hasil jenis, pada rendered halaman Anda testeditu Google akan actually display rich hasil — eligibility isn’t sebuah guarantee — atau itu lainnya search/AI sistem parse ini yang sama cara
Google Search Console — Enhancements / rich hasil reportsWhat Google actually parsed pada live, di-crawl halaman, di scale, dengan nyata errorsnyata-time state — reports lag behind sebuah recrawl
  • Test oleh URL, not pasted code, untuk JS-rendered halaman. Rich hasil Test’s code-input mode doesn’t run Anda scripts atau resolve relative references cara live-URL testing melakukan — ini dapat’t tell Anda what sebuah client-side-injected block looks like setelah rendering.
  • Bing Webmaster alat — Markup Validator — Bing memiliki validated JSON-LD since August 2018.
  • None dari ini tests speak untuk crawler itu don’t render JavaScript (see AI-crawler caveat above) — testing rendered URL confirms what Google sees, not what sebuah JS-skipping bot menerima.

melakukan JSON-LD help SEO?

Set expectations honestly:

  • Not sebuah sinyal peringkat. John Mueller memiliki said data terstruktur won’t membuat sebuah situs peringkat better. Full stop.
  • Rich-hasil eligibility. ini adalah what membuat Anda eligible untuk enhanced SERP fitur (stars, prices, FAQs, breadcrumbs) — eligibility, not sebuah guarantee.
  • CTR, indirectly. Richer-looking hasil dapat earn more clicks, which adalah nyata payoff untuk sebagian besar situs.
  • Entity understanding. ini helps mesin connect Anda halaman untuk known entities dan graf pengetahuan.
  • AI search. Fabrice Canel (Bing) confirmed di 2025 itu schema markup helps Microsoft’s LLMs memahami konten — tetapi note controlled-study caveat dari Schema Markup untuk AI: ini adalah infrastructure untuk disambiguation, not sebuah direct citation lever.

So: implement JSON-LD untuk rich-hasil eligibility, entity clarity, dan AI/LLM comprehension — not sebagai sebuah peringkat hack.

ini artikel sits di data terstruktur hub. untuk AI-spesifik take pada schema.org vocabulary, see Schema Markup untuk AI; untuk rendering mechanics behind dynamic injection, see JavaScript SEO.

Add an expert note

Pin an expert quote

New person? Create their unclaimed profile at /admin/experts/ → Pin a quote first.