Quantity
Quantity is a Thing subtype. Quantities such as distance, time, mass, weight, etc. Particular instances of say Mass are strings like '3 kg' or '4 milligrams'.
Full example of schema.org/Quantity json-ld markup
The markup is verified as valid with Rich Results Test from Google.
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "Quantity",
"name": "Example Quantity"
}
</script>Minimal valid version
The smallest markup that still produces a valid Quantity entity. Use it as the floor. Reach for the advanced example above when you want search engines and AI agents to understand more about your content.
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "Quantity",
"name": "Example"
}
</script>Google rich results this unlocks
Quantity is a structural type. It does not produce a rich result on its own.
Its value comes from combining it with a primary type whose markup earns a rich result (Article, Product, Event, and so on). Quantity becomes the trunk that the primary type branches off viamainEntityorbreadcrumb. Include it on every page as the backbone of your markup.
Common Quantity mistakes
Mistakes that pass validation but silently fail to earn rich results or mislead consumers walking the graph. Avoid these and your markup will be ahead of most sites in the wild.
- 01
Using bare Thing instead of the specific Quantity subtype
Wrong"@type": "Thing"Right"@type": "Quantity"Specific subtypes carry domain context consumers use; reach for the narrowest applicable type.
Also mentioned in 3 other examples
Quantity also appears in Distance, Energy, and Mass. See the full Quantity schema page for every reference.
About the example data
Reference entry in the Xoo Code schema.org catalogue.
Comments
Loading comments...