Appearance
Implement JSON-LD
ReferenceJSON-LD (JavaScript Object Notation for Linked Data) is the recommended way to add schema.org structured data to most pages. The structured data sits in a script block and is kept separate from the visible markup, which makes it easy to add, audit, and maintain.
Objective
Add valid schema.org JSON-LD to a page so that search engines can understand the entity the page describes.
Steps
Identify the primary entity of the page. A product page describes a
Product. An article describes anArticle. A local business page describes aLocalBusinessor a more specific subtype.Choose the most specific type. Prefer
RestaurantoverLocalBusinesswhen the page is about a restaurant. PreferMovieoverCreativeWorkfor a film.Create a script block. Place a
scriptelement with the typeapplication/ld+jsonin the head or body of the page.
html
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "Product",
"name": "Executive Anvil",
"image": "https://example.com/anvil.jpg",
"description": "Sleeker than ACME's Classic Anvil.",
"sku": "0446310786",
"brand": {
"@type": "Brand",
"name": "ACME"
},
"offers": {
"@type": "Offer",
"url": "https://example.com/anvil",
"priceCurrency": "USD",
"price": "119.99",
"availability": "https://schema.org/InStock"
}
}
</script>Add the context. The
@contextvalue ofhttps://schema.orgtells parsers that property names map to the schema.org vocabulary.Add the type. The
@typevalue names the type. Nested objects each get their own@type.Add required and recommended properties. Use the property names exactly as defined in the vocabulary. Values can be text, numbers, URLs, dates in ISO 8601 format, or nested objects.
Reference enumerations by URL. Properties such as
availabilityexpect an enumeration member, written as a full vocabulary identifier such ashttps://schema.org/InStock.Validate. Test the output, fix any errors, and publish.
Done when
- The JSON-LD parses as valid JSON.
- The validator reports no errors for the chosen type.
- The visible content on the page matches the structured data.
Common pitfalls
- Structured data that does not match the visible page content can be treated as spam.
- Dates must use ISO 8601, for example
2026-06-10. - Currency values are strings, not numbers, to preserve formatting.