Is it possible to reference by #id without Schema.org inlining the object? - schema.org

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:

Related

How do i add Likes Received to Structured Data in JSON-LD for Product Type

I've been trying to figure out a way to add how many likes were received to a product using structured data. Is what I have below correct? Or would the second example be more correct?
Is my usage of ["Product","InteractionCounter"] for the type correct in the first example?
I'm trying to have the google show a likes counter much like the aggregateRating property of Product.
I'm also not sure what the url in offers is supposed to point to or if it's necessary. Any ideas?
<script type="application/ld+json">
{
"#context": "https://schema.org",
"#type": ["Product","InteractionCounter"],
"name": "CC-1",
"description": "Wedding Cake",
"interactionType":{
"#type":"LikeAction",
"name": "Likes",
"description": "Likes Received"
},
"interactionService": {
"#type":"WebSite",
"url": "https://example.com/index.php?page=gallery"
},
"userInteractionCount": 55
}
</script>
OR
<script type="application/ld+json">
{
"#context": "https://schema.org",
"#type": "Product",
"name": "CC-1",
"description": "Wedding Cake",
"additionalProperty": {
"#type": "PropertyValue",
"name": "Likes",
"description": "Likes Received",
"value": 55
}
}
</script>
This is what I have right now:
<script type="application/ld+json">
{
"#context": "https://schema.org",
"#type": ["Product","InteractionCounter"],
"name": "CC-1",
"description": "Wedding Cake with bla bla bla",
"category": "Wedding Cakes",
"brand": {
"#type": "Brand",
"logo": "https://example.com/images/logo.png",
"slogan": "Cakes Are Nice"
},
"offers": {
"#type": "Offer",
"url": "https://example.com/anvil",
"priceCurrency": "CAD",
"price": "119.99"
},
"image": "https://example.com/collection/wedding_cakes/mid_def/CC-1",
"interactionType":{
"#type":"LikeAction",
"name": "Likes",
"description": "Likes Received"
},
"interactionService": {
"#type":"WebSite",
"url": "https://mimozas.com/index.php?page=gallery"
},
"userInteractionCount": "55 PLACEHOLDER"
}
If the product is the subject of content, then it makes sense to indicate likes as part of the type Product. My suggestion for you:
{"#context":"https://schema.org",
"#type":"Product",
"name":"CC-1",
"description":"Wedding Cake",
"subjectOf":{
"#type": "InteractionCounter",
"interactionType":{
"#type":"LikeAction",
"name":"Likes",
"description":"Likes Received"
},
"interactionService":{
"#type":"WebSite",
"url":"https://example.com/index.php?page=gallery"
},
"userInteractionCount":"55"
}
}
And be careful about inverted commas.
My addition after expanding the question.
I'm trying to have the google show a likes counter much like the
aggregateRating property of Product.
Google has no direct support for the type InteractionCounter - read more Explore the search gallery. However, in the rich test results of my suggestion, there are no errors or warning messages from Google:
Probably needs experimentation.

Adding booking meta data to Google Search

