Here is my schema:
<script type="application/ld+json">
{
"#context": "http://schema.org",
"#type": "Organization",
"address": {
"#type": "PostalAddress",
"addressLocality": "California, USA",
"postalCode": "92867",
"streetAddress": "1636 W Collins Ave"
},
"telephone": "18008931107",
"name": "Mesa Garage Doors",
"parentOrganization": {
"name": "Overhead Garage Doors Store"
}
}
</script>
If you go test this schema on Google’s schema checker, I get this error:
The property parentOrganization is not recognized by Google for an object of type Organization.
I am using this parentOrganization property from Schema.org: http://schema.org/parentOrganization
Anyone know how to do this?
Update: The below answer is for version 2.0 of Schema.org. Since version 2.1 (see commit), parentOrganization can be used for Organization, too.
The parentOrganization property (which was previously named branchOf) is only defined for LocalBusiness, not for the broader Organization.
When using Organization, the only available properties for relationships to another Organization are:
department
member/memberOf
subOrganization
(As of version 2.0.)
Related
I am trying to set up Schema.org on a website, but I have trouble understanding how to use the #id attribute.
I want to specify a Corporation and a WebSite. Here is the code without a reference between the two objects:
<script type="application/ld+json">
[{
"#context": "https://schema.org",
"#id": "https://www.example.com/#corporation",
"#type": "Corporation",
"name": "Company Name",
"legalName": "Company Name",
"description": "Company Description",
"url": "https://www.example.com",
"logo": "https://www.example.com/logo"
},
{
"#context": "https://schema.org",
"#type": "WebSite",
"name": "Example",
"url": "https://www.example.com"
}]]
</script>
The Schema.org validator finds both the Corporation and the WebSite. Google's Rich result test tool finds the logotype, as expected. Now, I want to add a reference to the Corporation as the publisher of the WebSite.
<script type="application/ld+json">
[{
"#context": "https://schema.org",
"#id": "https://www.example.com/#corporation",
"#type": "Corporation",
"name": "Company Name",
"legalName": "Company Name",
"description": "Company Description",
"url": "https://www.example.com",
"logo": "https://www.example.com/logo"
},
{
"#context": "https://schema.org",
"#type": "WebSite",
"name": "Example",
"url": "https://www.example.com",
"publisher": {
"#id": "https://www.example.com/#corporation"
}
}]]
</script>
The Schema.org validator now only shows the WebSite and has inlined the Corporation as publisher. The Google tool does not find any objects, but I was expecting it to still find the logotype.
I have spent quite some time with the Schema.org docs and searched the internet but I can't find an explanation to this behavior.
Am I doing it the wrong way? Thanks in advance.
At the moment logo is only shown in reports if it is in a top-level Organization entity. It is still recognised internally.
Google's logic sometimes ignores embedded entities.
I found a reference from Google on this. Point 2:
I have inline Schema.org code via itemprop attributes, on all event pages on a website.
Search Console is flagging up recommendations that I use performer and various other properties, however due to the nature of the events (they are races), there are no performers.
Does this imply that event is the wrong type of Schema.org here, or can the warnings be safely ignored?
The tags used are:
type
image
name
location
type
address
type
streetaddress
addresslocality
address country
type
name
aggregaterating
type
reviewcount
ratingvalue
The Event type is perfectly suitable for races. But you should use the more specific SportsEvent.
Schema.org never requires any property, but consumers (who offer features based on Schema.org structured data) have their own requirements. If you want to get the feature, you would have to comply; if you don’t want the feature (or you can’t get it because you can’t provide all the required data), you can simply ignore any kind of errors/warnings from this consumer.
The consumer Google Search offers the event rich result feature, which has required and recommended properties. The performer property is just recommended, so it should be possible to get the event rich result without providing a performer.
Note that the guide of Google for Event requires the use of the following property that are not in the markup scheme you specified: startDate.
There are also many recommended properties out there that you are missing and these lower the value of the rich results of Google in the SERP:
description
endDate
location.name
offers
Note that the property executor can have the embedded type PerformingGroup, e.g.:
"performer": {
"#type": "PerformingGroup",
"name": "McLaren"
}
This way you can create markup for the team but not for each rider.
More detailed markup with structured data enriches the SERP of your web pages.
Beeing a webdeveloper and racedirector, I have been looking into this for some time now. If you take a look at the races website (no, this is no advertising for the best race on the planet), you can see that I have an event (SportsEvent) and six different competitions on that very day: 100km ultramarathon
What you see here is what I assembled so far to make my race as machine readable as possible. I have the adress, the different competitions, the place, the entry fees and the offers, the dooring time and all the stuff I might need google to know.
The only thing that is missing is the list of the competitors, the runners of each race. I am doing research about how to do this right now, but "sports" in microformats seems to be a team based thing. If I found out how to do it right, I'll post an update here. And you'll see it in the websites source code of course.
I have copied the LD-JSON here for future reference in case I'd edit the code of the website.
FYI: I am getting the participants data as XML feed directly from the raceresult registration website.
<script type='application/ld+json'>
{
"#context": "http://schema.org",
"#type": "SportsEvent",
"#id": "https://whew100.de/wettbewerbe/whew100.html",
"name": "WHEW100 Ultramarathon",
"image": "https://whew100.de/assets/images/WHEW100_transparent.png",
"url": "https://whew100.de/wettbewerbe/whew100.html",
"description": "WHEW100 Ultramarathon in Wuppertal über Wülfrath, Velbert, Heiligenhaus, Essen, Hattingen und Sprockhövel. Auf alten Bahntrassen zwischen Wuppert und Ruhr.",
"startDate": "2019-05-04T07:00:00",
"endDate": "2019-05-04T22:00:00",
"doorTime": "2019-05-04T06:00:00",
"maximumAttendeeCapacity": "200",
"aggregateRating": {
"#type": "AggregateRating",
"ratingValue": "4.9",
"reviewCount": "84"
},
"location": {
"#type": "Place",
"name": "Utopiastadt",
"sameAs": "https://www.clownfisch.eu/utopia-stadt/bahnhof-mirke/",
"address": {
"#type": "PostalAddress",
"streetAddress": "Mirker Straße 48",
"addressLocality": "Wuppertal",
"postalCode": "42105",
"addressCountry": "Germany"
}
},
"competitor": [
],
"offers": {
"#type": "Offer",
"description": "Anmeldung zum WHEW100",
"url": "http://my.raceresult.com/105067/",
"price": "75",
"priceCurrency": "EUR",
"availability": "200",
"validFrom": "2018-09-01T00:00:00"
},
"superEvent": {
"#id": "https://whew100.de",
"name": "WHEW100",
"startDate": "2019-05-04T07:00:00",
"endDate": "2019-05-04T22:00:00",
"location": {
"#type": "Place",
"name": "Utopiastadt",
"sameAs": "https://www.clownfisch.eu/utopia-stadt/bahnhof-mirke/",
"address": {
"#type": "PostalAddress",
"streetAddress": "Mirker Straße 48",
"addressLocality": "Wuppertal",
"postalCode": "42105",
"addressCountry": "Germany"
}
}
}
}
</script>
I'm trying to accomplish machine-understandable relationship descriptions for companies/subsidiaries and their websites. Let's suppose there is one parent company with two subsidiaries, all of which have their own websites. I deploy one Organization script, and one WebSite script per home page.
The parent organization's JSON-LD reads:
<script type="application/ld+json">
{
"#context": "http://www.schema.org",
"#type": "Organization",
"#id": "https://www.parentorg.com/#organization",
"name": "Parent Org",
"legalName": "Parent Org Inc.",
"description": "Description of company",
"foundingDate": "1978",
"logo": "https://www.parentorg.com/images/logo.png",
"image": "https://www.parentorg.com/de/images/outside.jpg",
"url": "https://www.parentorg.com/",
"address": {
"#type": "PostalAddress",
"streetAddress": "Street 110",
"addressLocality": "City",
"postalCode": "XX XXX",
"addressCountry": "XX"
},
"contactPoint": {
"#type": "ContactPoint",
"contactType": "customer support",
"telephone": "+12-345-678-91011",
"email": "contact#parentorg.com"
},
"sameAs": [
"https://twitter.com/parentorg/",
"https://www.instagram.com/parentorg/",
"https://www.youtube.com/user/parentorg/",
"https://plus.google.com/parentorg"
],
"subOrganization": [
{
"#type": "Organization",
"#id": "https://www.subsidiary-one.de/#organization",
"name": "Subsidiary One"
},
{
"#type": "Organization",
"#id": "https://www.subsidiary-two.de/#organization",
"name": "Subsidiary Two"
}
]
}
</script>
The parent's website JSON-LD is:
<script type="application/ld+json">
{
"#context": "http://schema.org",
"#type": "WebSite",
"#id": "https://www.parentorg.com/#website",
"url": "https://www.parentorg.com/",
"author": {
"#type": "Organization",
"#id": "https://www.parentorg.com/#organization",
"name": "Parent Org"
}
}
</script>
And now the subsidiaries' organization JSON-LD contain a parentOrganization property:
"parentOrganization": {
"#type": "Organization",
"#id": "https://www.parentorg.com/#organization",
"name": "Parent Org"
}
Would this be a good way to cross-reference those entities? And do I even need to write out the name properties inside subOrganization, parentOrganization, and author, when there are URIs referenced?
Yes, you follow the best practice how to cross-reference entities (by giving each entity an #id that is different from the url).
You don’t have to provide additional properties when referencing entities, so this is fine:
"author": {"#id": "https://www.parentorg.com/#organization"}
"subOrganization": [
{"#id": "https://www.subsidiary-one.de/#organization"},
{"#id": "https://www.subsidiary-two.de/#organization"}
]
"parentOrganization": {"#id": "https://www.parentorg.com/#organization"}
However, this of course requires that consumers fetch the referenced documents. But not all do (probably). So if you want to provide data for those consumers, too, you could add properties in addition to the #id. It could be just one, a few, or even all properties. I think the two from your example are the most important ones:
Providing #type can also be useful for consumers that are capable of fetching documents, as it may allow them to decide whether the referenced resource is of interest to them before fetching it. For example, a consumer might only care about works authored by an Organization, not by a Person.
Providing the name property can be useful for consumers that display the included structured data in some way that benefits from a name/label.
The schema.org docs refer sometimes to "pointers". E.g. Product schema has the property isSimilarTo.
I do understand, that I could use a Productor a Service directly. E.g.:
<script type="application/ld+json">
{
"#context": "http://schema.org/",
"#type": "Product",
"name": "BMW",
"isSimilarTo": {
"#type": "Product",
"name": "Mercedes Benz"
},
"offers": {
"#type": "Offer",
"priceCurrency": "EUR",
"price": "100000.00"
}
}
</script>
Is this the only and the correct way using and interpreting the term 'pointer' in this context? For a pointer, I would rather expect some value (an ID or an URL or similar) just pointing to another product or service.
Your example is correct, and it follows Schema.org’s recommendation for the expected value of the isSimilarTo property. But Schema.org allows URI values for each property, even for those that don’t explicitly list URL as expected value.
So you could also use:
"isSimilarTo": {
"#id": "https://example.com/products/mercedes-benz#this"
},
Note that consumers (like Google) don’t necessarily follow these references. You could also use both ways: provide the data (or some of it) on the current page, and refer to the item’s URI:
"isSimilarTo": {
"#id": "https://example.com/products/mercedes-benz#this",
"#type": "Product",
"name": "Mercedes Benz",
"url": "https://example.com/products/mercedes-benz"
},
I have a database of locations that I would like to publish as Open Data. each record can have one of several licenses depending on where the data was sourced from so each record needs to have a license attached. I'm publishing the data as json-ld. Sample record:
{
"#context": "http://schema.org",
"#type": "Place",
"name": "METROPOLITAN MUSEUM OF ART",
"address": {
"#type": "PostalAddress",
"streetAddress": "1000 5TH AVE",
"addressLocality": "NEW YORK",
"addressRegion": "NY",
"addressCountry": "United States",
"postalCode": "10028-0198"
},
"hasMap": "http://www.openstreetmap.org/?mlat=40.7784&mlon=-73.9627#map=15/40.7784/-73.9627",
"geo": {
"#type": "GeoCoordinates",
"latitude": 40.7784,
"longitude": -73.9627
},
"description": null,
"telephone": "+1 (212) 472-2764",
"url": "http://www.metmuseum.org",
"openingHours": null,
"photo": {
"#type": "ImageObject",
"contentUrl": "http://127.0.0.1:8888/fSunhLAJFSmnx55GNJee2-YKcgE=/1000x1000/museums/logos/000/149/449/original/NYC_-_Metropolitan_-_Temple_of_Dendur.JPG",
"creator": "Jean-Christophe BENOIST",
"license": "CC BY 3.0"
}
}
The schema.org Place model doesn't have a field for 'license'. What is the correct way to add a license type field to the record? Essentially I want to embed a CreativeWork field in there if possible.
It seems that you want to provide a license for the document that is about the Place, not for the Place itself.
So go with CreativeWork (or one of its sub-types, like WebPage if the document is a web page) and make use of its license property.
To state that this CreativeWork is about the Place, you could use the about property, and to state that the Place is the primary entity described in this document, you could use the mainEntity property.
If you want to keep Place as the top-level node, you could use JSON-LD’s #reverse for the about property, and use mainEntity’s inverse property, mainEntityOfPage.
Using http://schema.org/Dataset (which is a type of CreativeWork) will allow you to set a license. Place is a field within Dataset so they fit together. The license for your ImageObject should also be the URL of the license not the text (which I found out after having issues with it).
Dataset includes datasetTimeinterval, distribution, includedDataCatalog and spatial (a Place). Dataset was only introduced in May