What is JSON-LD? | Boost SEO & Rich Snippets

SeoLin2025-03-12 11:15:37On-Page SEO121

What is JSON-LD?

JSON (JavaScript Object Notation) is a lightweight data-interchange format. In SEO, JSON-LD (JSON for Linked Data) is commonly used to embed structured data, helping search engines better understand webpage content and enhancing the display of search results.

When embedding JSON-LD structured data in HTML, use the <script> tag and set the type attribute to application/ld+json.


Basic Syntax Rules

  • <script type="application/ld+json"> tag: Indicates that this section contains JSON-LD data. It is usually placed in the <head> tag of the webpage.

  • @context: Specifies the standard or vocabulary being used. Schema.org is the most commonly used JSON-LD schema markup.

  • @type: Defines the type of data (e.g., Product, Event, Person, etc.).

  • @id: Provides a unique identifier for the data (usually a URL).

  • @language: Specifies the language of the text (e.g., en for English).

  • @value: Defines the specific value of an attribute.

  • @graph: Allows combining multiple independent JSON-LD objects.


Common @type Attributes and Their Descriptions

  • WebSite: Website information

  • WebPage: Webpage details

  • FAQPage: FAQ content

  • Event: Event details

  • Product: Product or service details

  • Review: Product or service reviews

  • Action: User interactions (e.g., purchase, watch, comment)

  • Person: Individual or public figure

  • LocalBusiness: Local business information

  • Place: Location details (e.g., city, store, landmark)

  • Service: Service-oriented businesses

  • BlogPosting: Blog post metadata

  • NewsArticle: News article details

  • Article: General article

  • BreadcrumbList: Breadcrumb navigation

  • Thing: Parent class of all types

  • Offer: Product offers

  • mainEntity: Specifies the primary content of a webpage

  • mainEntityOfPage: Indicates that an entity is the main content of the page


JSON-LD Examples

Using Arrays

<script type="application/ld+json">
{
  "@context": "https://schema.org",
  "@type": "FAQPage",
  "mainEntity": [
    {
      "@type": "Question",
      "name": "Question 1",
      "acceptedAnswer": {
        "@type": "Answer",
        "text": "Answer 1"
      }
    },
    {
      "@type": "Question",
      "name": "Question 2",
      "acceptedAnswer": {
        "@type": "Answer",
        "text": "Answer 2"
      }
    }
  ]
}
</script>

Nested mainEntity Example

<script type="application/ld+json">
{
  "@context": "https://schema.org",
  "@type": "WebPage",
  "name": "About Us",
  "description": "Learn more about our company.",
  "mainEntity": {
    "@type": "Organization",
    "name": "Tech Corp",
    "logo": "https://example.com/logo.png",
    "contactPoint": {
      "@type": "ContactPoint",
      "telephone": "+1-800-555-1234",
      "contactType": "Customer Service"
    }
  }
}
</script>

mainEntityOfPage Example

<script type="application/ld+json">
{
  "@context": "https://schema.org",
  "@type": "Article",
  "headline": "How to Use JSON-LD for SEO",
  "mainEntityOfPage": {
    "@type": "WebPage",
    "@id": "https://example.com/article"
  }
}
</script>

BlogPosting Example

<script type="application/ld+json">
{
  "@context": "https://schema.org",
  "@type": "BlogPosting",
  "headline": "What is SEO?",
  "description": "Optimize your pages for users and search engines with SEO.",
  "keywords": "seo,seo meaning,search rankings,what is seo",
  "datePublished": "2025-03-01",
  "dateModified": "2025-03-01",
  "mainEntityOfPage": {
    "@type": "WebPage",
    "@id": "https://www.seoguidelab.com/learn-seo/what-is-seo.html"
  },
  "author": {
    "@type": "Person",
    "name": "admin"
  }
}
</script>

Product Example

<script type="application/ld+json">
{
  "@context": "https://schema.org",
  "@type": "Product",
  "name": "Wireless Mouse",
  "image": "https://example.com/images/mouse.jpg",
  "description": "A high-quality wireless mouse.",
  "brand": {
    "@type": "Brand",
    "name": "TechBrand"
  },
  "offers": {
    "@type": "Offer",
    "price": "29.99",
    "priceCurrency": "USD"
  }
}
</script>

WebPage Example

<script type="application/ld+json">
{
  "@context": "https://schema.org",
  "@type": "WebPage",
  "name": "About Us",
  "description": "Learn more about our company.",
  "mainEntity": {
    "@type": "Organization",
    "name": "Tech Corp",
    "logo": "https://example.com/logo.png",
    "contactPoint": {
      "@type": "ContactPoint",
      "telephone": "+1-800-555-1234",
      "contactType": "Customer Service"
    }
  }
}
</script>

