2

I have recently been reading about productontology.org to define additional types with schema.org to be more specific.

I am building a website for a local pet store that offers various pet products, grooming and training. I have the following code for the site's schema:

<script type="application/ld+json">
{
  "@context": "http://schema.org",
  "@type": "LocalBusiness",
  "additionalType": "http://www.productontology.org/id/Dog_grooming",

  //Additional Schema Markup (opening hours, location, etc.)
}
</script>

As you can see I added an additionalType in the JSON-LD for dog grooming. Can I add multiple additionalTypes if it applies to the business? IE:

"additionalType": "http://www.productontology.org/id/Dog_grooming",
"additionalType": "http://www.productontology.org/id/Dog_training",

Or should I stick with one? In other words, is it allowed or beneficial to add more than one additionalType?

Also, is my usage of additionalType in the JSON-LD correct? (I haven't seen any real examples with additionalType and JSON-LD.)

2

Your use of additionalType in the first snippet is correct.

An example where additionalType is used can be seen on Schema.org’s IndividualProduct:

<script type="application/ld+json">
{
  "@context": "http://schema.org",
  "@id": "#product",
  "@type": "IndividualProduct",
  "additionalType": "http://www.productontology.org/id/Racing_bicycle",
  "description": "ACME Racing Bike, bought 8/2008, almost new, with a signature of Eddy Merckx on the frame.",
  "name": "ACME Racing Bike in black (2008)"
}
</script>

Adding multiple additional types is possible, too. However, not by adding the property multiple times, but, e.g., by using an array:

<script type="application/ld+json">
{
  "@context": "http://schema.org",
  "@type": "LocalBusiness",
  "additionalType": ["http://www.productontology.org/id/Dog_grooming", "http://www.productontology.org/id/Dog_training"]
}
</script>

Adding multiple additional types can of course be beneficial: if multiple types apply, so be it! It would make no sense to arbitrarily limit it to one additional type only.
You can, of course, add types from various vocabularies; they don’t have to come from the same vocabulary.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.