Quick JSON-LD Code Examples You Can Use to Improve Your Search Appearance

According to Json-ld.org, JSON-LD (JavaScript Object Notation for Linked Data) is a lightweight Linked Data format that facilitates JSON data interoperability on the web. Because it is based on the already successful JSON data format, it is not only familiar for programmers but is also easy for humans to write and read. Therefore, JSON-LD data format is ideal for unstructured databases (such as Apache and MongoDB), RESTful Web services and programming environments in general.

JSON-LD is a powerful technical SEO trick that you can use to improve your search presence on the web. In this post, I'm going to share pieces of code that you can populate with information and insert in the section of the page you are currently optimizing for better search appearance. You could benefit from little things like your logo appearing near your name or star reviews appearing next to your product.

How can I use JSON-LD on my website?

For non-WordPress sites, you can add components for custom UI widgets to feed the data. For WordPress sites, there are several Schema.org plugins that you can use to extend the functionality of your website for rich snippets. Plugins like Wordlift uses natural language processing technology to extract named entities for you to tag your text.

What are the advantages of using JSON-LD on my website?

JSON-LD leverages Linked Data, which essentially is the fuel of the web because through its networked structure, people can publish and retrieve information from the web with relative ease. It facilitates creation of machine-readable data for websites through the provisions of its standards. In short, it allows users to enter and endless tunnel of interlinked websites hosted at different places. So, whenever you click a link to an different resource from the page you are currently on, the robots know where you are going due to the power of JSON-LD.

In addition to that, JSON-LD makes meta data available for the search engines so that they can always display the right information based on the user's intent. This is why when you search for a famous person online then you can see a brief summary about everything you need to know about them. The same happens with recipes, hotels and restaurants, hospitals, businesses, etc. that have listed their information online.

JSON-LD does not affect the html structure of a page, neither does it interfere with the tags withing the page. It also does not affect page performance because it is loaded asynchronously by default. It is an effecient method of structuring pages because you can reuse it since it follows the JSON syntax.

Please note that JSON-LD does not guarantee that the search engines will show the snippets. It only guarantees that the snippets will be available should the search engine choose to show them to a user.

1. JSON-LD code for a website (not a webPage)

Two versions are included here; a simple website and a website with search functionality

// A simple website

<script type="application/ld+json">{
"@context": "http://schema.org",
"@type": "WebSite",
  "name": "Website Name",
  "url": "https://example.com",
}</script>

// A website with search functionality

<script type="application/ld+json">{
"@context": "http://schema.org",
"@type": "WebSite",
"name": "Website Name",
"url": "https://example.com",
"sameAs": ["https://facebook.com/mypage",
           "https://instagram.com/site",
           "https://twitter.com/name"],
"potentialAction": {
"@type": "SearchAction",
"target": "http://example.com/pages/search_results?q={search_term}",
"query-input": "required name=search_term"
}
}</script>
 

2. JSON-LD code for a webPage

Create rich snippets for any web page of your choice. Users in your location may even get to see your website's search bar in results and get to search for content in your website right from the search engine's result pages!

<script type="application/ld+json">
{
    "@context": "http://schema.org",
    "@type": "WebPage",
    "name": "Idriss Malone",
    "description": "Describe Idris Malone here...",
    "publisher": {
        "@type": "ProfilePage",
        "name": "Idriss' Website"
    }
}
</script>
 

3. JSON-LD code for video

Create rich snippets for your video online

// Without author attribution

<script type="application/ld+json">
{
  "@context": "https://schema.org",
  "@type": "VideoObject",
  "name": "Video Name",
  "description": "Short description of video (keep it short!).",
  "thumbnailUrl": "https://example.com/thumbnail.webp",
  "uploadDate": "2021-04-05T08:00:00+02:00",
  "duration": "PT4M43S",
  "contentUrl": "https://example.com/movie.mov",
  "embedUrl": "https://example.com/embed?videocodec",
  "interactionCount": "2073"
}
</script>

// With author attribution

<script type="application/ld+json">
    {
      "@context": "https://schema.org/",
      "@type": "VideoObject",
      "name": "Video Name",
      "@id": "https://example.com/video",
      "datePublished": "2021-10-02",
      "description" : "Short description here...",
      "thumbnailURL" : "https://placehold.it/350x150",
      "thumbnail" : "https://placehold.it/350x150",
      "duration" : "T3M03S",
      "uploadDate" : "2021-10-02",
      "author": {
        "@type": "Person",
        "name": "Peter Drury"
      }
    }
      
</script>
 

