Skip to content
Select theme

Structured data and JSON-LD

What structured data, the Schema.org vocabulary and the JSON-LD format are, why a site prepared for search and AI needs them, and which markup fits a store, a blog, a forum, a knowledge base and a photo gallery

Three different words

What is described

  • structured datafacts about the page in machine-readable form

In which words

  • Schema.orga shared vocabulary of types and properties: Product, Article, price, author

How it is written

  • JSON-LDa separate block of data in the page code
  • Microdata, RDFaattributes inside HTML tags

One vocabulary, three ways to write it. Google recommends JSON-LD.

A JSON-LD block sits in the page code and is not shown on screen:

<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "Product",
"name": "Volna electric kettle 1.7 l",
"sku": "VLN-17-W",
"brand": { "@type": "Brand", "name": "Volna" },
"offers": {
"@type": "Offer",
"price": "24.90",
"priceCurrency": "EUR",
"availability": "https://schema.org/InStock"
}
}
</script>

@context names the vocabulary, @type names the type of the entity. The rest are properties of that type. Case matters: Product and product are different words.

What a machine learns at each layer
  1. robots.txtMay I go here
  2. sitemap.xmlWhich addresses exist
  3. llms.txtWhich material is most useful, and where it is
  4. JSON-LDWhat is on this pagethe entity, its properties and relations
  5. HTML / MarkdownWhat does it say

This is a teaching model of roles. It does not claim that every system uses every layer the same way.

llms.txt and structured data work as a pair, at different steps. The first suggests where to go. The second explains where the machine has arrived. Neither replaces the other: An AI-ready site.

What is known and what is not

Confirmed

  • Google uses structured data to understand the content of a page and recommends the JSON-LD format.
  • Google Merchant Center reads the markup of product pages and uses it to update price and availability in product listings.
  • For product pages marked up as Product with an Offer, Yandex gives the data in the markup the highest priority over other sources.
  • Both search engines run their own markup validators.

Not proven

  • That a particular AI system reads the JSON-LD of other sites directly. Only the documentation of that system can settle it.
  • That markup increases the number of citations in AI answers.

What it does not mean

  • Markup is not a condition for indexing: a page will be found without it.
  • Markup is not a ranking factor. It makes a page eligible for rich results; nobody guarantees they will be shown.

Search engines read the markup, and their documentation says so. Through search it reaches AI systems as well.

The value for AI is not limited to direct reading. AI search and agents often take facts from search engines, and those do read the markup.

The type is chosen by what is actually on the page.

Site Page Schema.org type Main properties
Any every page WebPage, BreadcrumbList name, address, dates, the path from the home page
Any home page WebSite, Organization name, logo, contacts, address, social profiles
Online store product Product, Offer name, SKU, brand, price, currency, availability, rating
Blog, media article BlogPosting, Article, Person headline, author, publication and update dates, image
Forum, community discussion DiscussionForumPosting, Comment topic, author, date, comments, votes
Questions and answers a question with an accepted answer QAPage, Question, Answer the question, the answers, the accepted solution
Knowledge base an FAQ entry FAQPage, Question, Answer a question and the site owner’s answer
Photo gallery photo, album ImageObject, ImageGallery file address, caption, dimensions, upload date

QAPage and FAQPage are easy to mix up. The first is for a page where one person asks and others answer. The second is for a list of questions answered by the site owner.

A product page gives the markup the most work. It has a price and availability, they change, and a customer will see a mistake.

What product markup consists of

Producta product

  • namethe name, as on the page
  • skuthe seller’s SKU
  • gtin13 / mpnbarcode and manufacturer part number, when they exist
  • brandBrand: the brand name
  • imageimage addresses
  • offersOffer: the offer
    • pricea number with a decimal point, no spaces and no currency sign
    • priceCurrencya currency code: USD, EUR, RUB
    • availabilityInStock, OutOfStock, BackOrder
    • urlthe address of the product page
  • aggregateRatingAggregateRating: the average score and the number of reviews
  • reviewReview: reviews with an author and text

