Skip to content

Search

Articles, tools, solutions and knowledge base guides

Start typing to search across articles, tools and apps.

Schema.org and JSON-LD: A Practical Guide to Structured Data

Structured data describes the meaning of content through entities and their relationships. This guide explains how to select types, construct a coherent graph, serialize markup safely and validate an implementation without confusing syntactic validity with search visibility.

Published Written by Reading time 12 min read
On this page Contents: quick navigation between sections

Vocabulary, format and search requirements

Schema.org defines types, properties and their meaning; JSON-LD 1.1 is a W3C Recommendation for representing linked data in JSON. The same model can also be expressed with Microdata or RDFa. JSON Schema, by contrast, describes and validates JSON structures, not an entity vocabulary. Syntactically valid JSON may contain unknown Schema.org properties, and valid Schema.org data may fail a particular consumer's requirements. [1][2][3]

JSON-LD, Microdata or RDFa?

JSON-LD, Microdata or RDFa?
FormatStrengthsLimitations
JSON-LDSeparate from HTML; easy CMS generationMust stay aligned with visible content
MicrodataProperties directly in HTMLTightly coupled to templates
RDFaFlexible vocabularies and relationshipsMore complex markup

JSON-LD separates the data model from HTML structure, making generation from a CMS or backend straightforward. Microdata binds properties to HTML elements via itemscope, itemtype and itemprop; RDFa uses attributes such as vocab, typeof and property. Both are useful when markup follows template content directly. Google supports all three and recommends JSON-LD when appropriate. Maintaining multiple copies of the same data in different formats is unnecessary. [3][4]

Entity modelling, @id and @graph

@context gives compact terms their meaning, @type specifies the entity type, @id identifies a node using an IRI, and @graph can represent multiple related nodes. A reference containing only @id points to an entity instead of making an independent copy. Use stable absolute identifiers, such as a page URL with a #article fragment. An identifier need not be a separate page and does not replace canonical. One organization may keep its identity across documents, but different articles must not accidentally share the same @id. [1][2]

A practical article graph

article.json

{
  "@context": "https://schema.org",
  "@graph": [
    {
      "@type": "Organization",
      "@id": "https://example.com/#organization",
      "name": "Example Studio",
      "url": "https://example.com/"
    },
    {
      "@type": "Person",
      "@id": "https://example.com/authors/alex#person",
      "name": "Alex Morgan",
      "url": "https://example.com/authors/alex"
    },
    {
      "@type": "WebPage",
      "@id": "https://example.com/en/learning/data#webpage",
      "url": "https://example.com/en/learning/data",
      "inLanguage": "en",
      "breadcrumb": {
        "@id": "https://example.com/en/learning/data#breadcrumb"
      },
      "mainEntity": {
        "@id": "https://example.com/en/learning/data#article"
      }
    },
    {
      "@type": "BlogPosting",
      "@id": "https://example.com/en/learning/data#article",
      "mainEntityOfPage": {
        "@id": "https://example.com/en/learning/data#webpage"
      },
      "headline": "Understanding structured data",
      "inLanguage": "en",
      "datePublished": "2026-11-20T10:00:00+01:00",
      "dateModified": "2026-11-30T09:00:00+01:00",
      "image": ["https://example.com/images/data.webp"],
      "author": {
        "@id": "https://example.com/authors/alex#person"
      },
      "publisher": {
        "@id": "https://example.com/#organization"
      }
    },
    {
      "@type": "BreadcrumbList",
      "@id": "https://example.com/en/learning/data#breadcrumb",
      "itemListElement": [
        {
          "@type": "ListItem",
          "position": 1,
          "name": "Learning",
          "item": "https://example.com/en/learning"
        },
        {
          "@type": "ListItem",
          "position": 2,
          "name": "Understanding structured data"
        }
      ]
    }
  ]
}

The example describes a fictional English article, its author, publisher, web page and breadcrumb hierarchy. Replace example.com and sample data with real values. WebPage and BlogPosting have distinct identities; mainEntity and mainEntityOfPage relate the document to its main content. Author and publisher are linked by references rather than duplicate names. ISO 8601 timestamps include time zone offsets. Use genuine publication and modification dates and accessible images. Google's Article guide lists recommended properties rather than a universal required set; BreadcrumbList has separate requirements. [5][6]

Selecting types and current Google support

