PLAINFINCH learn by building

Structured data

You will add JSON-LD to a page and test whether it could qualify for a rich result.

What is structured data?

Structured data is a small block of code that describes what a page is about in a fixed vocabulary that machines can read without guessing. The bird club's events page says in plain words that the dawn chorus walk starts at 5am on Sunday 2 May 2027 at the reserve car park. A person understands that at once. Structured data says the same thing again with labels: this is an Event, its name is this, its startDate is this exact moment, its location is this place.

The shared vocabulary is called schema.org. Google, Microsoft and Yahoo started it in 2011, Yandex joined later that year, and it now has hundreds of types, from Event and Product to Bakery and BicycleStore. Each type has properties, such as name, address or price.

Search engines use structured data to understand a page more precisely and, for some types, to show extra details in results. Those extras are called rich results: an event's date and place, a product's price and stock, a business's logo, or breadcrumbs in place of the bare address.

FigureThe dawn chorus page says the walk name, Sunday 2 May 2027 at 5am, and the reserve car park on Weir Road for people. The JSON-LD repeats each fact with a label: Event name, startDate as 2027-05-02T05:00+01:00, and a location Place with an address. Valid markup that matches the page makes it eligible for an event result; the search engine decides whether to show it.The dawn chorus page says the walk name, Sunday 2 May 2027 at 5am, and the reserve car park on Weir Road for people. The JSON-LD repeats each fact with a label: Event name, startDate as 2027-05-02T05:00+01:00, and a location Place with an address. Valid markup that matches the page makes it eligible for an event result; the search engine decides whether to show it.
Structured data says what the page already says, with labels a program can read. When the labelled facts match the visible ones, the page becomes eligible for extras, never guaranteed them.

How do you add it to a page?

Google recommends JSON-LD, a block of JSON inside a <script type="application/ld+json"> element. It can go in the <head> or the <body>, and it does not change how the page looks. Two older formats, Microdata and RDFa, mix the labels into the HTML elements themselves. They still work, but JSON-LD is easier to write, read and fix.

Every item needs an @context of https://schema.org and an @type. The rest are properties. Some are required for a rich result, and others are recommended. Values are text, numbers, dates or nested items: a location is itself a Place with its own name and address.

The block must be valid JSON. Every key and text value goes in double quotes, pairs are separated by commas, and the last pair in an object has no comma after it. One stray comma or missing bracket makes the whole block unreadable, and search engines skip it without telling the visitor anything.

<script type="application/ld+json">
{
  "@context": "https://schema.org",
  "@type": "Event",
  "name": "Dawn chorus walk",
  "startDate": "2027-05-02T05:00+01:00",
  "location": {
    "@type": "Place",
    "name": "Riverside Nature Reserve car park",
    "address": {
      "@type": "PostalAddress",
      "streetAddress": "Weir Road",
      "addressLocality": "Riverside"
    }
  }
}
</script>

Which types are useful for a small site?

Only a few types lead to rich results, and Google's search gallery lists them. For the sites in this course, the useful ones are Event for the bird club's walks and talks, Product with an Offer for a loaf or a bike with a price, LocalBusiness or a more specific type such as Bakery for the shop's name, address and hours, Organization with a logo, and BreadcrumbList for the trail of sections above a page.

Pick the type that describes the main thing on the page. The events page describes an event, so it gets Event. The home page describes the business, so it gets Bakery. Marking up everything on every page adds work without adding meaning.

Google also retires rich result types from time to time. FAQ rich results have been limited to well-known government and health sites since August 2023, and HowTo rich results were removed the same year. In 2025 Google phased out several more little-used types. The markup does no harm, but adding it today will not produce those extras.

Does structured data improve rankings?

No. Google says structured data is not a ranking factor in itself. What it can do is make a result more informative, and a result that shows the date and place of a walk may be more useful to someone searching for one. Whether that leads to more visits depends on the search, the person and everything else on the results page.

Valid markup makes a page eligible for a rich result. It never guarantees one. Google decides for each search whether to show the extras, and it may show a plain result even when your markup is perfect. The lab marks eligible pages and never says a rich result is shown, for exactly this reason.