4. JSON-LD code for tables/lists

Change @type to List if you want to show a plain (untabulated) list

<script type="application/ld+json">
{
  "@context": "https://schema.org",
  "@type": "Table",
  "about": "list of edible tropical berries"
}
</script>
 

5. JSON-LD code for audio playback via Text-to-Speech (TTS)

Helps Google to identify sections of your website that can be played back via text to speech.

<html>
  <head>
    <title>Title Goes Here</title>
    <meta name="description" content="" />
    <script type="application/ld+json">
{
 "@context": "https://schema.org/",
 "@type": "WebPage",
 "name": "Description goes here. This markup is excellent for rare facts. Keep it short.",
 "speakable":
 {
  "@type": "SpeakableSpecification",
  "xpath": [
    "/html/head/title",
    "/html/head/meta[@name='description']/@content"
    ]
  },
 "url": "https://example.com/page/slug"
 }
  </script>
  </head>
</html>
              

6. JSON-LD code for Question and Answer pages

Replace url and placeholder text to suit your website

<script type="application/ld+json">
{
    "@context": "https://schema.org",
    "@type": "QAPage",
    "mainEntity": {
      "@type": "Question",
      "name": "Question title goes here",
      "text": "Question description goes here...",
      "answerCount": 1,
      "dateCreated": "2021-08-10T21:11Z",
      "author": {
        "@type": "Person",
        "name": "Question Author"
      },
      "acceptedAnswer": {
        "@type": "Answer",
        "text": "Full details answer goes here...",
        "upvotecount": 1,
        "dateCreated": "2021-08-12T21:11Z",
        "url": "https://moredetailswebsite.com/learn-more/here/",
        "author": {
          "@type": "Person",
          "name": "Answer Author"
        }
      }
    }
  }
  </script>
 

7. JSON-LD code for social media profiles of a person or organization

For organizations, change the @type to Organization

<script type="application/ld+json">
{
  "@context" : "https://schema.org",
  "@type" : "Person",
  "name" : "Your Name",
  "url" : "https://your-site.com",
  "sameAs" : [
    "https://www.facebook.com/your-profile",
    "https://instagram.com/yourProfile",
    "https://www.linkedin.com/in/yourprofile",
    "https://plus.google.com/your_profile"
  ]
}
</script>
 

8. JSON-LD code for a review

<script type="application/ld+json">
{
  "@context": "https://schema.org/",
  "@type": "Product",
  "image": "http://www.example.com/nail-polish.jpg",
  "name": "Clear Cutex",
  "review": {
    "@type": "Review",
    "reviewRating": {
      "@type": "Rating",
      "ratingValue": "4"
    },
    "name": "Clear Cutex",
    "author": {
      "@type": "Person",
      "name": "Linda Happer"
    },
    "datePublished": "2021-04-04",
    "reviewBody": "Customer feedback here...",
    "publisher": {
      "@type": "Organization",
      "name": "Cuticare Mall"
    }
  }
}
</script>
 

9. JSON-LD code for a restaurant menu

<script type="application/ld+json">
{
   "@context":"http://schema.org",
   "@type":"Restaurant",
   "url":"https://www.ourrestaurant.com",
   "name":"Our Restaurant",
   "image":"https://example.com/restaurant-image.webp",
   "telephone":"1234567890",
   "priceRange" : "$100 - $300",
   "description" : "a description of this business",
   "address" : {
    "@type" : "PostalAddress",
    "streetAddress" : "1234 This Street",
    "addressLocality" : "Local Address",
    "addressRegion" : "City/State",
    "postalCode" : "XXXXX"
  },
   "servesCuisine":[
      "Oriental cuisine"
   ],
   "hasMenu":{
      "@type":"Menu",
      "name":"Dine-In Menu",
      "description":"Menu for in-restaurant dining only.",
      "hasMenuSection":[
         {
            "@type":"MenuSection",
            "name":"Dinner",
            "description":"Our dinner dishes",
            "image":"https://ourrestaurant.com/dinner.webp",
            "offers":{
               "@type":"Offer",
               "availabilityEnds":"T8:30:00",
               "availabilityStarts":"T8:00:00"
            },
            "hasMenuSection":[
               {
                  "@type":"MenuSection",
                  "name":"Starters",
                  "description":"Appetizers etc",
                  "image":"https://ourrestaurant.com/starters.webp",
                  "offers":{
                     "@type":"Offer",
                     "availabilityEnds":"T8:30:00",
                     "availabilityStarts":"T8:00:00"
                  },
                  "hasMenuItem":{
                     "@type":"MenuItem",
                     "name":"Potato Skins",
                     "description":"Small serving of stuffed potato skins.",
                     "offers":{
                        "@type":"Offer",
                        "price":"7.49",
                        "priceCurrency":"USD"
                     },
                     "suitableForDiet":"http://schema.org/GlutenFreeDiet"
                  }
               },
               {
                  "@type":"MenuSection",
                  "name":"Soups",
                  "description":"Selected soups",
                  "image":"https://ourrestaurant.com/soups.webp",
                  "offers":{
                     "@type":"Offer",
                     "availabilityEnds":"T8:30:00",
                     "availabilityStarts":"T8:00:00"
                  },
                  "hasMenuItem":{
                     "@type":"MenuItem",
                     "name":"Mushroom Soup",
                     "description":"Creamy mushroom soup and dippingdough breddies.",
                     "offers":{
                        "@type":"Offer",
                        "price":"2.49",
                        "priceCurrency":"USD"
                     }
                  }
               }
            ]
         }
      ]
   }
}
</script>
 

