Structured Data & Schema.org

Understand structured data and how it powers rich results.

Structured data is a standardized format for describing a page's content to search engines. The shared vocabulary is Schema.org, and the recommended format is JSON-LD.

Structured data turning a plain result into a rich resultJSON-LD markup"@type": "Recipe""aggregateRating": 4.8"cookTime": "PT30M""image": "..."Google readsEasy Banana Breadexample.com ★★★★★ 4.830 min - 350 cal - image thumbnailA rich result stands out in the SERP
Structured data does not change your ranking directly, but rich results earn more clicks.

Why it matters

Structured data does not directly boost rankings, but it makes pages eligible for rich results - listings enhanced with stars, prices, FAQs, images and more. Rich results stand out and earn more clicks.

JSON-LD

JSON-LD is a block of JSON placed in a <script> tag. It keeps the markup separate from your visible HTML, which makes it easy to add and maintain.

Example

Example · html
<script type="application/ld+json">
{
  "@context": "https://schema.org",
  "@type": "Organization",
  "name": "SoundsCode",
  "url": "https://example.com",
  "logo": "https://example.com/logo.png"
}
</script>

When to use it

  • A recipe site adds Recipe schema so its pages display cook time, star ratings, and calorie counts directly in Google search results as rich snippets.
  • A local gym uses LocalBusiness schema to surface its address, phone number, and opening hours in the Knowledge Panel when users search the brand name.
  • A job board implements JobPosting schema so listings appear in Google for Jobs results, dramatically increasing organic application traffic.

More examples

Minimal JSON-LD Organisation schema

Organisation schema establishes a brand's identity in Google's Knowledge Graph by linking the website to its social profiles via sameAs.

Example · json
{
  "@context": "https://schema.org",
  "@type": "Organization",
  "name": "Acme Running Co.",
  "url": "https://example.com",
  "logo": "https://example.com/logo.png",
  "sameAs": [
    "https://twitter.com/acmerunning",
    "https://www.linkedin.com/company/acme-running"
  ]
}

Recipe schema for rich results

Recipe schema enables Google to display cook time, ratings, and nutrition in the SERP rich snippet without the user opening the page.

Example · json
{
  "@context": "https://schema.org",
  "@type": "Recipe",
  "name": "Overnight Oats",
  "cookTime": "PT8H",
  "recipeYield": "2 servings",
  "aggregateRating": {
    "@type": "AggregateRating",
    "ratingValue": "4.8",
    "reviewCount": "1043"
  },
  "nutrition": {
    "@type": "NutritionInformation",
    "calories": "320 calories"
  }
}

Inject JSON-LD into HTML page

JSON-LD is Google's preferred structured data format; embedding it in a script tag keeps markup separate from content and is easy to update.

Example · html
<html>
<head>
  <title>Overnight Oats Recipe | Acme Kitchen</title>
  <!-- Structured data block: place in <head> or at end of <body> -->
  <script type="application/ld+json">
  {
    "@context": "https://schema.org",
    "@type": "Recipe",
    "name": "Overnight Oats",
    "cookTime": "PT8H"
  }
  </script>
</head>
<body>...</body>
</html>

Discussion

  • Be the first to comment on this lesson.