Schema Mark-Up via JSON-LD for Local Businesses

It’s no secret that Google has been using the schema.org vocabulary since 2011 to to provide richer search results through structured data.

Google currently support Microdata, RDFa, JSON-LD but have a clear bias towards the use of JSON-LD (JavaScript Object Notation for Linked Data).

However, in my opinion and experience there remains a lot of ambiguity surrounding best practice use of schema.org mark-up via JSON-LD. It seems there are lots of different way in which structured data can be implemented via JSON-LD, but which method is correct?

I’m going to kick this off by stating for the record that the example use of JSON-LD highlighted in this post may not be the best method of implementation – but hopefully I’ll at least explain why.

JSON-LD for Local Businesses

For the purposes of this post I’m going to use the LocalBusiness vocabulary as this is one which I often receive a lot of questions about.

Below is an example of a common JSON-LD syntax which can be used to define a single local business.

<script type="application/ld+json">
    {
    "@context" : "http://schema.org",
    "@type" : "LocalBusiness",
    "name" : "Your Business Name",
    "url" : "http://www.your-domain.co.uk",
    "logo": "http://www.your-domain.co.uk/images/your-logo.png",
    "address": {
        "@type" : "PostalAddress",
        "streetAddress": "1 The High Street",
        "addressLocality": "Colchester",
        "addressRegion": "Essex",
        "postalCode": "CO1 1AB",
        "telephone" : "01234 567 891"
        },
    "openingHours": [ "Mo-Fr 09:00-18:00", "Sa 10:00-16:00" ],
    "hasmap" : "https://www.google.co.uk/maps/place/Buckingham+Palace/@51.501364,-0.1440787,17z/data=!3m1!4b1!4m5!3m4!1s0x48760520cd5b5eb5:0xa26abf514d902a7!8m2!3d51.501364!4d-0.14189",
    "sameAs" : [ "https://www.facebook.com/chrisains",
        "https://twitter.com/chrisains",
        "https://plus.google.com/+ChrisAinsworth",
        "https://www.youtube.com/user/chrisains1982" ] 
    }
  </script>

This syntax utilises various properties of the LocalBusiness vocabulary to define the type of business, the business name, address, website URL and so forth. This work exactly as expected and validates through Google’s Structured Data Testing Tool.

JSON-LD Single LocalBusiness Mark-Up

There are many different properties of the LocalBusiness vocabulary that you could include should you wish to customise your structured data declaration even further – see https://schema.org/LocalBusiness for a full list.

JSON-LD Markup for Multiple Business Locations

This works great for a local business with a single location; but what about those businesses with multiple locations? Is a business still classed as a “local business” if the company has multiple offices across the UK, or does it become an “Organization” with multiple branches?

According to Schema.org, the definition of a LocalBusiness is as follows:

A particular physical business or branch of an organization. Examples of LocalBusiness include a restaurant, a particular branch of a restaurant chain, a branch of a bank, a medical practice, a club, a bowling alley, etc.

Great, so we can define all local business locations via a single JSON-LD script, right? Erm… that remains debatable! I am yet to find a definitive answer from Google, Schema.org or anywhere/one else which states the correct usage of JSON-LD for defining multiple local business locations.

Let’s say, for example, that your business as 10 offices throughout the UK. SEO experts, including myself, would likely recommend the creation of dedicated local landing pages within your website to house contact information for each office. You’ve likely seen similar approaches used in the past? A prime example is are car dealers which will often utilise unique landing pages for each of their local dealerships.

Through this approach, you could include a revised version of the aforementioned JSON-LD code on each landing page, obviously changing the properties and data of each to reflect each of your 10 offices.

But what happens if don’t want multiple location pages? What if you want to retain a single landing page which showcases each of your office locations? It may sound a little odd, but in reality its a problem which I’m often approached with. I consult with many SMEs which perhaps operate via 2 or 3 locations across the UK or a specific region of the UK. They will often list all contact details for each office on a single ‘Contact’ page, or quite often simply within the footer of their websites.

As a result, the question that they will often ask is…

Is it possible to create a single JSON-LD script to define multiple local business locations?

TL;DR: Yes it is.

When I was asked if it was feasible to define multiple business locations via a single JSON-LD script my face must have been a sorry sight as my brain tried to determine:

  1. Whether it’s possible?
  2. Whether you would ever want/need to?

Putting the latter question aside, I tried to answer the first question – is it even possible? After a little trial and error I determined that the short answer is yes, it is possible to define a single JSON-LD script with nested local business declarations.

In the following example I’ve provided a script which defines the parent organisation and the corresponding details for two local businesses.

