schemamarkup.wikiThe schema.org and structured data reference

additionalType

From schemamarkup.wiki, the sourced reference on schema.org and structured data

additionalType lets an item declare "an additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax."[1] Schema.org explains that it is "a relationship between something and a class that the thing is in," usually a URI-identified RDF class, in which case it "corresponds to the use of rdf:type in RDF."[1] It is defined on Thing and accepts Text or URL.[1] Google's LocalBusiness documentation says plainly that additionalType "isn't supported" there and that multiple types should be given as an array.[2]

Definition

PropertyExpected valuesSchema.org definition (quoted)
additionalTypeText, URL"An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. Typically the value is a URI-identified RDF class, and in this case corresponds to the use of rdf:type in RDF. Text values can be used sparingly, for cases where useful information can be added without their being an appropriate schema to reference. In the case of text values, the class label should follow the schema.org style guide."[1]

The definition names Microdata because Microdata's itemtype attribute takes types from one vocabulary, so additionalType was the way to add a class from another. In JSON-LD, the @type keyword can already hold several values.[1][3] Schema.org says text values "can be used sparingly," with labels that follow the schema.org style guide.[1]

additionalType versus multiple @type values

Schema.org's own example on the additionalType page marks a library record as a Book with additionalType "Product," so that it can carry Product properties such as offers.[1] Google's LocalBusiness documentation takes the other route for business types: "If you have multiple types, specify them as an array (additionalType isn't supported)," with the example "@type": ["Electrician", "Plumber", "Locksmith"].[2]

For schema.org's own types in JSON-LD, then, an @type array is the form Google documents. additionalType remains the property for classes that schema.org does not define, from other vocabularies.[1][2]

External vocabularies

The value is normally the URI of a class in another vocabulary.[1] Two kinds of URI are commonly used for this. One is an entity URI from a knowledge base such as Wikidata, which schema.org already names as a suitable sameAs target.[4] The other is a class from a product or industry classification published as linked data.

Two points need care. First, a Wikidata item identifies a thing or a concept; whether it is appropriate as an RDF class for additionalType depends on whether the item represents a class of things (for example, "dentist" as a profession or "tankless water heater" as a product category) rather than one entity. Schema.org does not rule on particular external URIs, so this is a judgment the publisher makes.[1] Second, the URI should be checked: it should resolve, describe a class that genuinely contains the item, and not be a near-miss. No Google documentation says that Google reads additionalType values from external vocabularies for any feature.[5][2]

additionalType, sameAs and about

  • additionalType says what kind of thing the item is: the item belongs to the class.[1]
  • sameAs says which thing the item is: the URL identifies this very item.[4]
  • about says what a creative work discusses.[6]

Pointing sameAs at a class ("dentist") or additionalType at a single entity ("Example Dental Clinic") confuses the two.[4][1]

Why additionalType exists in Microdata

The HTML Standard says the itemtype attribute of a Microdata item must hold absolute URLs that are "all of which are defined to use the same vocabulary".[7] That rule means a Microdata item cannot list a schema.org type and a type from another vocabulary in itemtype at the same time. The additionalType property, which takes a URL as a value, gives a way to state the extra type as a property instead. Schema.org's own definition describes the same use: "An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. Typically the value is a URI-identified RDF class, and in this case corresponds to the use of rdf:type in RDF."[1]

In JSON-LD there is no such limit. JSON-LD allows @type to hold an array of values,[8] so two schema.org types can be listed together, which is the pattern Google's LocalBusiness documentation asks for when a business fits more than one type.[2]

Common mistakes

  • additionalType with a schema.org type in JSON-LD for Google. For LocalBusiness, Google asks for an @type array instead.[2]
  • Unverified class URIs. A URI that does not resolve, or names a different class, misclassifies the item.[1]
  • Text values in place of a type. Schema.org says text should be used "sparingly."[1]
  • Using additionalType for identity. Identity belongs in sameAs or identifier.[4][9]

Example

A fictional clinic typed with an @type array, plus one external class URI given with additionalType. The URI is a placeholder for a real class URI chosen and checked by the publisher.

{
  "@context": "https://schema.org",
  "@type": ["Dentist", "MedicalClinic"],
  "@id": "https://www.example.com/#organization",
  "name": "Example Endodontics",
  "additionalType": "https://www.wikidata.org/wiki/Q00000003",
  "url": "https://www.example.com/"
}

Common questions

Does Google support additionalType?

Google's LocalBusiness documentation says it isn't supported and asks for multiple types as an array.[2]

Is additionalType the same as rdf:type?

Schema.org says that with a URI value it corresponds to rdf:type.[1]

Can the value be text?

Yes, sparingly.[1]

References

  1. ^ "additionalType (property)". Schema.org.
  2. ^ "Local business (LocalBusiness) structured data". Google Search Central.
  3. ^ "JSON-LD 1.1: A JSON-based Serialization for Linked Data (W3C Recommendation, 16 July 2020)". World Wide Web Consortium (W3C).
  4. ^ "sameAs (property)". Schema.org.
  5. ^ "Structured data markup that Google Search supports (search gallery)". Google Search Central.
  6. ^ "about (property)". Schema.org.
  7. ^ "HTML Standard, section 5: Microdata". WHATWG.
  8. ^ "JSON-LD 1.1, section 9.2 Node Objects". World Wide Web Consortium (W3C).
  9. ^ "identifier (property)". Schema.org.
  10. ^ "Schema.org developer downloads (current release vocabulary files)". Schema.org.