The JSON-LD Markup Guide To Local Business Schema

The JSON-LD Markup Guide to Local Business Schema


Love it or hate it, schema is an essential part of optimizing your website for local search. For me, it’s a love-hate relationship.

  • Love it – because it takes messy data and displays beautiful rich snippets;
  • Hate it – because sometimes it’s just a huge mess! At least I find that to be the case quite often with Microdata markup. Even once I get the markup right, I have to spend a lot of time formatting it so it looks decent on the client’s site.

What is Microdata?

Microdata is an HTML specification, a form of semantic mark-up used to encode data through vocabularies such as schema.org and is a great method for communicating metadata to search engines. Search engines such as Google and Bing use this mark-up to extract information from web pages. The specification is often used to create a “richer” experience for web users via nifty rich snippets and interactive elements.

Example of Local Business Microdata formatting:

<div itemscope="" itemtype="http://schema.org/LocalBusiness">
	<span itemprop="name">Gene's Delicious Donuts</span><br>
	<link itemprop="url" href="http://www.example.com">
	<span itemprop="address" itemscope="" itemtype="http://schema.org/PostalAddress">
		<span itemprop="streetAddress">123 Happy Lane</span><br>
		<span itemprop="addressLocality">Irvine</span>, <span itemprop="addressRegion">CA</span> 
		<span itemprop="postalCode">92618</span>
	<a itemprop="telephone" href="tel:+15551112345">(555) 111-2345</a><br>
	<span itemprop="faxNumber">(555) 111-2345</span><br>
	<span itemprop="email">you@domain.com</span>
	<link itemprop="logo" href="image/path/file-name.jpg">I 
	<link itemprop="sameAs" href="https://plus.google.com/your-google-url">
	<link itemprop="hasMap" href="https://www.google.com/maps/place/link-to-your-business">
	<span itemprop="geo" itemscope="" itemtype="http://schema.org/GeoCoordinates">
		<meta itemprop="latitude" content="111.00000">
		<meta itemprop="longitude" content="-96.012345">
	<time itemprop="openingHours" datetime="Mo, Tu, We, Th, Fr 09:00-17:00">9AM - 5PM</time> 

Example of Google’s Knowledge Graph extracting information from Microdata:

Markup Example

Difficulties with Microdata

Since Microdata often uses visual markup to style actual elements on the page, I often find myself messing with CSS and HTML in an effort to make everything look visually appealing on a client’s website. The unnecessary layout problems created by Microdata result in unproductive use of time that could be spent on other important tweaks.

What is JSON-LD?

JSON-LD is a markup data-linking format that allows for easy embedding of data in a script tag. Unlike Microdata, JSON-LD data runs in the background so to speak. There’s no need to tweak actual HTML elements which creates a much faster experience for marketing professionals. With scripts, there’s no need to worry about a missing opening span or a closing div – everything just works. Think of JSON-LD as a faster, cleaner, more simple delivery vehicle for schema. Search engines love it as they are able to crawl the code with ease to understand the data more quickly.

Benefits of Using JSON-LD

  • Nested values – allows for display of complex information in an easy to understand fashion.
  • Variable-based – to mark up a new element, simply add a variable.
  • Saves a lot of time – visual markup is easy to mess up and difficult to troubleshoot unless you’re experienced with visual editors.
  • Easy to mark up reviews – keep the styling on your current reviews without having to make changes to your CSS file.

Types of Useful Local Business Data Available for Markup

For most local businesses, the typical NAP, business hours, and geo-location information are the most important elements. A savvy developer may utilize structured data to include:

  • Business Name
  • Address
  • Phone Number
  • Email Address
  • Business Hours
  • Geo-location Information (coordinates and map)
  • Reviews
  • Logo
  • Business Description
  • Social Profile Links via sameAs property.
  • Site Name

Additional useful local markup types include:

  • Products
  • Media (images and videos)
  • Events
  • Corporate Contacts
  • Sitelinks Search Box

A Basic Schema.org Example using JSON-LD for a Local Business

In this basic LocalBusiness example, we are including the business type, PostalAddress, description, business name, telephone, opening hours, geo coordinates and social profile links:

<script type="application/ld+json">
  	"@context": "http://schema.org",
  	"@type": "LocalBusiness",
  	"address": {
    "@type": "PostalAddress",
    "addressLocality": "Irvine",
    "addressRegion": "CA",
    "streetAddress": "123 Happy Lane"
  	"description": "This is your business description.",
  	"name": "Gene’s Delicious Donuts",
  	"telephone": "555-111-2345",
  	"openingHours": "Mo,Tu,We,Th,Fr 09:00-17:00",
  	"geo": {
    "@type": "GeoCoordinates",
    "latitude": "40.75",
    "longitude": "73.98"
  	"sameAs" : [ "http://www.facebook.com/your-profile",

How to Implement schema.org Markup Using JSON-LD for a Local Business

Before I dive right into it, a brief disclaimer:

I am not an expert on schema or JSON-LD and have no affiliation with Google. This article is intended to show you how I personally implement schema in my projects, in hopes that this information will be helpful to you. Please read all of Google’s guidelines carefully prior to implementing similar code. Don’t forget to test, test, test!

It’s also worth pointing out a few helpful links and tools:

Step 1: Determine Your Schema Type

determine schema type

Use Phil and David’s handy spreadsheet to determine which schema type describes your business most accurately – instead of using the generic “LocalBusiness” schema.

Step 2: Customize and Add Your Code Anywhere

Customize our basic example (below) with your own information, including the schema type picked in step 1, then add the code anywhere on your website. It doesn’t matter if you place it in the <head> or the <body> section, Google will have no problem reading the code. Since JSON-LD is a data linking format, there are no additional requests to the server, therefore it doesn’t matter if the script is loaded at the top or bottom of the page – there is no render delaying whatsoever.

Customize your Schema Type:

 "@type": "LocalBusiness",

For example, your @type may read:

"@type": "HVACBusiness",
"@type": "Attorney",
"@type": "Physician",
"@type": "RealEstateAgent",
"@type": "Dentist",

Customize Your Geo Coordinates:

To find your business geo-coordinates search for your business in Google Maps and look at the URL to find the latitude and the longitude. Alternatively, you could use http://www.latlong.net/ to search your business address:

Grab Geo Coordinates for Your Business from Google Maps

Add a URL:

  "url": "http://www.example.com",

Add a Logo:

  "logo": "http://www.example.com/images/logo.png",

Add Email Contact Info:


Add Social Profiles:

At this time Google supports Facebook, Twitter, Google+, Instagram, YouTube, LinkedIn and Myspace. To add a new profile, place the URL in quotes and separate by a comma.

"sameAs" : [ "http://www.facebook.com/your-profile",

Link to a Map

"hasMap": "https://www.google.com/maps/place/Sushi+Imari/@33.664141,-117.879423,17z/data=!3m1!4b1!4m2!3m1!1s0x80dcdfaa9f9de2a5:0x48ad2abe6bb60a3b?hl=en",

To get the link to your map, find your business in Google Maps, and grab the code from the bottom right gear icon > Share or Embed Map.


Find the map settings area in Google Maps


Copy and paste the map link to your hasMap property.

Include Additional Type:

As an optional step for those who would like to include Product Ontology values in their code, include additionalType like so:

"additionalType": "http://www.productontology.org/id/Personal_injury_lawyer",

See the post on LocalVisibilitySystem on how to pick Product Ontology categories and why you’d include it in your schema.

Add Aggregate Rating:

"aggregateRating": {
    "@type": "AggregateRating",
    "ratingValue": "4",
    "reviewCount": "250"

Include Reviews with Aggregate Rating

To add more reviews, simply copy and paste the review item and adjust the aggregate reviewCount and ratingValues. Note that each review has 2 curly brackets and is separated by a comma.

<script type="application/ld+json">
  	"@context": "http://schema.org",
  	"@type": "Dentist",    
  	"name": "Family Dentistry",
    "aggregateRating": {
    "@type": "AggregateRating",
    "ratingValue": "4",
    "reviewCount": "2"
    "review": [
      "@type": "Review",
      "author": "Ellie",
      "datePublished": "2011-04-01",
      "description": "I'm not entirely upset with this office, but the staff at the front desk could have been nicer in letting me know they have nothing available for the next 2 months.",
      "name": "Good services, poor communication",
      "reviewRating": {
        "@type": "Rating",
        "bestRating": "5",
        "ratingValue": "3",
        "worstRating": "1"
      "@type": "Review",
      "author": "Lucas",
      "datePublished": "2011-03-25",
      "description": "I was finally able to get my old crown replaced with a new, porcelain one at a cost that doesn't break the bank.",
      "name": "Affordable Crowns",
      "reviewRating": {
        "@type": "Rating",
        "bestRating": "5",
        "ratingValue": "5",
        "worstRating": "1"

Step 3: Test Your Code

Once you have your code, unless you’re already tweaking in Structured Data Testing Tool, go ahead and test it by copying and pasting the code and clicking on Validate.

A green checkmark and the text “All good” will show if the code validates without errors. If for some reason you seen an error, carefully check the syntax to make sure you didn’t miss a comma, a curly bracket or quotations.

Test your Markup in Structured Data Testing Tool

Extended Properties JSON-LD Example for a Local Business

To add to our basic example, we’ve included an email address, addtionalType, hasMap, website URL and a logo image link:

<script type="application/ld+json">
  	"@context": "http://schema.org",
  	"@type": "LocalBusiness",
	"additionalType": "http://www.productontology.org/id/Genes_Donuts",
	"url": "http://example.com/",
	"logo": "http://www.example.com/images/logo.png",
	"hasMap": "https://www.google.com/maps/place/link-to-your-business",
	"email": "mailto:you@example.com",
  	"address": {
    	"@type": "PostalAddress",
    	"addressLocality": "Irvine",
    	"addressRegion": "CA",
    	"streetAddress": "123 Happy Lane"
  	"description": "This is your business description.",
  	"name": "Gene’s Delicious Donuts",
  	"telephone": "555-111-2345",
  	"openingHours": "Mo,Tu,We,Th,Fr 09:00-17:00",
  	"geo": {
    	"@type": "GeoCoordinates",
   	"latitude": "40.75",
    	"longitude": "73.98"
  	"sameAs" : [ "http://www.facebook.com/your-profile",

Note: In this example, the product ontology category is completely made up for demonstration purposes. If this were Randy’s Donuts, they could include their name as additionalType!

A Few Tips to Avoid Errors

If you have little or no web development experience, it’s easy to run into an error when trying to customize the code examples with your own variables. I put together a few tips to help you validate your code without issues:

  1. Each item is declared in quotes: “telephone”:
  2. Each item type is declared in the following format: “@type”:
  3. Compounded entries such as the values within an address will always be placed in curly brackets: “address”: { address values }
  4. Each item is separated by a comma “addressLocality”: “Irvine”, “addressRegion”: “CA”
  5. Repetitive properties such as multiple openingHours or social media links (sameAs property) are placed in brackets [].
  6. Don’t use Microsoft Word to format your code, as this will create formatting errors. I recommend notepad or making the edits in Google’s Testing Tool itself.

JSON-LD Markup Guidelines

Before you get excited and start making up data that is not visually present on your website, be aware that Google doesn’t joke around with Rich Snippet spam. Algorithmic and manual penalties are a possibility when it comes to marking up data that your visitors can’t see.

Guidelines Summary Concerning Local Business Markup

  • Data must not deceive or mislead experience for search users.
  • Use only the most specific types and property names defined by schema.org.
  • Marked-up content must be visible on the page where the script is added.

See Google’s Structured Data Policies for a full list of technical and quality guidelines if you are uncertain of permissible use.

Generally speaking, to stay in the clear – make sure you mark up only the content that’s already visible on your website. For example, if the page contains no reviews, don’t add a script that marks up reviews.

A Couple of FAQs

A few frequently asked questions and answers about implementing schema with JSON-LD:

  • Can I include data that is not shown on my website? No, however there are some exceptions. Google typically will not show any data that is not visibly present on your page. In fact, it’s against their guidelines. See the link for more details of permissible uses and exceptions.
  • My rich snippets aren’t showing up, how come? Google makes no guarantees that your rich snippets will be displayed.
  • Can I use your code examples in my site-wide footer? Yes, as long as you don’t forget to customize your values and each element is actually present visually. Does the footer contain all of the information? Is there a logo link to the same image file?
  • How do I format varying openingHours? If your business has different hours for different days, you can specify multiple openingHours on an individual line within enclosed in brackets. For a brief overview of openingHours, see the schema.org specification.  Here’s a quick example of a business that’s open most of the week from 9-5 but takes a half day off on Friday:
"openingHours": [ "Mo-Th 09:00-17:00", "Fr 09:00-12:00" ],
  • Can I use this code in WordPress or some other content management system? Yes, the script works anywhere. To insert the code site-wide (to show across all pages) add it to your custom scripts section in the Settings (some themes may not have this). If your theme doesn’t have a scripts area, find the header.php or footer.php file and insert it there.
  • Does JSON-LD delay CSS rendering? No. Unlike javascript there is no render delay with a data linking format. This means you can place the code anywhere you like without having to worry about slow loading times. The code will increase your HTML content size, but only by a tiny bit – completely negligible when it comes to page load times.

You just spent way longer reading about JSON-LD than it will actually take you to put it to work for your business. You’ll be way ahead of the curve.

If you work with multiple clients, bookmark this page for quick reference.

Update: Big thanks to Aaron Bradley for his feedback on this post! It appears I got some terminology wrong and missed a couple of things. The article has been updated accordingly.

Any questions? Have you used JSON-LD? Let me know in the comments.


Gene Maryushenko

Gene has been developing websites for 10 years and has been working in local search for the past 4 years. He's an active contributor to the Local Search Google+ community.

Follow Me on Twitter
  • Great info! The best writeup I’ve seen on JSON-LD for local SEO. Thank you very much!

    One question — Do you have a preferred WordPress plugin that allows you to add scripts to individual pages?

  • Wow, what a fantastic resource this is! Totally agree with you Gene that implementing Schema through JSON-LD is cleaner but getting it right can still be a little tricky. I’ve had a few issues with opening hours and additional types before, so this post has really helped to clear that up. Top notch stuff.

  • ERMAHGERD!!! This is amazing! I never would have thought / known to use JSON for Markup. What a time saver. Thank you so much for this article. I’ll definitely be using this!

  • Sushi Imari is my favorite local sushi place (right down the street).

  • Thank you Gene for publishing this guide! It will be a great time saver. While I have used schema, I always spend time trying to tweak code within the pages and like you mentioned, it was a big time killer. This method is great. Thanks again!

  • Gene Maryushenko

    @Rich – Thanks Rich! I appreciate your comments. I have not used any plugins to add the code to WordPress. You should be able to actually just copy and paste it directly into the HTML version of your page.

    @Nick – Glad to see it save you time! It really is a huge time saver once you get past any errors that might pop up.

    @Paul – My pleasure 🙂 I’m all about making our jobs just a bit easier.

    @Dan – we’re practically neighbors! .. and we haven’t met yet? That’ll have to change hehe. I’ve been eyeing Sushi Imari forever but have yet to step foot. Sometimes soon, sometimes soon!

    @Greg – much appreciated! I’ll be working on more guides like this to help us all save time and make our jobs more streamlined.

  • Ahhh!!! I had been looking for the Json-LD map markup code for ages, I couldn’t get it to work. This was the biggest help!! Thanks 🙂

  • Great article Gene, really useful. Love JSON-LD for the flexibility it gives.
    Interestingly, I was having a discussion over on G+ about G+ snippets and the lack of support for JSON-LD at the moment. Could potentially be a pain if you want to implement a single JSON-LD solution with regard to certain schema types and share it as well. Good to get your thoughts!


  • Gene Maryushenko

    @Inty – I know how you feel! It’s frustrating to run into errors – as I discovered when playing around with Google’s examples. Once you break it down line by line it’s easier to see what’s going on and where the mistakes are being made. Best of luck to you!

    @Gavin – Thanks for stopping by! You have an interesting point. I actually ran across your thread during my research to make sure I’m not promoting any code that’s not supported. I think it makes sense that Snippets do not use JSON-LD and perhaps never will, because a snippet has to show the image on the page – in a visual way that is not supported by JSON-LD data linking.

    When I wrote this post, the pain points I was trying to address is the mess created by Microdata that can otherwise be taken care of by script – thus avoiding layout issues.

    From a local business perspective, where do you see the snippet being useful? I’m curious how someone might be using the snippets on their website and the reasons behind it.

  • Great guide, very comprehensive. I’ve done this for my personal name (you can Google “Patrick Coombe”) and it works very well.

    I must add that implementing schema / json-ld will not always guarantee Google Knowledge Graph inclusion. We’ll see what happens once this whole Wiki Data thing becomes active and Freebase is no longer used.

  • Gene Maryushenko

    @Patrick – I think I mentioned in the FAQ that Google makes no guarantee of showing that info. That’s awesome, I google’d your name and saw the knowledge graph with your info!

  • Thanks for your comment. Although I realise that it’s not directly related to JSON-LD implementation of LocalBusiness schema per say, I suppose what I’m driving at is thinking about a potential consumer transactional journey as whole.

    A journey that might start with a consumer coming into contact with a company from information leveraged from something like LocalBusiness schema perhaps, then onto a company’s website where potentially, as part of that journey they might share product info as a snippet via G+ for instance.

    The lack of support for JSON-LD in terms of +Snippets despite official guidelines around their use elsewhere for specific schema types interested me, purely in terms of providing a unified approach that could be supported across G+ as well.

    It’s late in here in Scotland – hope that makes sense!

  • Thanks for sharing this 🙂
    —> “Don’t use Microsoft Word to format your code, as this will create formatting errors. I recommend notepad or making the edits in Google’s Testing Tool itself.”
    *Good advice Gene 🙂 I had issues with Apple’s TextEdit – I’m going to have to check the settings 😉

  • Gene Maryushenko

    @Gavin – Yes, that makes sense! I suppose the best method to avoid styling inline is to use Open Graph tags. It’s kind of a pain to have to use both, but we’re at Google’s mercy 🙂

    @Andy – Thanks Andy! I should have taken my own advice when I was trying to edit this article. For the life of me, I just couldn’t figure out why the syntax highlighter was showing different colors for the same code snippets until I realized that I’m copying from Word! Silly me.

  • We really must co-ordinate a meet-up to talk about local seo somewhere in between us. (Maybe Red Deer.) Really solid resource here Gene and team.

  • @Gene – Within your ‘Extended Properties JSON-LD Example for a Local Business’ example, you have included both “hasMap” and “GeoCoordinates” within the markup. Why would it need both? Is it beneficial to list both of them? Is there a huge difference? Aren’t they essentially giving search engines the same info?

  • Just had a chance to finally skim through this and looks like it’ll be a great time saver over the old way of doing it. Good job, thanks.

  • Hi

    GREAT WORK! thanks for putting all this together, it’s really helpfull. Is there by any chance a screenshot of how the JSON influence the SERP both in rankings and design?

    How/what about the review, doese it show up (in SERPS) and if so how? If its doesn’t why use it in JSON?

    Best regards

  • Gene Maryushenko

    @Randy – a meetup would be nice, though I’d have to fly there 🙂 I’m in California. The Whitespark teams deserves more credit here for sure. Without everyone’s feedback this post would make little sense.

    @Spencer – I’m not actually sure if there is a benefit of including hasMap WITH geo coordinates. Yes, I think both properties are communicating essentially the same information, one directly by pointing out the geo coordinates, the other by linking to the map. I’m guessing there are cases where you can only use one or the other, I just can’t think of an example in context of local business markup right now. I doubt it’d hurt anything if you included both though.

    @Tony – Thanks Tony!

    @ Michael – JSON-LD is a data linking format for schema.org, therefore it looks exactly the same as Microdata markup in terms of what you see in SERPs. You can find many examples of structured data markup via Google’s Developer center: https://developers.google.com/structured-data/

    Reviews will show up exactly the same as they do with Microdata or RDFa. However, be careful about what you mark up for reviews. As pointed out by Aaron Bradley, Google frowns upon intentional markup of 5-star praises. As long as you mark up reviews in a natural way where the end user can choose the rating and it’s not filtered to your preference, you should be fine.

  • Do you have any examples of Social Media Posts done in Jason-Ld that include Ontology information?

  • Rich, check out a little plugin I made called WP Headmaster.

    What are everyone’s thoughts on a local business websites whereby they have two different addresses for two storefronts? Would you add different address JSON for each respective contact page? And if so, would you add single or multiple or no address JSON markup for the other pages I.e the homepage that apply to all business locations?

  • Really a great article. Thank you. I’m thinking this could be deployed nicely using Google Tag Manager.

  • Rob

    So if I’m reading this correctly, I can’t put in a link to our Youtube channel or our google plus page or our facebook page in the data if I don’t have a link to those pages in the html of the site?

  • I have been using schema for my local clients, but haven’t been able to dive into JSON yet. Thanks for writing this gives me some more motivation to spend sometime getting up to speed on this.

  • Jason

    Can anyone give me an example of a website actually using JSON-LD to produce star rating and number or reviews in Google search results? I’ve tried on https://ormsurvey.com/Directory/Location for a few weeks now and I can’t get Google to show stars and ratings for Directory, McFadden and Slenzak pages in this search https://goo.gl/ktL8pp – I need proof this ACTUALLY works for ratings and reviews.

  • Ivan

    Great guide! Any idea how one would go about introducing a second or third location using JSON-LD?

  • Gene Maryushenko

    @Mike – Sorry, I do not have any examples of social media posts marked up in JSON-LD. Perhaps this will make a good followup post (with more examples!)

    @James Yes, I would place only the relevant code on relevant pages. For example, I’d include the NAP markup for Location A on that page specifically, while displaying a separate markup on Location B page.

    As for the home page, I think that depends on how many locations you’re showing. I see no harm in adding multiple markups for each location the way most of us have done with Microdata to this point as long as you’re not trying to stuff a huge number of locations (in which case a separate page + markup is probably a better route).

    @Cliff – I think you are onto something here! I have not played around with Tag Manager but at a quick glance it may be a time saver! My only concern is – how do you choose where the tag is displayed? Google has guidelines not to show marked up content if it’s not present on a page. Is there any choice in which page the tag will show? If there is, someone should write another post on this topic!

    @Rob – That’s correct. Per Google’s guidelines – you want to mark up only the data that’s already there visually. Will you get penalized or punished for marking up minor items like a Youtube URL? – I’m not sure. It’s kind of up to us personally to decide whether it’s worth upsetting the big G over a tiny detail like a social media link 🙂

    @Jason (28circles) – Hey, always glad to be helpful! If you can think of any other tips or ideas, feel free to add to comments or email me directly – gene@whitespark.ca

    @Jason (June 30th) – I’ve set up a testing page on one of my servers to see if Google picks it up and displays the stars. However, keep in mind that Google won’t always show the marked up content. That COULD be the case in your situation. One thing that I would recommend is trying changing the worstRating to 1 instead of your current 3. The aggregate ratings refer to the lowest and highest possible values, not the worst rating of your current comments.

  • Great article, thanks for the input! It’d should be a nice idea to create a post series about implementing JSON-LD for local business when those have multiple “branches” or departments. I had a hard time to get it set up for a local small restaurant business which formation consists of 3 branches.

    There aren’t enough quality content out there teaching how it can be achieved, however, schema.org has two potential specs such as the department & subOrganization that could be used to get id done http://stackoverflow.com/a/36990264/1152876. I’m still working on localhost, but as soon as my site goes live I’ll be able to have a clue if Goggle would be scrapping it the way it is intended or not.

  • Isabel Romero Carretero

    Hi Gene,
    I have a doubt.
    As I see with JSON-LD we could add reviews with rating. My question is
    ¿It´s posible include the ratings from the comments of Google My Business or the reviews must to be inside our website?
    Thanks so much

  • Robert W.

    Hi Gene, how would you add a list of services offered by the company? In my case we are a unmanned aerial drone company, so i would like to show “aerial surveys”, “search air rescue support” etc. etc. as services the company offers? schema seems to support it but i cant get it right in the code.

  • Robert Lanni

    Hi Gene! I just found your post and had a question about using JSON-LD for multiple locations. I’m marking up a website for an organization that has 31 locations – can I place the mark-up for each location’s unique page in case statements and then place the extended code in a sitewide footer? Please let me know if I’m on the right track – if I am, I’d love to see an example of the case statement syntax (our site is in Drupal/PHP). Thanks!