What rules does the markup have to follow?

The markup must describe what visitors can see on the same page. If the JSON-LD says the walk is free, the page should say so too. If it gives a price, the price should be on the page. Marking up content that is hidden, out of date or untrue breaks Google's structured data guidelines.

That includes reviews and ratings. Adding an aggregateRating with invented stars, or reviews the business wrote about itself, is spam under those guidelines. Google can apply a manual action that removes rich results from the whole site, and the Manual actions report in Search Console tells you when that happens.

Keep the details accurate as they change. A cancelled walk should have its eventStatus set to EventCancelled or the page updated. A sold-out loaf should say so in availability. Stale markup is one of the easiest ways to lose trust.

How do you test it?

Google's Rich Results Test takes an address or a block of code and shows which rich result types the page is eligible for, with errors that block eligibility and warnings for missing recommended properties. The Schema Markup Validator, run by schema.org, checks any schema.org markup against the vocabulary, including types Google does not use for rich results.

Once the site is live, Search Console shows a report for each rich result type it finds on your site, such as Events or Product snippets, with the pages that are valid and the ones with problems. URL Inspection shows the structured data Google detected on one page the last time it was crawled.

Test the live page as well as the code you pasted. A content system or a plugin can add its own JSON-LD, and two blocks that disagree are a common cause of confusing warnings.

  • Errors: something required is missing or invalid, so the item is not eligible.
  • Warnings: something recommended is missing. The item can still be eligible.
  • Not detected: the block was skipped, often because the JSON is invalid or a script adds it too late.

What do AI tools get wrong about structured data?

AI tools often suggest FAQPage or HowTo markup "to get rich results", which stopped working for ordinary sites in 2023. They invent aggregateRating values or reviews to add stars, which breaks the guidelines and can bring a manual action. They write dates in a readable form, like "2 May 2027", rather than ISO 8601, or forget the time zone.

They also produce JSON-LD that looks right and is not valid: a trailing comma, curly quotes copied from a document, or a price written as "£4.20". And they mark up content that is not on the page, such as an address the page never shows. Run anything an AI tool writes through the Rich Results Test before you publish it.

Where does the lab simplify?

The lab checks a handful of types and their main required properties: Event, LocalBusiness and its subtypes, Organization, BreadcrumbList, Product, FAQPage, HowTo, Article and WebSite. Google's real requirements have more detail, change over time and differ between result types. Always confirm with the Rich Results Test on the live page.

The lab reads only JSON-LD, and only what is in the HTML the server sends. Google also reads Microdata and RDFa, and it can read JSON-LD added by JavaScript after rendering, though that can be slower and less reliable. The lab compares names with the page text using a simple match; real search engines judge whether markup fits the page in their own way.

Field notes

  • Structured data describes a page in schema.org terms, most often in a JSON-LD script block.
  • Correct markup can make a page eligible for rich results, which are never guaranteed.
  • Structured data does not raise rankings, and it must match content visible on the page.
  • Test markup with the Rich Results Test and watch the reports in Search Console.

Easy to get wrong

Dates in structured data use ISO 8601: year, month, day, then the time and its offset from UTC. Readable dates belong in the page text.

The price must be a plain number. The currency has its own property.

Invented or self-written ratings break Google's guidelines and can lead to a manual action that removes rich results from the site.

FAQ rich results are limited to well-known government and health sites since 2023, so the markup will not add anything for a bakery.

Questions people ask

Do I need structured data on every page?

No. Add it where a type fits the main content: events, products, the business itself, breadcrumbs. Many pages, such as an About page, need none.

My markup is valid. Why is no rich result showing?

Valid markup makes a page eligible. Google decides for each search whether to show the extras, and it may also need to recrawl the page first. Check the rich result report in Search Console after a few weeks.

Can I put JSON-LD in the body instead of the head?

Yes. Google reads JSON-LD anywhere in the page. Many sites keep it in the head to make it easy to find.

Does structured data help AI answers or chat tools?

Search engines use it to understand pages, and that understanding feeds many of their features. No search engine promises that markup changes what an AI answer says, so treat any claim like that with care.

Keep going