Next to the product, mark up breadcrumbs (BreadcrumbList) and the store itself (OnlineStore or Organization).

  • The price in the markup equals the price on the page. Not “from”, not the old one, not the price for another region.
  • The currency is a three-letter code. A machine will not parse a currency sign.
  • Availability comes from stock records; it is not InStock for every product at once.
  • A product without a price gets no Offer. An empty or zero offer is worse than a missing one.

When a product comes in sizes or colors, every variant has its own price, SKU and availability. Schema.org has ProductGroup for that: shared facts sit on the group, differences on the variants.

AggregateOffer does not fit variants of one product. That type describes offers from different sellers, and Google requires Offer for merchant listings.

gtin is the international barcode, mpn is the manufacturer’s part number. Systems use them to match the same product across stores.

They must not be invented. A barcode has a check digit, and a wrong value is worse than an empty field. A store’s own SKU is sku, not mpn.

Large platforms receive product data two ways: from a feed and from the page. When the two disagree, the platform notices.

One source, two outputs
  1. The store catalogprice, availability, brand, barcode
  2. Markup on the pageProduct and Offer in JSON-LD
  3. The product feedthe same product for Merchant Center

Markup and feed should be built from the same catalog fields. Then they cannot drift apart.

  • Google Merchant Center compares the feed with the page and can update price and availability from the markup by itself. Google notes that this is a safety net, not a replacement for updating the feed.
  • Yandex gives the data in product page markup the highest priority over other sources.

The practical point: brand, barcode, color and size should come into the markup and into the feed from one product attribute.

  • Markup describes what a person sees. A review, a price or an author in the markup is also on the page.
  • Nothing is invented. No data, no property.
  • The type matches the page. A category page is not a Product; an “About” page is not an Article.
  • Entities are linked. An article points to its author and publisher, a product to its seller, a page to the site. @id is used for the links.
  • One source. When both the site theme and an extension output markup, the machine gets two conflicting descriptions.
  • Markup changes together with content. The price changed, so the markup changed.
  1. Open the page source and find the application/ld+json block. It has to be in the server response, not added later by scripts.
  2. Run the page through Google’s Rich Results Test: which types were found and whether there are errors.
  3. Run it through the Schema Markup Validator as well.
  4. Compare the price, availability and name with what is on screen.
  5. Make sure there is one markup: no second block of the same type coming from the theme.
  6. Repeat on three or four different pages, not on one lucky page.

Tool addresses and how to read the errors: Validating files and markup.

Almost every property already lives in the content management system: the product name, the price, the article date, the author. There is no reason to write markup by hand for each page. A site theme or an extension builds it.

What stays manual: deciding which attributes are the brand and the barcode, filling in the company card, and checking the result.

  • Webasyst

    Shop-Script

    Markup for products and the store

    Data source
    Products, SKUs, prices, availability, reviews, categories and store settings
    Describes
    ProductOfferAggregateRatingBreadcrumbListOnlineStore

    ready-made

    View the extension
  • Webasyst

    Site

    Markup for pages and the company

    Data source
    Site pages, their dates and nesting, the company card from settings
    Describes
    WebPageOrganizationWebSiteBreadcrumbList

    ready-madeThe base edition is free

    View the extension
  • Webasyst

    Blog

    Markup for posts and authors

    Data source
    Posts, publication and update dates, authors, categories and tags
    Describes
    BlogPostingPersonBlogBreadcrumbList

    ready-made

    View the extension
  • Webasyst

    Hub

    Markup for discussions and answers

    Data source
    Published topics, comments, votes and the accepted solution
    Describes
    DiscussionForumPostingCommentQAPagePerson

    ready-made

    View the extension
  • Webasyst

    Helpdesk

    Markup for questions and answers

    Data source
    Public questions and answers only; tickets are not read
    Describes
    FAQPageQuestionAnswerBreadcrumbList

    ready-made

    View the extension
  • Webasyst

    Photos

    Markup for photos and albums

    Data source
    Public photos and albums: captions, tags, dimensions, upload date
    Describes
    ImageObjectImageGalleryBreadcrumbList

    ready-made

    View the extension

Promo code for a discount on your first Webasyst order:BE462B3B6D

Commercial extensions from the Webasyst Store. Each one adds a JSON-LD block built from the data of its app to the page code, with no theme edits. Markup made by an extension is checked with the same validators as markup written by hand.