I can't for the life of me figure out how this company adding this meta data to their Google search.
Does anyone know how to add the data and booking links like the below image?
Thanks
What you are seeing in these search results is what Google defines as "Rich Results" more information can be viewed in Google's Structured Data documentation. Specifically Edgewater Medical center is taking advantage of the event functionality to define times and dates.
This can be verified by pasting the page's source in the Rich Results Test tool, results for this page can be viewed at
https://search.google.com/test/rich-results?utm_campaign=devsite&utm_medium=jsonld&utm_source=event&id=m1ZrUywePCZ_NglFJIjZfg
According to google documentation in order to make this happen you have to follow a few steps:
Ensure that Googlebot can crawl your event pages (meaning, your pages
aren't protected by a robots.txt file or robots meta tag).
Ensure that your server can handle increased crawl rate.
Make sure you follow the Google guidelines.
Add structured data to your event pages. Currently, the event experience on Google only supports pages that focus on a single event. We recommend focusing on adding markup to your event posting pages instead of pages that list schedules or multiple events.
An example of such "structured data" for a standard event is shown below:
<html>
<head>
<title>The Adventures of Kira and Morrison</title>
<script type="application/ld+json">
{
"#context": "https://schema.org",
"#type": "Event",
"name": "The Adventures of Kira and Morrison",
"startDate": "2025-07-21T19:00-05:00",
"endDate": "2025-07-21T23:00-05:00",
"eventAttendanceMode": "https://schema.org/OfflineEventAttendanceMode",
"eventStatus": "https://schema.org/EventScheduled",
"location": {
"#type": "Place",
"name": "Snickerpark Stadium",
"address": {
"#type": "PostalAddress",
"streetAddress": "100 West Snickerpark Dr",
"addressLocality": "Snickertown",
"postalCode": "19019",
"addressRegion": "PA",
"addressCountry": "US"
}
},
"image": [
"https://example.com/photos/1x1/photo.jpg",
"https://example.com/photos/4x3/photo.jpg",
"https://example.com/photos/16x9/photo.jpg"
],
"description": "The Adventures of Kira and Morrison is coming to Snickertown in a can’t miss performance.",
"offers": {
"#type": "Offer",
"url": "https://www.example.com/event_offer/12345_201803180430",
"price": "30",
"priceCurrency": "USD",
"availability": "https://schema.org/InStock",
"validFrom": "2024-05-21T12:00"
},
"performer": {
"#type": "PerformingGroup",
"name": "Kira and Morrison"
},
"organizer": {
"#type": "Organization",
"name": "Kira and Morrison Music",
"url": "https://kiraandmorrisonmusic.com"
}
}
</script>
</head>
<body>
</body>
</html>

Adding Schema.org 'Brand' in JSON-LD

I have been adding rich snippets to my ecommerce store, and for the most part I have had no problems. For some reason when I go to add in the "brand" that is recommeneded by Google and Google Merchant services I have problems.
I have added this under: http://schema.org/Offer. And by adding it in the script in my header also with no luck.
<script type="application/ld+json" data-resource-group="head_tag" data-resource-code="organization_schema">{
"#context": "http://schema.org",
"#type": "Organization",
"address": {
"#type": "PostalAddress",
"addressLocality": "",
"addressRegion": "",
"addressCountry": "",
"postalCode": "",
"streetAddress": ""
},
"email": "customerservice#domain.com",
"name": "Comany namee",
"telephone": "company number"
},
"brand":{
"#type":"Thing",
"name":"[manufacture_name]"
},
</script>
<meta itemprop="brand" content="[manufacturer_name]" />
"brand":{
"#type":"Thing",
"name":"[manufacture_name]"
},
The second one just simply isn't detected for some reason.
I have code similar to the meta tag throughout the documnet so I would prefer to keep with that format if possible.
Your JSON-LD has syntax errors:
The Organization is closed with },, but the brand property appears after it.
A closing } is missing.
There should be no , after the last }.
So it would be:
{
"#context": "http://schema.org",
"#type": "Organization",
"address": {
"#type": "PostalAddress"
},
"name": "company name",
"brand": {
"#type": "Brand",
"name": "manufacturer name"
}
}
(Note that I used Brand instead of Thing.)

Defining Schema.org JSON-LD for my Multi-language Web application

I am building a web application for product comparison. The website has a structure like so:
http://example.com
http://example.com/fr/compare/
http://example.com/es/compare/
etc..
The main page is in English.
I want to insert Schema.org for each of the pages and I've construed this schema. Written in square brackets are what I intend to put as value later on.
<script type="application/ld+json">
{
"#context": "http://schema.org",
"#id": "[canonical-url-for-specific-language]#webapp",
"#type": "WebApplication",
"name": "[Product Comparison Title in specific language]",
"url": "[canonica url for specific language]",
"applicationCategory": "Utility",
"applicationSubCategory": "Product Comparison",
"about": "[page-description]",
"browserRequirements": "Requires JavaScript. Requires HTML5.",
"softwareVersion": "1.0.0",
"screenshot": "[image-url]",
"inLanguage": "[language-code]",
"softwareHelp": {
"#type": "CreativeWork",
"url": "[link-to-how-to-page-for-specific-language]"
},
"operatingSystem": "All"
}
</script>
How can I construct this JSON-LD well to work for my specific website.
If you use structured data for a home page that has a language selector, then the markup can be similar to the following:
{
"#context": "https://schema.org",
"#id": "[canonical-url-for-specific-language]#webapp",
"#type": "WebApplication",
"name": "[Product Comparison Title in specific language]",
"url": "[canonica url for specific language]",
"applicationCategory": "Utility",
"applicationSubCategory": "Product Comparison",
"about": "[page-description]",
"browserRequirements": "Requires JavaScript. Requires HTML5.",
"softwareVersion": "1.0.0",
"screenshot": "[image-url]",
"inLanguage":[{
"#type": "Language",
"name": "English",
"alternateName": "en",
"additionalType":"https://www.loc.gov/standards/iso639-2/php/code_list.php",
"sameAs":"https://en.wikipedia.org/wiki/English_language"
},
{
"#type": "Language",
"name": "Spanish",
"alternateName": "es",
"additionalType":"https://www.loc.gov/standards/iso639-2/php/code_list.php",
"sameAs":"https://en.wikipedia.org/wiki/Spanish_language"
}],
"softwareHelp": {
"#type": "CreativeWork",
"name":"Customer Service and Support",
"url": [
"https://examples.com/en/help.html",
"https://examples.com/es/help.html"
]
},
"operatingSystem": "All"
}
Note that I have here used for each language two identifiers with the properties sameAs and additionalType.
If the web page is with one particular language, then just delete the part of the markup for the unnecessary language and the square brackets.
Check out this markup on the Google testing tool and note that there are two warnings that are useful to fix.

Connecting multiple organizations and websites via JSON-LD schema.org

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.