Combining Local business with Service & Area served schema - schema

When I insert this code in the structured data testing tool I am only getting the first schema to show up. I can switch the order of the Local business and service w/ area served but when I do that only one of them shows up in the tool. The same thing happens when I try to split the two up and get them individually.
Working with json-ld scripts:
<script type="application/ld+json">
{
"#context": "https://schema.org",
"#type": "ProfessionalService",
"name": "Sebastian River Exterminating",
"image": "http://sebastianriverexterminating.com/images/extermination-logo-sebastian-fl.png",
"#id": "",
"url": "http://sebastianriverexterminating.com/",
"telephone": "7722289969",
"address": {
"#type": "PostalAddress",
"streetAddress": "124 Salazar Lane",
"addressLocality": "Sebastian",
"addressRegion": "FL",
"postalCode": "32958",
"addressCountry": "US"
},
"geo": {
"#type": "GeoCoordinates",
"latitude": 27.7600115,
"longitude": -80.50620599999999
},
"openingHoursSpecification": {
"#type": "OpeningHoursSpecification",
"dayOfWeek": [
"Monday",
"Tuesday",
"Wednesday",
"Thursday",
"Friday"
],
"opens": "08:00",
"closes": "18:00"
},
"sameAs": "https://www.facebook.com/SebastianRiverExterminatingFL/timeline"
}
{
"#context": "http://schema.org",
"#type": "Service",
"serviceType": "Exterminator",
"additionalType": "https://en.wikipedia.org/wiki/Pest_control",
"areaServed": [
{
"#type": "City",
"name": "Sebastian",
"#id": "https://en.wikipedia.org/wiki/Sebastian,_Florida"
},
{
"#type": "City",
"name": "Roseland",
"#id": "https://en.wikipedia.org/wiki/Roseland,_Florida"
}
]}
</script>

That is not valid json or json-ld. You can only add one object to each script. e.g.
<script type="application/ld+json">
{
...
}
</script>
You can't list objects like you did.
One way around the issue is to add each into their own script tag.
Another is to use #graph to add them as an array inside an object. e.g.
<script type="application/ld+json">
{
"#graph": [
{
...
},
{
...
}
]
}
</script>

I believe you should use a sameAs not an #id in this case, since you are providing a reference for the search engine. also, I don't believe #id is a valid property of areaServed

Related

Google Reviews Snippet VS Aggregate Ratings

I have a few questions about what happens if I add both "aggregate reviews" and "review snippets" schema to a webpage.
Will the aggregate number of "votes" and the aggregate vote rating be displaced by the number and average rating of the review snippets?
Is it possible for both to appear at the same time on SERP, with the aggregate votes & average score (1-5) appearing above the review snippets?
Review Snippet Sample:
<script type="application/ld+json">
{
"#context": "https://schema.org/",
"#type": "Product",
"brand": {
"#type": "Brand",
"name": "Penguin Books"
},
"description": "The Catcher in the Rye is a classic coming-of-age story: an story of teenage alienation, capturing the human need for connection and the bewildering sense of loss as we leave childhood behind.",
"sku": "9780241984758",
"mpn": "925872",
"image": "http://www.example.com/catcher-in-the-rye-book-cover.jpg",
"name": "The Catcher in the Rye",
"review": [{
"#type": "Review",
"reviewRating": {
"#type": "Rating",
"ratingValue": "5"
},
"author": {
"#type": "Person",
"name": "John Doe"
},
"reviewBody": "I really enjoyed this book. It captures the essential challenge people face as they try make sense of their lives and grow to adulthood."
},
{
"#type": "Review",
"reviewRating": {
"#type": "Rating",
"ratingValue": "1"
},
"author": {
"#type": "Person",
"name": "Jane Doe"
},
"reviewBody": "I really didn't care for this book."
}],
"aggregateRating": {
"#type": "AggregateRating",
"ratingValue": "88",
"bestRating": "100",
"ratingCount": "20"
},
"offers": {
"#type": "Offer",
"url": "https://example.com/offers/catcher-in-the-rye",
"priceCurrency": "USD",
"price": "5.99",
"priceValidUntil": "2020-11-05",
"itemCondition": "https://schema.org/UsedCondition",
"availability": "https://schema.org/InStock",
"seller": {
"#type": "Organization",
"name": "eBay"
}
}
}
</script>
Aggregate Ratings Sample
<script type="application/ld+json">
{
"#context": "https://schema.org/",
"#type": "Product",
"name": "Executive Anvil",
"image": [
"https://example.com/photos/1x1/photo.jpg",
"https://example.com/photos/4x3/photo.jpg",
"https://example.com/photos/16x9/photo.jpg"
],
"brand": {
"#type": "Thing",
"name": "ACME"
},
"aggregateRating": {
"#type": "AggregateRating",
"ratingValue": "4.4",
"ratingCount": "89"
},
"offers": {
"#type": "AggregateOffer",
"lowPrice": "119.99",
"highPrice": "199.99",
"priceCurrency": "USD"
}
}
</script>