10. JSON-LD code for a recipe

    <script type="application/ld+json">
    {
      "@context": "https://schema.org",
      "@type": "Recipe",
      "author": "Chef Name",
      "cookTime": "PT1H",
      "datePublished": "2021-05-18",
      "description": "Your recipe description goes here",
      "image": "https://example.com/images.jpg",
      "recipeIngredient": [
        "ingredient 1",
        "ingredient 2",
        "ingredient 3",
        "ingredient 4",
        "ingredient 5"
      ],
      "interactionStatistic": {
        "@type": "InteractionCounter",
        "interactionType": "http://schema.org/Comment",
        "userInteractionCount": "5"
      },
      "name": "Name of product to be made",
      "nutrition": {
        "@type": "NutritionInformation",
        "calories": "1200 calories",
        "carbohydrateContent": "12 carbs",
        "proteinContent": "9 grams of protein",
        "fatContent": "9 grams fat"
      },
      "prepTime": "PT15M",
      "recipeInstructions": "This is the long part, etc.",
      "recipeYield": "12 cookies"
    }
    </script>
 

11. JSON-LD code for a product listing

// The long version

<script type="application/ld+json">
{
  "@context": "https://schema.org/",
  "@type": "Product",
  "name": "Product Name",
  "image": "https://example.com/product-name.webp",
  "description": "Product description goes here...",
  "mpn": "010101012",
  "brand": {
    "@type": "Thing",
    "name": "Brand Name"
  },
  "aggregateRating": {
    "@type": "AggregateRating",
    "ratingValue": "4.4",
    "reviewCount": "69"
  },
  "offers": {
    "@type": "Offer",
    "priceCurrency": "USD",
    "price": "XXX.XX",
    "priceValidUntil": "2021-11-05",
    "itemCondition": "https://schema.org/UsedCondition",
    "availability": "https://schema.org/InStock",
    "seller": {
      "@type": "Organization",
      "name": "Name of Seller"
    }
  }
}
</script>

//The short version

<script type='application/ld+json'> 
{
  "@context": "https://www.schema.org",
  "@type": "product",
  "brand": "Brand Name",
  "logo": "https://example.com/logo.png",
  "name": "Product Name",
  "category": "Product category",
  "image": "https://example.com/image.webp",
  "description": "Product description goes here...",
  "aggregateRating": {
    "@type": "aggregateRating",
    "ratingValue": "5",
    "reviewCount": "22"
  }
}
 </script>
 

12. JSON-LD code for a person

// Regular Joe - short version

<script type="application/ld+json">
    {
      "@context": "https://schema.org",
      "@type": "Person",
      "address": {
        "@type": "PostalAddress",
        "addressLocality": "Local Address",
        "addressRegion": "City/State",
        "postalCode": "XXXXX",
        "streetAddress": "100 That Street"
      },
      "colleague": [
        "https://example.com/co-worker",
        "https://example.com/another-co-worker"
      ],
      "email": "[email protected]",
      "image": "thisperson.png",
      "jobTitle": "Research Assistant",
      "name": "This Person's Name",
      "alumniOf": "This Person's Alma Mater",
      "birthPlace": "Where This Person was born",
      "birthDate": "1983-10-12",
      "height": "69 inches",
      "gender": "female",
      "memberOf": "Which Party?",
      "nationality": "Country of Nationality?",
      "telephone": "(123) 456-6789",
      "url": "https://example.com",
	    "sameAs" : [ "https://www.facebook.com/page",
      "https://www.linkedin.com/profile",
      "http://twitter.com/handle",
      "http://instagram.com/page",
      "https://plus.google.com/profile"]
    }
