How to find correct schema definitions for my website
The website http://schema.org/ is the relevant and the only canonical source for Schema.org types and properties.
Type vs. property. A type represents a thing, a property is for providing information about that thing. The name of a type always starts with an uppercase letter (e.g., Person
), the name of a property always starts with a lowercase letter (e.g., name
).
Available properties. If you want to provide structured data about your content, the first thing you have to do is to find appropriate types that can represent the things/entities your content represents or is about. If you know the type, knowing which properties can be used is easy: they are listed in the table of the type’s page.¹
Type hierarchy. Types are organized in a hierarchy, and each type inherits the meaning and the properties from all its parent types. The child types, if any exist, are listed at the bottom of the type page ("More specific Types"). The top-level type is Thing
. So no matter which Schema.org type you use (Person
, Rating
, etc.) it’s always (also) a Thing
.²
How to find a suitable type? There are two ways:
- Start at
Thing
and go down the hierarchy. - Go to http://schema.org/docs/full.html (which lists all types on a single page) and use your on-page search (Ctrl+f) with some related keywords.
The second way can be quick, but you need luck as you need to use the same words as the Schema.org team used. The first way will always work, but might require more work.
The "algorithm" for going down the hierarchy is obvious:
- Look at the sub-types of the current type.
- Is there a sub-type that matches your entity?
- Yes: Make this sub-type the new current type and go to step 1.
- No: Use the type from step 1.
It’s always okay to go with Thing
if there doesn’t exist a more specific type for your case (Schema.org doesn’t offer specific types for everything) or if you can’t find one. But it’s of course a good practice and useful to use the most specific type availabe.
So look at the sub-types of Thing
: Is it an Action
? Is it a CreativeWork
? Is it an Event
? Let’s pretend it’s an Event
. You could now use Event
, but, again, try to find a more specific type: Is it a BusinessEvent
? Is it a ChildrensEvent
? And so on.
¹ Only the first table on that page lists the properties you can use. The second table (titled "Instances of […·] may appear as values for the following properties") lists properties that can have the page’s type as value.
² There is actually another top-level type, DataType
, but there is typically no need for authors to use it.