JSON-LD | Multiple Schemas Per Page | What is the best way to structure a website?

Please excuse me, I am a noob and schemas are something new to me and I would really appreciate your expert advice guys! Thanks in advance! :)
To keep it short, I combined these 3 relevant question as part of one global question:
What is better? To use separate schemas or multiple nested schemas per web page?
How many schemas can be used per page? Is there a recommended minimum and maximum?
Lastly, what would the schema structure of a i.e 5 page website look like?
I've answered all these questions in a short summary below, followed by the schemas I've used.
My curreny interpretation:
a. You can nest multiple schemas per page, but keeping them separate allows for a better use of #id?
b. You can use as many schemas per page as you wish without penalty, taken you use #graph but then each separate web page needs to be defined separately. Is this practical?
c. You can, and should use multiple schemas per page, in separate scripts so as not to duplicate the same information via: about, provider, or #type, particularly when you are using multiple schema types: Organization, Corporation and/or LocalBusiness?
d. The structure/hierarchy we are currently implementing is as follows:
i. Home Page Schema Types: Website, Webpage, Breadcrumb and FAQPage.
ii. About Page Schema Types: Webpage, Organization and Local Business.
iii. Service Page Schema Types: Webpage, Service, OfferCatalog, Breadcrumb and FAQPage.
iv. Individual Service Page Schema Types: Webpage, Service, OfferCatalog, Breadcrumb and FAQPage.
v. Contact Page Schema Types: Webpage and ContactPage.
Current Implementation Home Page (Website Schema)
I might have overdone it, from what I understand it is better to include less information and more reference with #id
{
"#context": "https://schema.org/",
"#type": "Website",
"name": "ABC Company",
"image": "https://www.abccompany.com/wp-content/uploads/2016/12/company_slider.png",
"url": "https://www.abccompany.com",
"abstract": "The corporate website of ABC Company Ltd.",
"description": "Website of ABC Company Ltd, an information technology service management and support provider in Germany.",
"thumbnailUrl": "https://www.abccompany.com/wp-content/uploads/2016/12/company_slider.png",
"about":
{
"#type":
[
"Organization",
"LocalBusiness"
],
"#id": "https://www.abccompany.com/about",
"name": "ABC Company",
"image": "https://www.abccompany.com/wp-content/uploads/2016/12/company_slider.png",
"legalname": "ABC Company Ltd",
"alternateName":
[
"ABC Corp",
"ABC Berlin",
"ABC"
],
"address":
{
"#type": "PostalAddress",
"addressCountry": "Germany",
"addressLocality": "Berlin",
"addressRegion": "Berlin Municipality",
"postalCode": "30242",
"streetAddress": "Zigrid Abc Street, Office 521"
},
"pricerange": "€€ - €€€€",
"telephone": "99 540 010"
},
"sameAs":
[
"https://www.facebook.com/abccompany",
"https://twitter.com/abccompany",
"https://www.instagram.com/abccompany/",
"https://www.linkedin.com/abccompany"
],
"spatialCoverage":
[
"United Kingdom",
"Germany",
"Greece",
"Switzerland",
"United Arab Emirates",
"Italy"
]
}
Below is a simplified version of the Website Schema for the Home Page
{
"#type": "Website",
"name": "ABC Company Website",
"url": "https://www.abccompany.com",
"description": "Website of ABC Company Ltd, an information technology service management and support provider in Germany.",
"thumbnailUrl": "https://www.abccompany.com/wpcontent/uploads/2016/12/company_slider.png",
"about":
{
"#type": "Organization",
"name": "ABC Company",
"#id": "https://www.abccompany.com/about"
},
"potentialAction":
{
"#type": "SearchAction",
"target": "{search_term_string}",
"query-input": "required name=search_term_string"
}
}
Current Implementation Home Page (Organization Schema)
Thinking of moving this Schema to the about page. Any suggestions?
{
"#context": "http://schema.org",
"#id": "https://www.abccompany.com/about",
"#type": "Organization",
"name": "ABC Company",
"alternateName":
[
"ABC Berlin",
"ABC"
],
"knowsAbout":
[
"Information Technology Consulting",
"Information Technology Support",
"Information Technology Development",
"Managed Information Technology",
"API Integration"
],
"url": "https://www.abccompany.com",
"logo": "https://www.abccompany.com/wp-content/uploads/2016/12/company_slider.png",
"sameAs":
[
"https://www.facebook.com/abccompany",
"https://twitter.com/abccompany",
"https://www.instagram.com/abccompany",
"https://www.linkedin.com/abccompany"
],
"numberofEmployees": "~10",
"owns":
[
{
"#type": "Organization",
"name": "ABC Company 2",
"url": "https://abccompany2.com/",
"logo": "https://abccompany2.png",
"description": "Online ticketing platform.",
"sameAs": "https://www.facebook.com/abccompany2"
},
{
"#type": "Organization",
"name": "ABC Company 3",
"url": "https://abccompany3.eu/en/",
"logo": "https://abccompany3.eu/en.png",
"description": "Laptop and phone repair service.",
"sameAs": "https://www.facebook.com/abccompany3"
}
],
"contactPoint":
{
"#type": "ContactPoint",
"telephone": "+357-99-550-010",
"contactType": "Contact",
"email": "contact#abccompany.com",
"areaServed":
[
"United Kingdom",
"Germany",
"Greece",
"Switzerland",
"United Arab Emirates",
"Italy"
],
"availableLanguage":
[
"English",
"German"
]
}
}
Current Implementation Home Page (Local Business Schema)
As with the Organization schema, I am thinking of moving it to the about page and link #id. Additionally, Organization and Local Business Schemas tend to clash, is this because of duplicate information?
{
"#context": "https://schema.org/",
"#type": "LocalBusiness",
"name": "ABC Company",
"legalname": "ABC Company Ltd",
"image": "https://www.abccompany.com/wp-content/uploads/2016/12/company_slider.png",
"#id": "https://www.abccompany.com/about",
"url": "https://www.abccompany.com",
"logo": "https://www.abccompany.com/wp-content/uploads/2016/12/company_slider.png",
"hasMap": "https://www.google.com/maps/place/ABCCOMPANY+-+IT+Services+%26+Solutions+in+Cyprus/#44.6799323,65.0355366,15z/data=!4m2!3m1!1s0x0:0x4507a4904ebbe662?sa=X&ved=2ahUKEwjOnOKdy_bxAhWQsRQKHY9WD5kQ_BIwD3oECEMQBQ",
"address":
{
"#type": "PostalAddress",
"addressCountry": "Germany",
"addressLocality": "Berlin",
"addressRegion": "Berlin Municipality",
"postalCode": "3022",
"streetAddress": "Mitgard Street 302"
},
"description": "ABC Company Ltd is a managed information technology services provider in Germany.",
"disambiguatingDescription": "ABC Company is an information technology support and development company.",
"sameAs":
[
"https://www.facebook.com/abccompany",
"https://twitter.com/abccompany",
"https://www.instagram.com/abccompany",
"https://www.linkedin.com/company/abccompany"
],
"pricerange": "€€€ - €€€€€",
"email": "mailto:contact#abccompany.com",
"telephone": "99 520 010",
"geo":
{
"#type": "GeoCoordinates",
"latitude": "66.6799323",
"longitude": "55.0355366"
},
"areaServed":
[
{
"#type": "Country",
"name": "United Kingdom",
"sameAs": "https://en.wikipedia.org/wiki/United_Kingdom_(disambiguation)"
},
{
"#type": "Country",
"name": "Germany",
"sameAs": "https://en.wikipedia.org/wiki/Germany_(disambiguation)"
},
{"#type": "Country",
"name": "Greece",
"sameAs": "https://en.wikipedia.org/wiki/Greece_(disambiguation)"
},
{
"#type": "Country",
"name": "Switzerland",
"sameAs": "https://en.wikipedia.org/wiki/Switzerland_(disambiguation)"
},
{
"#type": "Country",
"name": "United Arab Emirates",
"sameAs": "https://en.wikipedia.org/wiki/UAE_(disambiguation)"
},
{
"#type": "Country",
"name": "Italy",
"sameAs": "https://en.wikipedia.org/wiki/Italy_(disambiguation)"
}
],
"openingHoursSpecification":
[
{
"#type": "OpeningHoursSpecification",
"dayOfWeek":
[
"Monday",
"Tuesday",
"Wednesday",
"Thursday",
"Friday"
],
"opens": "09:00",
"closes": "19:00"
},
{
"#type": "OpeningHoursSpecification",
"dayOfWeek": "Saturday",
"opens": "11:00",
"closes": "14:00"
}
],
"aggregateRating":
{
"#type": "AggregateRating",
"ratingValue": "5",
"reviewCount": "5"
},
"review":
[
{
"#type": "Review",
"author":
{
"#type": "Organization",
"name": "BBB Company Ltd"
},
"datePublished": "2020",
"description": "Developed a great website.",
"reviewRating":
{
"#type": "Rating",
"bestRating": "5",
"ratingValue": "5",
"worstRating": "5"
}
},
{
"#type": "Review",
"author":
{
"#type": "Person",
"name": "Anderson Silva"
},
"datePublished": "2018",
"reviewRating":
{
"#type": "Rating",
"bestRating": "5",
"ratingValue": "5",
"worstRating": "5"
}
},
{
"#type": "Review",
"author":
{
"#type": "Organization",
"name": "NFS Ltd"
},
"datePublished": "2017",
"reviewRating":
{
"#type": "Rating",
"bestRating": "5",
"ratingValue": "5",
"worstRating": "5"
}
},
{
"#type": "Review",
"author":
{
"#type": "Organization",
"name": "Premiere Showroom"
},
"datePublished": "2020",
"reviewRating":
{
"#type": "Rating",
"bestRating": "5",
"ratingValue": "5",
"worstRating": "5"
}
},
{
"#type": "Review",
"author":
{
"#type": "Person",
"name": "Benzon Bez"
},
"datePublished": "2017",
"reviewRating":
{
"#type": "Rating",
"bestRating": "5",
"ratingValue": "5",
"worstRating": "5"
}
}
]
}
Current Implementation Home Page (WebPage Schema)
This is the last schema I will share, to keep this question manageable.
{
"#context": "https://schema.org/",
"#type": "WebPage",
"#id": "https://www.abccompany.com",
"url": "https://www.abccompan.com",
"name": "IT Services and Solutions | ABC Company",
"description": "Home web page of ABC Company Ltd, an information technology service management and support provider in Germany.",
"disambiguatingDescription": "ABC Company Home Page",
"image": "https://www.abccompan.com/wp-content/uploads/2016/12/company_slider.png",
"thumbnailUrl": "https://www.abccompan.com/wp-content/uploads/2016/12/company_slider.png",
"keywords": "IT Company, Information Technology Company, IT Provider",
"typicalAgeRange": "28-60",
"about":
{
"#type": "Organization",
"#id": "https://www.abccompan.com/about",
"name": "ABC Company"
},
"audience":
[
{
"#type": "BusinessAudience",
"name": "Business owner",
"alternateName": "Organizational Founder",
"disambiguatingDescription": "Refers to founders, owners and or majority shareholders of a commercial enterprise.",
"sameAs":
["https://en.wikipedia.org/wiki/Organizational_founder",
"https://en.wikipedia.org/wiki/Director_(business)",
"https://en.wikipedia.org/wiki/Business_magnate",
"https://en.wikipedia.org/wiki/Tycoon_(disambiguation)",
"https://en.wikipedia.org/wiki/Industrialist_(disambiguation)",
"https://en.wikipedia.org/wiki/Shareholder"
]
},
{
"#type": "BusinessAudience",
"name": "Entrepreneur",
"alternateName": "Business Person",
"disambiguatingDescription": "A business man or woman - refers to a founder, owner, investor or majority shareholder of a commercial enterprise.",
"sameAs":
[
"https://en.wikipedia.org/wiki/Entrepreneur_(disambiguation)",
"https://en.wikipedia.org/wiki/Businessperson",
"https://en.wikipedia.org/wiki/Investor",
"https://en.wikipedia.org/wiki/Intermediary"
]
},
{
"#type": "BusinessAudience",
"name": "Manager",
"alternateName": "Supervisor",
"disambiguatingDescription": "Refers to founders, owners and or majority shareholders of a commercial enterprise.",
"sameAs":
["https://en.wikipedia.org/wiki/Supervisor",
"https://en.wikipedia.org/wiki/Manager_(disambiguation)",
"https://en.wikipedia.org/wiki/General_manager"
]
}
],
"datePublished": "2016-12-01T08:00:08+00:00",
"dateModified":"2020-01-09T18:00:00+00:00",
"inLanguage":"en-UK",
"potentialAction":
{
"#type": "ReadAction",
"target": "https://www.abccompany.com"
}
}
To recap
Are the schemas above correct?
Do we write multiple schemas per page but in separate scripts?
Is best practice to then link #id or duplicate references?
How many schemas can we populate per page?
Are there particular schemas for particular pages only? If so which ones?
In advance thank you all for your time and effort.
Hope we can reach some sort of consensus, since there are no viable instructions regarding this, at least that I've found.
Peace.