</script>

// Regular Joe - long version

<script type="application/ld+json">
{
"@context": "https://www.schema.org",
"@type": "Person",
"@id": "https://about.me/my-profile",
"name": "Regular Joe",
"alternateName": "Also Regular Joe",
"nationality": "Which nationality?",
"birthPlace" : {
	"@type": "Place",
    "address": {
  		"@type": "PostalAddress",
		"addressLocality": "Local address",
		"addressRegion": "City/State",
        "addressCountry": "Country"
	}
},
"affiliation": [
	{
		"@type": "Organization",
		"name": "Organization Name",
		"sameAs": [
			"https://twitter.com/org-link",
			"https://www.facebook.com/org-link/",
			"https://www.linkedin.com/company/org-link/",
			"https://www.youtube.com/channel"
		]
  	}
],
"alumniOf": [
	{
	 "@type": "CollegeOrUniversity",
	 "name": "Which university?",
	 "sameAs": "https://university.edu/link"
	},
	{
	 "@type": "CollegeOrUniversity",
	 "name": "Another college"
	}
],
"gender": "Male",
"Description": "What profession",
"disambiguatingDescription": "Distinguishing title goes here...",
"jobTitle": "What is he called in the organization?",
"worksFor": [
	{
		"@type": "Organization",
		"name": "Name of company",
		"sameAs": [
			"https://twitter.com/current-employer",
			"https://www.facebook.com/current-employer",
			"https://www.linkedin.com/company/current-employer",
			"https://plus.google.com/current-employer"
		]
	}
],
"url": "https://personalwebsite.com",
"image": "https://gravatar.com/avatar/special-avarar-id",
"address": {
	"@type": "PostalAddress",
	"addressLocality": "Local Address",
	"addressRegion": "City/State",
	"addressCountry": "Country"
},
"sameAs": [
	"https://twitter.com/this-person",
	"https://pinterest.com/this-person",
	"https://instagram.com/this-person",
	"https://www.facebook.com/this-person",
	"https://linkedin.com/in/this-person/en",
	"https://plus.google.com/+this-person",
	"https://www.youtube.com/user/this-person",
	"https://github.com/this-person",
	"https://profiles.wordpress.org/this-person",
	"https://angel.co/this-person",
	"https://www.foursquare.com/user/this-person",
	"https://codepen.io/this-person/",
	"https://dribbble.com/this-person",
	"https://www.flickr.com/people/this-person/",
	"https://medium.com/@this-person"
	]
}
</script>

// Medical Joe

<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type":  "Physician",
"name":  "<FULL NAME>",
"image": "<IMG URL>",
"openingHours":
"Mo-Fr <00:00-00:00>",
"url": "<URL>",
"aggregateRating":
{
"@type": "AggregateRating",
"ratingValue":  "<>",
"reviewCount":  "<>"
},
"address": [
{
"@type": "PostalAddress",
"addressLocality": "<>",
"addressRegion":  "<>",
"postalCode":  "<>",
"streetAddress":  "<>",
"telephone": "<>"
}
],
"priceRange": "<$-$$$$$>"
}
</script>

 

13. JSON-LD code for an Organization

// Long comprehensive version

<script type="application/ld+json">
 { "@context": "https://schema.org",
 "@type": "Organization",
 "name": "<>",
 "legalName" : "<>",
 "url": "https://example.com",
 "logo": "https://cdn.example.com/uploads/assets/logo.ico",
 "foundingDate": "2019",
 "founders": [
 {
 "@type": "Person",
 "name": "Co-founder Name"
 },
 {
 "@type": "Person",
 "name": "Another Co-founder"
 } ],
 "address": {
 "@type": "PostalAddress",
 "streetAddress": "94 The Other Street",
 "addressLocality": "Local Address",
 "addressRegion": "City/State",
 "postalCode": "XXXXX",
 "addressCountry": "Country"
 },
 "contactPoint": {
 "@type": "ContactPoint",
 "contactType": "Customer Care",
 "telephone": "[+123-123-1234]",
 "email": "[email protected]"
 },
 "sameAs": [ 
 "https://www.freebase.com/m/this-org",
 "https://www.facebook.com/this-org",
 "https://www.twitter.com/this-org",
 "https://pinterest.com/this-org/",
 "https://this-org.tumblr.com/",
 "https://www.linkedin.com/company/this-org",
 "https://plus.google.com/+this-org"
 ]}
