XooCode(){

Collection

Collection is a CreativeWork subtype for a bibliographic or archival grouping: a library special collection, a museum archive, a curated anthology, a set of films or albums held together. It adds one property: collectionSize (Integer, the number of items).

Its direct subtype is ProductCollection (used in commerce for multi-product listings). For archival context, pair Collection with ArchiveComponent on each item and an ArchiveOrganization as holdingArchive.

Full example of schema.org/Collection json-ld markup

The markup is verified as valid with Rich Results Test from Google.

Highlight legend:Required by GoogleRecommendedOptional
schema.org/Collection
<script type="application/ld+json">
{
  "@context": "https://schema.org",
  "@type": "Collection",
  "name": "Xoo Code Archive of Early JSON-LD",
  "description": "Curated archival collection of 1,248 public JSON-LD snippets from 2018-2024, alongside blog posts, videos, and documentation that shaped early structured data practice.",
  "collectionSize": 1248,
  "creator": { "@type": "Organization", "name": "Xoo Code Archive Team" },
  "dateCreated": "2024-12-15",
  "holdingArchive": { "@type": "ArchiveOrganization", "name": "Xoo Code Archive" },
  "url": "https://xoocode.com/archive/early-jsonld",
  "license": "https://creativecommons.org/licenses/by/4.0/"
}
</script>

Minimal valid version

The smallest markup that still produces a valid Collection 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.

schema.org/Collection (minimal)
<script type="application/ld+json">
{
  "@context": "https://schema.org",
  "@type": "Collection",
  "name": "Xoo Code Archive of Early JSON-LD",
  "collectionSize": 1248
}
</script>

Google rich results this unlocks

Markup matching this example makes your page eligible for the following Google Search rich results. The primary target drives the required / recommended property classification in the advanced code block above.

  • No dedicated rich result (used by library / museum indexers)
    Google docs

Common Collection 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.

  1. 01

    Using Collection for a product bundle

    Wrong
    Collection on a commerce page listing multiple products
    Right
    ProductCollection (a Collection subtype) for multi-product listings

    ProductCollection is the commerce-specific subtype and carries inherited Offer / Product semantics that generic Collection lacks.

  2. 02

    Using Collection for a simple article list

    Wrong
    Collection for a 'top 10' blog post
    Right
    ItemList with a ranked set of ListItem for curated lists; Collection is for archival / bibliographic groupings

    ItemList drives Google's ranked-list rich results. Collection is a bibliographic concept.

About the example data

The Xoo Code Archive of Early JSON-LD: a 1,248-item curated collection of public JSON-LD snippets and associated ephemera collected 2018-2024.

Comments

Loading comments...

Leave a comment