SiteNavigationElement Schema using JSON Format

I have added the below Schema JSON code for SiteNavigationElemen on the section but this one is not fetching on https://search.google.com/test/rich-results. I want to show on Google search result. Could you please guide me this one code is correct or not.
<script type="application/ld+json">
{
"#context": "https://schema.org",
"#graph":
[
{
"#context": "https://schema.org",
"#type":"SiteNavigationElement",
"#id":"#table-of-contents",
"name": "EX",
"url": "https://example1.com"
},
{
"#context": "https://schema.org",
"#type":"SiteNavigationElement",
"#id":"#table-of-contents",
"name": "EX",
"url": "https://example1.com"
},
{
"#context": "https://schema.org",
"#type":"SiteNavigationElement",
"#id":"#table-of-contents",
"name": "EX",
"url": "https://example1.com"
},
{
"#context": "https://schema.org",
"#type":"SiteNavigationElement",
"#id":"#pagination",
"name": "EX",
"url": "https://example1.com"
},
{
"#context": "https://schema.org",
"#type":"SiteNavigationElement",
"#id":"#pagination",
"name": "EX",
"url": "https://example1.com"
}
]
}
</script>
Heena, it is because https://developers.google.com/search/docs/advanced/structured-data/video
There are only specific schemas that show up in rich results, but more work. They just won't work with that testing tool. I recommend https://validator.schema.org/