</script>

// The short version with sponsor organization (suitable for charities)

<script type="application/ld+json">
{
  "@context": "https://schema.org/",
  "@type": "Organization",
  "name": "This Organization Name",
  "url": "https://example.org/",
  "sponsor":
  {
    "@type": "Organization",
    "name": "Nice Sponsor",
    "url": "https://nice-sponsor.com/"
  }
}
</script>
 

13. JSON-LD code for a local business

<script type="application/ld+json">
{
  "@context": "https://schema.org",
  "@type": "Restaurant",
  "image": [
    "https://example.com/photos/1x1/photo.webp",
    "https://example.com/photos/4x3/photo.webp",
    "https://example.com/photos/16x9/photo.webp"
   ],
  "@id": "http://id.example.com",
  "name": "Restaurant Name",
  "address": {
    "@type": "PostalAddress",
    "streetAddress": "911 Another Street",
    "addressLocality": "Local Address",
    "addressRegion": "City/State",
    "postalCode": "XXXXX",
    "addressCountry": "Country"
  },
  "review": {
    "@type": "Review",
    "reviewRating": {
      "@type": "Rating",
      "ratingValue": "4",
      "bestRating": "5"
    },
    "author": {
      "@type": "Person",
      "name": "Name of Author"
    }
  },
  "geo": {
    "@type": "GeoCoordinates",
    "latitude": 21.760093,
    "longitude": -33.986294
  },
  "url": "https://example.com/restaurant-locations/here",
  "telephone": "+122 456 78900",
  "openingHoursSpecification": [
    {
      "@type": "OpeningHoursSpecification",
      "dayOfWeek": [
        "Sunday",
        "Monday",
        "Tuesday",
        "Wednesday",
        "Thursday",
        "Friday"
      ],
      "opens": "11:30",
      "closes": "22:00"
    },
    {
      "@type": "OpeningHoursSpecification",
      "dayOfWeek": "Saturday",
      "opens": "16:00",
      "closes": "23:00"
    },
  ],
  "menu": "https://example.com/menu",
  "acceptsReservations": "True"
}
</script>
 

14. JSON-LD code for a job posting

<script type = "application/ld+json" > {
	"@context": "http://schema.org",
	"@type": "JobPosting",
	"estimatedSalary": {
		"@type": "MonetaryAmount",
		"currency": "USD",
		"value": {
			"@type": "QuantitativeValue",
			"minValue": "None",
			"maxValue": "None",
			"unitText": "YEAR"
		}
	},
	"datePosted": "2021-09-24T00:00:00",
	"description": "Describe the job vacancy here...",
	"title": "VueJS Developer",
	"validThrough": "2021-10-24T00:00:00",
	"employmentType": "FULL_TIME",
	"hiringOrganization": {
		"@type": "Organization",
		"name": "Organization Name"
	},
	"identifier": {
		"@type": "PropertyValue",
		"name": "Organization Name",
		"value": "Unique-ID"
	},
	"jobLocation": {
		"@type": "Place",
		"address": {
			"@type": "PostalAddress",
			"streetAddress": "123 This Avenue",
			"addressLocality": "Local Address",
			"addressRegion": "City/State",
			"postalCode": "XXXXX",
			"addressCountry": "Country"
		}
	},
	 "baseSalary": {
    "@type": "MonetaryAmount",
    "currency": "USD",
    "value": {
      "@type": "QuantitativeValue",
      "value": XX.XX,
      "unitText": "HOUR"
    }
  }

} </script>
 

15. JSON-LD codes for articles and posts

// News article

<script type="application/ld+json">
{
  "@context": "https://schema.org",
  "@type": "NewsArticle",
  "mainEntityOfPage": {
    "@type": "WebPage",
    "@id": "https://example.com/the-article"
  },
  "headline": "Article headline",
  "image": [
    "https://example.com/person-image.jpg",
    "https://example.com/photos/4x3/photo.jpg",
    "https://example.com/photos/16x9/photo.jpg"
   ],
  "datePublished": "2021-01-05T08:00:00+08:00",
  "dateModified": "2021-01-05T09:20:00+08:00",
  "author": {
    "@type": "Person",
    "name": "Author Name"
  },
   "publisher": {
    "@type": "Organization",
    "name": "Organization Name",
    "logo": {
      "@type": "ImageObject",
      "url": "https://eexample/featured-image.png"
    }
  },
  "description": "Your interesting article goes here..."
}
</script>

// Regular article