LocalBusiness Example:

<script type="application/ld+json">
{
  "@context": "https://schema.org",
  "@type": "LocalBusiness",
  "name": "Tech Corp",
  "address": {
    "@type": "PostalAddress",
    "streetAddress": "123 Main St",
    "addressLocality": "New York",
    "postalCode": "10001",
    "addressCountry": "US"
  },
  "telephone": "+1-212-555-1234"
}
</script>

Event Example

<script type="application/ld+json">
{
  "@context": "https://schema.org",
  "@type": "Event",
  "name": "Global AI Summit 2025",
  "startDate": "2025-09-10T10:00:00+08:00",
  "endDate": "2025-09-12T17:00:00+08:00",
  "location": {
    "@type": "Place",
    "name": "Beijing International Conference Center",
    "address": {
      "@type": "PostalAddress",
      "streetAddress": "No. 8 Beichen East Road, Chaoyang District",
      "addressLocality": "Beijing",
      "addressRegion": "Beijing",
      "postalCode": "100101",
      "addressCountry": "CN"
    }
  },
  "description": "The Global AI Summit 2025 brings together AI experts, researchers, and industry leaders to discuss the latest advancements in artificial intelligence.",
  "url": "https://example.com/event/global-ai-summit-2025",
  "image": "https://example.com/ai-summit-2025.jpg",
  "offers": {
    "@type": "Offer",
    "url": "https://example.com/event-tickets",
    "priceCurrency": "USD",
    "price": "499.00",
    "availability": "https://schema.org/InStock",
    "validFrom": "2025-06-01T10:00:00+08:00"
  }
}
</script>

Person Example:

<script type="application/ld+json">
{
  "@context": "https://schema.org",
  "@type": "Person",
  "name": "John Doe",
  "jobTitle": "Software Engineer",
  "worksFor": {
    "@type": "Organization",
    "name": "Tech Corp"
  }
}
</script>

JSON-LD SEO Benefits

1. Improve Search Engine Understanding

JSON-LD provides clear data structures, helping search engines better interpret webpage content and match it with user intent.

2. Enhance Search Result Display (Rich Snippets)

JSON-LD enables rich snippets with elements like star ratings, images, prices, and publication dates, increasing click-through rates (CTR).

3. Support Special Functions for Content Types

  • FAQPage: Displays questions and answers directly in search results.

  • BreadcrumbList: Shows site structure in search results.

  • Event: Displays event details like date and location.

4. Improve Visibility in Vertical Search

Using JSON-LD, webpages can rank better in specialized searches like:

  • Image SearchImageObject helps images rank better.

  • Video SearchVideoObject boosts video visibility.

5. Enable Knowledge Graph and Semantic Search

Search engines use JSON-LD data to associate content with related entities, improving semantic search results.

6. Enhance Local SEO

Local businesses can use LocalBusiness schema to display details like name, address, and phone number (NAP) in search results.

7. Support Voice Search and AI Assistants

JSON-LD structured data helps AI assistants (Google Assistant, Siri) provide accurate voice responses.

8. Reduce Parsing Complexity for Search Engines

As JSON-LD is embedded as a separate script, it does not interfere with HTML content, making it easier for search engines to parse.

9. Support Multi-Language and Internationalization

JSON-LD can define content languages to optimize for international SEO.


Conclusion

JSON-LD is a powerful tool for SEO. It enhances search engine understanding, improves rich snippet displays, and boosts user engagement. Implementing JSON-LD correctly can significantly increase webpage visibility, click-through rates, and overall search performance.

Tags: Technical SEO

Related articles

How to Optimize Images for Web and SEO | Best Image SEO Tips

IntroductionImages are essential for engaging web content—but they can also be the silent culprit be...

6 Technical SEO Checklist to Increase Your Traffic

InstructionTechnical SEO isn’t just about making search engines happy—it’s about optimizing the expe...

How to Implement Hreflang Tags for Multilingual SEO

Introduction to Hreflang and Its PurposeHreflang is the unsung hero of multilingual SEO—a protocol t...

What Are Core Web Vitals? - Optimize PageSpeed

What Are Core Web Vitals? - Optimize PageSpeed

IntroductionA swift, seamless website is no longer a luxury — it’s the silent handshake between bran...

 Featured Snippets vs. Rich Snippets (AKA: Rich Results)

Featured Snippets vs. Rich Snippets (AKA: Rich Results)

InstructionUnderstanding featured snippets and rich snippets can make all the difference. Both enhan...

What Is a Sitemap? How to Create a Sitemap?

IntroductionThis comprehensive guide to sitemaps is designed for website owners, SEO professionals,...