Whether it’s the right thing to do, and how Google treat this type of declaration remains to be seen!

On that note, I’m not saying you should implement your mark-up in this way, I just wanted to show that it is technically feasible:

<script type="application/ld+json">
{
  "@context": {
    "@vocab": "http://schema.org/"
  },
  "@graph": [
    {
      "@id": "http://www.your-domain.co.uk",
      "@type": "Organization",
      "name": "Your Business Name",
	  "url" : "http://www.your-domain.co.uk",
	  "logo" : "http://www.your-domain.co.uk/images/your-logo.png",
      "sameAs" : [ "https://www.facebook.com/chrisains",
          "https://twitter.com/chrisains",
          "https://plus.google.com/+ChrisAinsworth",
          "https://www.youtube.com/user/chrisains1982" ] 
    },
    {
      "@type": "LocalBusiness",
      "parentOrganization": {
          "name" : "Your Business Name"
      },
     "name" : "Your Business Name",
      "address": {
          "@type" : "PostalAddress",
          "streetAddress": "1 The High Street",
          "addressLocality": "Colchester",
          "addressRegion": "Essex",
          "postalCode": "CO1 1AB",
          "telephone" : "01234 567 891"
          },
      "openingHours": [ "Mo-Fr 09:00-18:00", "Sa 10:00-16:00" ],
      "hasmap" : "https://www.google.co.uk/maps/place/Buckingham+Palace/@51.501364,-0.1440787,17z/data=!3m1!4b1!4m5!3m4!1s0x48760520cd5b5eb5:0xa26abf514d902a7!8m2!3d51.501364!4d-0.14189"
    },
    {
      "@type": "LocalBusiness",
      "parentOrganization": {
          "name" : "Your Business Name"
      },
     "name" : "Your Business Name",
      "address": {
          "@type" : "PostalAddress",
          "streetAddress": "Buckingham Palace",
          "addressRegion": "London",
          "postalCode": "SW1A 1AA",
          "telephone" : "01234 567 891"
          },
      "openingHours": [ "Mo-Fr 09:00-18:00", "Sa 10:00-16:00" ],
      "hasmap" : "https://www.google.co.uk/maps/place/Buckingham+Palace/@51.501364,-0.1440787,17z/data=!3m1!4b1!4m5!3m4!1s0x48760520cd5b5eb5:0xa26abf514d902a7!8m2!3d51.501364!4d-0.14189"
    }
  ]
}
</script>

Again, this validation via Google’s Structured Data Testing Tool.

Schema.org Validation

Organization JSON-LD Validation

Multiple Localbusiness JSON-LD Validation

The Code Validates, So it Must be Right, Right?

You would think so wouldn’t you, but as I said in the introduction to this post, there are many ways in which structured data mark-up can be defined through JSON-LD and very little guidance to define the right and wrong ways of implementation.

In the syntax provided above I have utilised a combination of the ‘Organization’ and ‘LocalBusiness’ vocabularies to define the parent organisation and each local business. Being honest, I’m not 100% convinced this is the best or simplest method but I have little information from Schema.org, Google or anyone else to tell me otherwise. The data is accurate and it validates so my assumption (right or wrong!) is that this method should suffice – but I guess only time will tell.

FYI here is Google’s developer documentation on structured data for local businesses – https://developers.google.com/search/docs/data-types/local-businesses, and here’s Google’s introduction to structured data in case you have absolutely no idea where to start https://developers.google.com/search/docs/guides/intro-structured-data.

Perhaps you know something I don’t? If so please share your thoughts! 🙂

2 thoughts on “Schema Mark-Up via JSON-LD for Local Businesses

  • Hi Chris,

    I wondered if you had made any further progress on this. I’m searching the web endlessly but can’t seem to get a complete answer. We do have separate location pages, but we also display our 3 locations in the footer. I’m not trying to seo optimise the location pages. Currently we feature in local listings and this goes to our home page which I prefer. So ideally I want to add the JSON to the homepage for the locations to assist with local SEO.

    • Hi David,

      Thanks for reaching out, and apologies for the delay in responding!

      The short answer is no, I haven’t made any further progress on this. I’ve deployed this implementation on a couple of websites and certainly haven’t observed any negative impact; but I also can’t say there are any notable positive trends either.

      It’s also questionable how much Google rely on or utilise structured data markup for local businesses. It’s fair to say it’s likely utilised as to signal local intent, but other initiatives such as claiming and optimising Google My Business listings are far superior.

      Let me know how you get on 🙂

      Chris

Leave a Reply

Your email address will not be published. Required fields are marked *