<script type="application/ld+json">
{ "@context": "https://schema.org", 
 "@type": "Article",
 "headline": "Awesome Headline!",
 "alternativeHeadline": "Alternate Headline",
 "image": "https://example.com/image.webp",
 "author": "Author Name", 
 "award": "Best in category",
 "editor": "Editor Name", 
 "genre": "Which genre/category?", 
 "keywords": "focus keyword", 
 "wordcount": "XXXX",
"publisher": {
    "@type": "Organization",
    "name": "Publishing Organization",
    "logo": {
      "@type": "ImageObject",
      "url": "https://publisher.com/logo.ico"
    }
  },
 "url": "https://www.example.com",
   "mainEntityOfPage": {
    "@type": "WebPage",
    "@id": "https://publisher.com/article"
  },
 "datePublished": "2021-09-20",
 "dateCreated": "2021-09-20",
 "dateModified": "2021-09-20",
 "description": "Short description goes here...",
 "articleBody": "The long article body goes in here..."
 }
</script>

// How-to/Tutorial/Tech article

<script type="application/ld+json">
{ "@context": "https://schema.org", 
 "@type": "TechArticle",
 "headline": "Awesome Headline goes here...",
 "dependencies": "Spoiler alert or early warning",
 "proficiencyLevel": "Expert",
 "alternativeHeadline": "Alternate Headline goes here...",
 "image": "https://example.com/featured-image.jpg",
 "author": "Author Name", 
 "award": "Best in category blah blah blah",
 "editor": "Editor Name", 
 "genre": "Genre or category", 
 "keywords": "focus keyword", 
 "wordcount": "XXXX",
 "publisher": "Publisher Name",
 "url": "https://publisher.com",
 "datePublished": "2021-09-20",
 "dateCreated": "2021-09-20",
 "dateModified": "2021-09-20",
 "description": "Short description goes here...",
 "articleBody": "Long article body goes here..."
 }
</script>

//Regular blog post

<script type="application/ld+json">
{ "@context": "https://schema.org", 
 "@type": "BlogPosting",
 "headline": "Blog Post Headline",
 "alternativeHeadline": "Alternate Headline",
 "image": "https://example.com/featured-image.webp",
 "award": "Best in category",
 "editor": "Editor Name", 
 "genre": "Genre/Category", 
 "keywords": "focus keyword", 
 "wordcount": "XXXX",
 "publisher": "Publisher Name",
 "url": "https://publisher.com",
 "datePublished": "2021-09-20",
 "dateCreated": "2021-09-20",
 "dateModified": "2021-09-20",
 "description": "Short description goes here",
 "articleBody": "The entire body of the blog post goes here...",
   "author": {
    "@type": "Person",
    "name": "Author Name"
  }
 }
</script>

// Another blog post - long

<script type="application/ld+json">
	{
		"@context":"https://schema.org",
		"@type": "BlogPosting",
		"image": "https://example.com/featured-image.webp",
		"url": "https://example.com/blog-post",
		"headline": "Awesome Headline",
		"alternativeHeadline": "Alternate Headline",
		"dateCreated": "2021-02-11T11:11:11",
		"datePublished": "2021-02-11T11:11:11",
		"dateModified": "2021-02-11T11:11:11",
		"inLanguage": "en-US",
		"isFamilyFriendly": "true",
		"copyrightYear": "2021",
		"copyrightHolder": "",
		"contentLocation": {
			"@type": "Place",
			"name": "Name of Place"
		},
		"accountablePerson": {
			"@type": "Person",
			"name": "Name of Contact Person",
			"url": "https://contactperson.com"
		},
		"author": {
			"@type": "Person",
			"name": "Author Name",
			"url": "https://author.com"
		},
		"creator": {
			"@type": "Person",
			"name": "Creator Name",
			"url": "https://creator.com"
		},
		"publisher": {
			"@type": "Organization",
			"name": "Publishing Organization",
			"url": "https://publisher.com",
			"logo": {
				"@type": "ImageObject",
				"url": "https://example.com/assets/logo.ico",
				"width":"300",
				"height":"55"
			}
		},
		"sponsor": {
			"@type": "Organization",
			"name": "Name of Sponsor",
			"url": "https://sponsor.com",
			"logo": {
				"@type": "ImageObject",
				"url": "https://sponsor.com/assets/logo.png"
			}
		},
		"mainEntityOfPage": "True",
		"keywords": [
			"keyword1",
			"keyword2",
			"keyword3",
			"keyword4"
		],
		"genre":["SEO","JSON-LD"],
		"articleSection": "Category",
		"articleBody": "Paste the body of your content in here..."
	}