How to manipulate Json-ld?

I've got this json-ld:
{ "#id": "http://www.example.com/john-doe",
"#type": "http://xmlns.com/foaf/0.1/Person",
"http://xmlns.com/foaf/0.1/name": "John Doe",
"http://xmlns.com/foaf/0.1/age": {
"#value": "42",
"#kind": "http://www.w3.org/2001/XMLSchema#nonNegativeInteger"},
"http://xmlns.com/foaf/0.1/knows" : [
{ "#id": "http://www.example.com/charlie-brown" },
{ "#id": "http://www.example.com/jane-doe" }
]
}
I have to write the context so that the below json-ld is valid.
{ "#context" : "context to write....",
"#id": "john-doe",
"#type": "person",
"name": "John Doe",
"age": "42",
"knows": ["charlie-brown", "jane-doe"]
}
I've write a solution but it's incomplete, and I can't figure out how to write a full solution, hope that someone can help me.
You have to use framing to get a result close to your requirements.
See this answer for a Java full code example, How to convert RDF to pretty nested JSON using java rdf4j .
See also this answer that contains some extra tipps in addition JSON-LD to normal JSON
Use this link for an example in json-ld playground. This is how your document with embedded #context would look like:
{
"#context": {
"name": {
"#id": "http://xmlns.com/foaf/0.1/name"
},
"age": {
"#id": "http://xmlns.com/foaf/0.1/age"
},
"knows": {
"#id": "http://xmlns.com/foaf/0.1/knows",
"#container": "#set"
}
},
"#id": "john-doe",
"#type": "person",
"name": "John Doe",
"age": "42",
"knows": [
"charlie-brown",
"jane-doe"
]
}
This is, how the frame would look like
{
"#context": {
"name": {
"#id": "http://xmlns.com/foaf/0.1/name"
},
"age": {
"#id": "http://xmlns.com/foaf/0.1/age"
},
"knows": {
"#id": "http://xmlns.com/foaf/0.1/knows",
"#container": "#set"
}
}
}
This will render to
{
"#context": {
"name": {
"#id": "http://xmlns.com/foaf/0.1/name"
},
"age": {
"#id": "http://xmlns.com/foaf/0.1/age"
},
"knows": {
"#id": "http://xmlns.com/foaf/0.1/knows",
"#container": "#set"
}
},
"#graph": [
{
"#id": "john-doe",
"#type": "https://json-ld.org/playground/person",
"age": "42",
"knows": [
"charlie-brown",
"jane-doe"
],
"name": "John Doe"
}
]
}

Creating an array of products in JSON-LD

Can someone spot what's wrong with my code below? (It doesn't validate in the Google Structured Testing Tool.) I'm trying to create the JSON-LD code to add to a page that has multiple products for sale.
<script type="application/ld+json">
{
"#context": "http://schema.org",
"#graph": [
{
"#type": “Product”,
"name": “tshirt",
“description”: "test copy 1.”,
“image”: “image.jpg”
},
{
"#type": “Product”,
"name": “tshirt 2",
“description”: "test copy 2.”,
“image”: “image2.jpg”
}
]
}
</script>
Any help is much appreciated!
You are using “ instead of " in some places.
Replacing these, your snippet validates:
<script type="application/ld+json">
{
"#context": "http://schema.org",
"#graph": [
{
"#type": "Product",
"name": "tshirt",
"description": "test copy 1.",
"image": "image.jpg"
},
{
"#type": "Product",
"name": "tshirt 2",
"description": "test copy 2.",
"image": "image2.jpg"
}
]
}
</script>
Update: this snippet doesn't validate by using Google Rich Results Test anymore. Schema is being actively developed, so sometimes the requirements change after a while. For a list of products, Google is suggesting so called carousel.