JSON-LD

What is JSON-LD?

JSON-LD (JavaScript Object Notation for Linked Data) is the preferred format for structured data on the web. It allows information about web page content to be encoded in a machine-readable format that search engines can better understand.

Advantages of JSON-LD

JSON-LD offers decisive advantages over other markup formats like Microdata or RDFa:

  • Simple Implementation: JSON-LD is inserted in the <head> section and doesn't interfere with HTML code
  • Maintainability: Structured data is clearly separated from content
  • Flexibility: Easy adjustments without HTML changes
  • Google Support: Google prefers JSON-LD for structured data

JSON-LD Basic Structure

The basic structure of JSON-LD follows a simple schema:

{
  "@context": "https://schema.org",
  "@type": "WebPage",
  "name": "Page Title",
  "description": "Page Description"
}

Important Elements

Element
Description
Example
@context
Defines the schema used
"https://schema.org"
@type
Specifies the entity type
"Article", "Organization"
@id
Unique identification
"https://example.com/article"

Schema.org Integration

Schema.org is the vocabulary for structured data supported by Google, Microsoft, Yahoo and Yandex. It defines over 800 different schema types for various content types.

Commonly Used Schema Types

Schema Type
Usage
SEO Benefit
Article
Blog posts, News
Rich Snippets, better display
Organization
Company, Brand
Knowledge Panel, Branding
Product
E-commerce products
Prices, reviews, availability
LocalBusiness
Local businesses
Local Pack, contact data
FAQPage
Frequently asked questions
FAQ Rich Snippets

JSON-LD Implementation

1. Basic Implementation

JSON-LD is inserted in the <head> section of the HTML page:

<script type="application/ld+json">
{
  "@context": "https://schema.org",
  "@type": "Article",
  "headline": "Article Title",
  "author": {
    "@type": "Person",
    "name": "Author Name"
  },
  "datePublished": "2025-01-21",
  "dateModified": "2025-01-21"
}
</script>

2. Nested Structures

More complex data can be nested:

{
  "@context": "https://schema.org",
  "@type": "Organization",
  "name": "My Company",
  "address": {
    "@type": "PostalAddress",
    "streetAddress": "123 Main Street",
    "postalCode": "12345",
    "addressLocality": "Berlin"
  },
  "contactPoint": {
    "@type": "ContactPoint",
    "telephone": "+49-30-12345678",
    "contactType": "customer service"
  }
}

Rich Snippets Optimization

Rich Snippets are enhanced search results that display additional information like ratings, prices or images.

Common Rich Snippet Types

Rich Snippet Type
Required Schema
Additional Data
Ratings
Review, AggregateRating
ratingValue, reviewCount
Prices
Product, Offer
price, priceCurrency
Events
Event
startDate, location
Recipes
Recipe
cookTime, ingredients

Testing and Validation

Google Rich Results Test

The Google Rich Results Test is the most important tool for validating JSON-LD markup:

  1. URL Test: Direct URL input
  2. Code Test: Insert JSON-LD code
  3. Error Resolution: Detailed error messages
  4. Preview: Display of Rich Snippets

Additional Test Tools

  • Schema.org Validator: Official Schema.org validation
  • Structured Data Testing Tool: Comprehensive markup validation
  • Google Search Console: Rich Results monitoring

Best Practices for JSON-LD

1. Correct Implementation

  • Complete Data: Specify all required properties
  • Correct Data Types: Format strings, numbers and dates correctly
  • Unique IDs: Use @id for unique identification
  • Consistent Data: Markup must match visible content

2. Performance Optimization

  • Minimization: Compress JSON-LD code
  • Caching: Cache static JSON-LD files
  • Lazy Loading: Load on demand for dynamic content

3. Maintenance and Updates

  • Regular Testing: Validate markup regularly
  • Schema Updates: Adapt to Schema.org changes
  • Monitoring: Monitor Rich Results in Google Search Console

Avoiding Common Errors

Technical Errors

Error
Cause
Solution
Syntax Error
Invalid JSON
Use JSON validator
Missing Properties
Incomplete schema
Check Schema.org documentation
Wrong Data Types
String instead of Number
Format data types correctly
Duplicate Markups
Multiple identical schemas
Remove redundant markups

Content Errors

  • Inconsistent Data: Markup must match visible content
  • Missing Updates: Regularly check data for currency
  • Misleading Information: Only mark correct and relevant data

Monitoring and Analytics

Google Search Console

Google Search Console provides comprehensive insights into structured data performance:

  • Rich Results Report: Overview of all Rich Snippets
  • Error Monitoring: Identification of markup problems
  • Performance Tracking: Clicks and impressions of Rich Results

Important Metrics

Metric
Description
Target Value
Rich Results Coverage
Percentage of pages with Rich Results
> 80%
Error Rate
Percentage of pages with markup errors
< 5%
CTR Improvement
Click rate improvement through Rich Results
+20%

Future of JSON-LD

AI and Machine Learning

With the increasing importance of AI in search engine optimization, JSON-LD becomes even more important:

  • Entity Recognition: Better recognition of entities
  • Semantic Search: Understanding of context and meaning
  • Voice Search: Optimization for voice search

New Schema Types

Schema.org continuously expands the vocabulary:

  • AI-Generated Content: Markup for AI-generated content
  • Virtual Reality: VR-specific schema types
  • IoT Devices: Internet of Things integration

Checklist: JSON-LD Implementation

Before Implementation

  • [ ] Determine Schema Type: Select appropriate Schema.org type
  • [ ] Collect Data: Gather all required information
  • [ ] Choose Tool: JSON-LD generator or manual creation

During Implementation

  • [ ] Check Syntax: Use JSON validator
  • [ ] Completeness: Specify all required properties
  • [ ] Consistency: Align markup with visible content

After Implementation

  • [ ] Testing: Run Google Rich Results Test
  • [ ] Monitoring: Set up Google Search Console
  • [ ] Optimization: Adapt based on performance data

Related Topics