Library
Library is a direct LocalBusiness subtype for public libraries, academic libraries, research libraries, and private book collections open to the public. It adds no properties of its own.
Full example of schema.org/Library 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": "Library",
"name": "Dunmore Public Library",
"address": { "@type": "PostalAddress", "streetAddress": "18 Main St", "addressLocality": "Dunmore", "addressRegion": "PA", "postalCode": "18512", "addressCountry": "US" },
"telephone": "+1-570-555-1301",
"openingHours": "Mo-Th 09:00-20:00, Fr-Sa 09:00-17:00, Su 12:00-17:00",
"isAccessibleForFree": true,
"url": "https://xoocode.com/civic/dunmore-public-library"
}
</script>Minimal valid version
The smallest markup that still produces a valid Library 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": "Library",
"name": "Dunmore Public Library",
"address": { "@type": "PostalAddress", "streetAddress": "18 Main St", "addressLocality": "Dunmore", "addressRegion": "PA", "postalCode": "18512", "addressCountry": "US" }
}
</script>Google rich results this unlocks
Library 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). Library becomes the trunk that the primary type branches off viamainEntityorbreadcrumb. Include it on every page as the backbone of your markup.
Common Library 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
Library for a bookstore
WrongLibrary on a retail booksellerRightBookStore for retail; Library for lending institutionsThe two serve opposite buyer intents (borrow vs buy).
Schema properties in this example
About the example data
"Dunmore Public Library", a fictional community library.
Comments
Loading comments...