Selecting types and current Google support
TypePurposeConditions and limitations
Article / BlogPostingPublicationReal author, dates and images
Organization / PersonPublisher or author identityNo knowledge panel guarantee
LocalBusinessLocal establishmentReal address and opening hours
BreadcrumbListNavigation hierarchyCorrect order and URLs
Product / OfferProduct and sale termsSeparate product snippet and merchant listing requirements
SoftwareApplicationApplicationName, offer and a rating or review for Google feature
FAQPageQuestions and answers pageNo Google FAQ enhancements since May 2026

Choose a type based on the primary page content, not the desired search appearance. Organization describes an organization, LocalBusiness an actual local establishment, and Person can describe an author. Product represents a product, SoftwareApplication software, and BreadcrumbList a navigation hierarchy. Not every type has its own rich result. Google stopped displaying FAQ rich results on May 7, 2026 and subsequently removed the feature documentation. FAQPage remains a Schema.org type, but should not be used solely to promise FAQ enhancements. [7][8][9][10][11][12][23][24][26]

In practice start with the page template, not every available type. For a knowledge base use Article or BlogPosting, WebPage and BreadcrumbList, and model the publisher as a stable Organization. For a genuine author profile consider ProfilePage with mainEntity referencing Person. sameAs identifies another source representing the same entity, not arbitrary related pages. Google recommends Organization data on the home page or a page describing the organization. [2][5][23][26]

Products, offers and commerce data consistency

product.json

{
  "@context": "https://schema.org",
  "@type": "Product",
  "@id": "https://example.com/products/desk-lamp#product",
  "name": "Desk lamp",
  "image": "https://example.com/images/desk-lamp.webp",
  "sku": "LAMP-01",
  "offers": {
    "@type": "Offer",
    "url": "https://example.com/products/desk-lamp",
    "price": 49.9,
    "priceCurrency": "EUR",
    "availability": "https://schema.org/InStock",
    "itemCondition": "https://schema.org/NewCondition"
  }
}

Product describes an item; Offer describes its commercial terms. The example models one fictional offer, not every merchant listing requirement. Price, currency, availability and URL must reflect the current offer available to users. For product snippets Google requires a name and at least one of offers, review or aggregateRating; merchant listings have distinct requirements including image and offer data. Never invent ratings. For variants, evaluate ProductGroup and variant relationships against current documentation; keep Merchant Center data aligned with the page. [9][13][14][25]

Google excludes self-serving reviews of LocalBusiness or Organization from their own review stars, including embedded third-party review widgets controlled by the reviewed entity. This concerns review snippet eligibility, not a prohibition on publishing genuine reviews. On product pages do not copy ratings from an unrelated variant. [13][25]

SSR, CSR, SSG and ISR: one source of truth

Related resources: SSR vs CSR vs SSG vs ISR.

Generate markup from the same model as the visible headline, price or description. With SSR include JSON-LD in the HTML response; with SSG regenerate it at build time; with ISR invalidate cached markup alongside content. Google can process JavaScript-generated markup and does not require SSR, but inspect the rendered document. Dynamic product markup may make Shopping crawls less frequent or reliable, especially for changing prices. In an SPA, remove or update previous-page markup when navigating. [4][15][16]

Multilingual sites and entity identity

Use the appropriate URL, headline, description and inLanguage, such as pl, en or uk, for translations. A publisher can retain one stable identity while distinct pages and article versions have distinct identifiers in this model. Do not point every translation's mainEntityOfPage to the English URL. Canonical and hreflang remain separate HTML mechanisms; inLanguage does not replace hreflang. Local offers must use the correct currency and terms. [1][2][17]

Safe JSON-LD serialization

serialize-json-ld.ts

export type JsonValue =
  | null
  | boolean
  | number
  | string
  | readonly JsonValue[]
  | { readonly [key: string]: JsonValue };

export function serializeJsonLd(value: JsonValue): string {
  const json = JSON.stringify(value);

  if (json === undefined) {
    throw new TypeError("Expected JSON-serializable data");
  }

  return json.replace(/</g, "\\u003c");
}

export function renderJsonLdScript(value: JsonValue): string {
  const content = serializeJsonLd(value);

  return `<script type="application/ld+json">${content}</script>`;
}

A script element with application/ld+json contains data, but the HTML parser still recognizes its closing tag. JSON.stringify alone does not protect against injected closing script tag text. The TypeScript example serializes validated data and replaces less-than characters with a Unicode escape, preserving values after JSON.parse. This is encoding for the script text context, not a general HTML sanitizer. JsonValue is not runtime validation; validate the domain contract, URLs and finite numbers before calling it. Do not fetch arbitrary remote JSON-LD contexts in an untrusted process. [1][18]