</script>
 

16. JSON-LD code for books

<script type="application/ld+json">
{
      "@context": "https://schema.org",
      "@type": "WebPage",
      "breadcrumb": "Books > Marketing > JSON",
      "mainEntity":{
              "@type": "Book",
              "author": "https://example.com/author-page",
              "bookFormat": "https://schema.org/EBook",
              "datePublished": "2021-05-01",
              "image": "coverImage.png",
              "inLanguage": "English",
              "isbn": "XXXXXXXXXX",
              "name": "The Title of Book",
              "numberOfPages": "XXX",
              "offers": {
                "@type": "Offer",
                "availability": "https://schema.org/InStock",
                "price": "XX.XX",
                "priceCurrency": "USD"
              },
              "publisher": "Name of Publisher",
              "aggregateRating": {
                "@type": "AggregateRating",
                "ratingValue": "4",
                "reviewCount": "69"
              }
            }
    }
</script>
 

17. JSON-LD code for email

<script type="application/ld+json">
{
  "@context":"https://schema.org",
  "@type": "EmailMessage",
  "description": "Email description goes here...",
  "action": {
    "@type": "ViewAction",
    "url":"https://example.com/perma-link/id",
    "name":"Email Subject"
  }
}
</script
 

18. JSON-LD code for breadcrumb

<script type="application/ld+json">
{
  "@context": "https://schema.org",
  "@type": "BreadcrumbList",
  "itemListElement": [{
    "@type": "ListItem",
    "position": 1,
    "item": {
      "@id": "https://example.com/books",
      "name": "Books",
      "image": "https://example.com/images/icon-book.png"
    }
  },{
    "@type": "ListItem",
    "position": 2,
    "item": {
      "@id": "https://example.com/books/authors",
      "name": "Authors",
      "image": "https://example.com/images/icon-author.png"
    }
  },{
    "@type": "ListItem",
    "position": 3,
    "item": {
      "@id": "https://example.com/books/authors/justiceleague",
      "name": "Justice League",
      "image": "http://example.com/images/author-justice-league.png"
    }
  },{
    "@type": "ListItem",
    "position": 4,
    "item": {
      "@id": "https://example.com/books/authors/criminalmindset",
      "name": "Criminal Mindset",
      "image": "http://example.com/images/cover-criminal-mindset.png"
    }
  }]
}
</script>
 

19. JSON-LD code for a course or training

// Course code

<script type="application/ld+json">
{
  "@context": "https://schema.org",
  "@type": "Course",
  "name": "Course Name",
  "description": "Course description goes here...",
  "provider": {
    "@type": "Organization",
    "name": "Training Organization",
    "sameAs": "https://example.com"
  }
}
</script>

// Vocational training code

<script type="application/ld+json">
{
  "@context": "https://schema.org/",
  "@type": "EducationalOrganization",
  "name": "This College",
  "leiCode": "12345ABCDE",
  "taxID": "123-34-5678",
  "address": {
    "@type": "PostalAddress",
    "streetAddress": "123 This Street",
    "addressLocality": "Local Address",
    "addressRegion": "City/State",
    "postalCode": "XXXXX"
  },
  "contactPoint": {
    "@type": "ContactPoint",
    "contactType": "Admissions",
    "telephone": "+1234567890"
  },
  "subOrganization": {
    "@type": "EducationalOrganization",
    "name": "This College - Satelite Campus",
    "address": {
      "@type": "PostalAddress",
      "streetAddress": "123 That Street",
      "addressLocality": "Local Address",
      "addressRegion": "City/State",
      "postalCode": "XXXXX"
    }
  },
  "hasCredential": {
    "@type": "EducationalOccupationalCredential",
    "credentialCategory": "Accreditation",
    "recognizedBy": {
      "@type": "Organization",
      "name": "Accrediting Organization Name"
    }
  }
}
</script>
 

20. JSON-LD code for an event

// Simple code for an event

<script type="application/ld+json">
{
  "@context": "https://schema.org",
  "@graph": [
    {
      "@type": "Place",
      "address": {
        "@type": "PostalAddress",
        "addressLocality": "Local Address",
        "addressRegion": "City/State",
        "postalCode": "XXXXX",
        "streetAddress": "123 This Street"
      },
      "name": "Name of the Event"
    },
    {
      "@type": "Offer",
      "price": "XX.XX",
      "priceCurrency": "USD",
      "url": "http://tickets.com/purchase/here"
    }
  ]
}
</script>

