Glossary

Structured data

Structured data is machine-readable markup, usually schema.org vocabulary written as JSON-LD, that tells search engines what a page is about. Google uses it to understand content and to make a page eligible for rich results such as recipe cards and product details. Schema.org was founded by Google, Microsoft, Yahoo and Yandex, and JSON-LD 1.1 became a W3C Recommendation on 16 July 2020.

How it works

You pick a type from the schema.org vocabulary, such as Recipe, Product or Event, and describe the page with that type's properties. The markup sits in the page next to the visible content and must describe that same content.

Google Search reads three formats, and it says all three are equally fine if the markup is valid:

  • JSON-LD: a script element with type application/ld+json, allowed in the head or the body. Google recommends it because the markup is not interleaved with visible text. Google can also read JSON-LD that JavaScript injects after load.
  • Microdata: HTML attributes such as itemscope and itemprop on the elements that already hold the content.
  • RDFa: a similar attribute-based format built on linked data.

In JSON-LD, @context names the vocabulary (https://schema.org) and @type names the type. Everything else is an ordinary JSON property, and nested objects carry their own @type.

Each Google feature lists required and recommended properties. Missing a required property makes the item ineligible for that rich result. Google says a few complete, accurate recommended properties beat many sloppy ones.

import json
from html.parser import HTMLParser

page = """<script type="application/ld+json">
{"@context": "https://schema.org", "@type": "Recipe", "name": "Pancakes",
 "author": {"@type": "Person", "name": "Ada Lee"},
 "recipeIngredient": ["200 g flour", "2 eggs", "300 ml milk"]}
</script>"""

class LD(HTMLParser):
    def __init__(self):
        super().__init__()
        self.on, self.blocks = False, []
    def handle_starttag(self, tag, attrs):
        self.on = tag == "script" and ("type", "application/ld+json") in attrs
    def handle_endtag(self, tag):
        self.on = False
    def handle_data(self, data):
        if self.on:
            self.blocks.append(json.loads(data))

p = LD()
p.feed(page)
b = p.blocks[0]
print(b["@type"], "|", b["name"], "|", b["author"]["name"], "|", len(b["recipeIngredient"]), "ingredients")
# Recipe | Pancakes | Ada Lee | 3 ingredients

Does structured data improve rankings?

Google presents structured data as a way to understand content and become eligible for rich results, not as a ranking switch. Its guidelines say a structured data manual action removes rich result eligibility but does not affect how the page ranks. Valid markup does not guarantee a rich result, because Google also applies quality guidelines. Use the Rich Results Test while building a page and the rich result status reports in Search Console after deployment.

Common pitfalls

  • Marking up content users cannot see: Google's guidelines forbid structured data about information that is not visible on the page, even when it is accurate. Violations can block rich results or be treated as spam. Mark up only what the page displays.
  • Invalid JSON in the script block: a trailing comma makes the whole block unreadable. Python 3.11 reports Expecting property name enclosed in double quotes: line 1 column 40 (char 39) for {"@type": "Recipe", "name": "Pancakes",}. Validate the JSON before shipping.
  • Missing required properties: syntactically valid markup still earns no rich result if a required property for that feature is absent. Check the feature's documentation for the required list.
  • Using retired markup: data-vocabulary.org markup is no longer eligible for Google rich results. Google's changelog also says the FAQ rich result stopped appearing in Search on May 7, 2026, so FAQ markup no longer produces it.
  • Mismatched type: labeling instructions as recipes or live streams as local events is irrelevant markup under Google's quality guidelines. Choose the type that matches the page.
  • Template breakage: templates and serving changes can silently break markup after deployment. Monitor the Search Console reports rather than testing once.

Related terms

  • JSON — JSON-LD is JSON with a few reserved keywords such as @context and @type.
  • Open Graph — a separate set of meta tags that controls link previews on social platforms.
  • Canonical URL — the preferred URL among duplicate or very similar pages, which Google picks using rel="canonical" and other signals.
  • Hreflang — tells Google about the language and regional versions of a page.
  • robots.txt — tells crawlers which URLs they may access, and does not by itself keep a page out of Google.

See also