Both JSON examples contain data only: embed them in a script element with type application/ld+json in the described page's HTML. For dynamic rendering use the function below after validating domain data. A CMS with multiple content types benefits from separate article and product mappings, shared serialization and contract tests for those mappings. Do not turn the serializer into a mechanism that guesses entity types. [15][18]

Validation, deployment and monitoring

Validation, deployment and monitoring
ToolChecksDoes not confirm
JSON parserJSON syntaxEntity meaning
Schema Markup ValidatorSchema.org vocabularyGoogle feature eligibility
Rich Results TestSupported types and some Google requirementsDisplay in search
Search ConsoleState observed by GoogleReal-time state of entire site

Related resources: robots.txt / sitemap.xml.

Separate JSON syntax checks, Schema.org vocabulary checks, eligibility for Google features and actual display. Schema Markup Validator inspects vocabulary; Rich Results Test checks supported features; Search Console reports Google's observed state for available reports. Test representative URLs after deployment and inspect rendered HTML. In CI check parsing, identifier consistency and alignment with domain data. Absence of a report or errors does not prove overall correctness. Compare impressions and clicks by page type and period, accounting for seasonality, ranking and content changes. [4][19][20]

SEO, GEO and common anti-patterns

Related resources: POLPROG structured data generator.

Structured data helps interpret content and can enable eligibility for specific features, but guarantees neither indexing, better rankings nor higher CTR. Google requires no special schema for generative search features. Do not mark up invisible content, fabricate ratings or add unrelated types. Policy violations can lead to manual actions affecting rich results without necessarily removing the page from the index. The POLPROG generator helps build graphs and catch some issues, but does not replace current documentation or testing the actual page. [4][7][21][22]

Well-designed structured data belongs to the publishing architecture rather than a separate marketing layer. Choose types that reflect real content, generate consistent data, follow changes in Google requirements and evaluate actual outcomes rather than the number of valid markup items.

Tools for this topic

Schema.org JSON-LD Structured Data Technical SEO Rich Results Google Search Console JavaScript SEO

Frequently asked questions

Are Schema.org and JSON-LD the same?

No. Schema.org is a vocabulary; JSON-LD represents linked data. [1][2]

Must JSON-LD be in the head?

No. Google supports JSON-LD in head and body; it must match the page content. [4]

Can a page have multiple script elements?

Yes. Use multiple blocks or one graph, avoiding contradictory descriptions of the same entity. [1][7]

Does FAQPage still produce rich results?

Not on Google since May 7, 2026; the type remains in Schema.org. [8][12]

Does structured data improve Google rankings?

It can aid interpretation and feature eligibility, but does not guarantee better rankings. [4][7]

Can React or Angular generate JSON-LD?

Yes. Inspect rendered HTML, navigation updates and consistency with visible content. [15][16]

Is a passing Rich Results Test sufficient?

No. It does not verify every quality condition or guarantee display. [7][19]

How can I describe a free app without reviews?

Use SoftwareApplication and a genuine zero price. Do not fabricate ratings; Google's app feature requires a rating or review. [10]

Sources and references

  1. W3C: JSON-LD 1.1↩1↩2↩3↩4↩5↩6
  2. Schema.org: Data model↩1↩2↩3↩4↩5
  3. Schema.org: Documentation↩1↩2
  4. Google: Introduction to structured data↩1↩2↩3↩4↩5↩6
  5. Google: Article structured data↩1↩2
  6. Google: Breadcrumb structured data↩
  7. Google: General structured data guidelines↩1↩2↩3↩4↩5
  8. Google: Search documentation updates, May 2026↩1↩2
  9. Google: Product snippets↩1↩2
  10. Google: Software app↩1↩2
  11. Google: Structured data gallery↩
  12. Schema.org: FAQPage↩1↩2
  13. Google: Merchant listings↩1↩2
  14. Google: Product variants↩
  15. Google: Generate structured data with JavaScript↩1↩2↩3
  16. Google: JavaScript SEO↩1↩2
  17. Google: Localized versions↩
  18. Next.js: JSON-LD↩1↩2
  19. Google: Structured data testing tools↩1↩2
  20. Google: Rich result report overview↩
  21. Google: Generative AI optimization guide↩
  22. POLPROG structured data generator↩
  23. Google: Organization↩1↩2
  24. Google: Local business↩
  25. Google: Review snippets↩1↩2
  26. Google: Profile page↩1↩2

Was this helpful?

Get new articles by email

One short email per new Learning article. No spam, unsubscribe in one click.

We only use your email to send new articles. No third-party sharing.

Back to Learning