// Longer version from Google

<script type="application/ld+json">
{
  "@context": "https://schema.org",
  "@type": "Event",
  "name": "Name of the event goes here",
  "startDate": "2022-01-01T19:30",
  "endDate": "2022-01-01T23:00",
  "location": {
    "@type": "Place",
    "name": "Exact venue of the event",
    "address": {
      "@type": "PostalAddress",
      "streetAddress": "1234 This Street",
      "addressLocality": "Local Address",
      "postalCode": "XXXXX",
      "addressRegion": "City/State",
      "addressCountry": "Country"
    }
  },
  "image": [
    "https://example.com/photos/1x1/photo.webp",
    "https://example.com/photos/4x3/photo.webp",
    "https://example.com/photos/16x9/photo.webp"
   ],
  "description": "Describe the event here.",
  "offers": {
    "@type": "Offer",
    "url": "https://buynow.com/event_offer/claim_offer",
    "price": "XX.XX",
    "priceCurrency": "USD",
    "availability": "https://schema.org/InStock",
    "validFrom": "2021-10-20T16:00"
  },
  "performer": {
    "@type": "PerformingGroup",
    "name": "Name of Band"
  }
}
</script>
 

21. JSON-LD code for a venue

<script type="application/ld+json">
[{
  "@context" : "https://schema.org",
  "@type" : "MusicEvent",
  "name" : "David Craig",
  "startDate" : "2021-04-12T19:30",
  "location" : {
    "@type" : "Place",
    "name" : "Concert Hall Name",
    "address" : "Specific Address"
  },
  "offers" : {
     "@type" : "Offer",
     "url" : "https://tickets.com/ticket/get-here"
  }
},{
  "@context" : "http://schema.org",
  "@type" : "MusicEvent",
  "name" : "David Craig",
  "startDate" : "2021-04-13T20:00",
  "location" : {
    "@type" : "Place",
    "name" : "Concert Hall Name",
    "address" : "Specific Address"
  },
  "offers" : {
    "@type" : "Offer",
    "url" : "https://tickets.com/ticket/buy-here"
  }
}]
</script>
 

22. JSON-LD code for a concert

// Concert with a single performer or band at multiple venues on different dates

<script type="application/ld+json">
[{
  "@context" : "https://schema.org",
  "@type" : "MusicEvent",
  "name" : "David Craig",
  "startDate" : "2021-04-12T19:30",
  "location" : {
    "@type" : "Place",
    "name" : "Concert Hall Name",
    "address" : "Specific Address"
  },
  "offers" : {
    "@type" : "Offer",
    "url" : "https://tickets.com/ticket/grab-yours"
  }
},{
  "@context" : "https://schema.org",
  "@type" : "MusicEvent",
  "name" : "David Craig",
  "startDate" : "2021-04-13T20:00",
  "location" : {
    "@type" : "Place",
    "name" : "Different Concert Hall",
    "address" : "Specific Address"
  },
  "offers" : {
    "@type" : "Offer",
    "url" : "http://tickets.com/venue.php?id=3267"
  }
}]
</script>

// Concert with multiple performers or bands

<script type="application/ld+json">
{
  "@context": "https://schema.org",
  "@type": "MusicEvent",
  "name": "Name of the Music Event",
  "startDate": "2021-05-23T20:00",
  "location": {
    "@type": "MusicVenue",
    "name": "Name of Event Venue",
    "address": "Specific Address"
  },
  "offers": {
    "@type": "Offer",
    "url": "/example/ticket/12341234",
    "category": "primary",
    "price": "XX.XX",
    "priceCurrency": "USD"
    "availability": "http://schema.org/InStock"
  },
  "performer": [{
    "@type": "MusicGroup",
    "name": "First Performer Name",
    "sameAs": "https://fpn.org/"
  },{
    "@type": "Person",
    "image": "/examples/snapshot.jpg",
    "name": "Name of Person",
    "sameAs": "https://personswebsite.com/"
  }],
  "workPerformed": [{
    "@type": "CreativeWork",
    "name": "Name of work performed goes here...",
    "sameAs": "https://example.com/page/creator-of-work"
  },{
    "@type": "CreativeWork",
    "name": "Name of work performed goes here...",
    "sameAs": "http://example.com/page/work-page"
  }]
}
</script>
 

Enjoyed this article? Stay informed by joining our newsletter!

Comments

You must be logged in to post a comment.

Related Articles
Author

Leveraging the power of tech to influence human behavior through positive vibes. Get paid to write about tech, science and more.