onezlabs

0%

SEO

JSON-LD Structured Data: Complete Schema.org Guide

A practical guide to implementing JSON-LD structured data for rich results — covering the most impactful schema types with copy-paste code examples.

June 24, 202613 min read
#JSON-LD#Schema.org#Structured Data#Rich Results#Technical SEO#Schema Markup
JSON-LD Structured Data: Complete Schema.org Guide

Why JSON-LD Over Microdata or RDFa

There are three syntaxes for adding Schema.org structured data to web pages: JSON-LD (JavaScript Object Notation for Linked Data), Microdata (HTML attributes inline in the content), and RDFa (another HTML attribute approach). Google recommends JSON-LD, and it is the correct choice for almost every implementation.

JSON-LD lives in a <script> tag in your page's <head> or anywhere in the body — it is completely separate from your visible HTML. This separation makes it easy to add, modify, and maintain without touching your content HTML. Microdata and RDFa require adding attributes directly to your content elements, which creates tight coupling between your content structure and your schema markup. Every time you restructure your HTML, you risk breaking your schema. With JSON-LD, the schema is independently maintained. This is why I use JSON-LD exclusively in all technical SEO work.

Organization and LocalBusiness Schema

Every website's homepage should have Organization schema at minimum. Local businesses should use LocalBusiness (or a more specific subtype) instead of the generic Organization type.

{
  "@context": "https://schema.org",
  "@type": "ProfessionalService",
  "@id": "https://yourdomain.com/#organization",
  "name": "Your Business Name",
  "url": "https://yourdomain.com",
  "logo": {
    "@type": "ImageObject",
    "url": "https://yourdomain.com/logo.png",
    "width": 200,
    "height": 60
  },
  "description": "Your 1-2 sentence business description.",
  "address": {
    "@type": "PostalAddress",
    "streetAddress": "123 Business Street",
    "addressLocality": "Davao City",
    "addressRegion": "Davao del Sur",
    "postalCode": "8000",
    "addressCountry": "PH"
  },
  "telephone": "+63-82-123-4567",
  "email": "contact@yourdomain.com",
  "openingHoursSpecification": [
    {
      "@type": "OpeningHoursSpecification",
      "dayOfWeek": ["Monday", "Tuesday", "Wednesday", "Thursday", "Friday"],
      "opens": "09:00",
      "closes": "18:00"
    }
  ],
  "sameAs": [
    "https://www.facebook.com/yourbusiness",
    "https://www.linkedin.com/company/yourbusiness",
    "https://twitter.com/yourbusiness"
  ],
  "priceRange": "$$",
  "areaServed": {
    "@type": "Country",
    "name": "Philippines"
  }
}

The sameAs array is particularly valuable — it connects your website entity to your social media profiles and other external presence, helping Google's Knowledge Graph understand that all of these are the same organization. Include every platform where you have an established presence.

Article and BlogPosting Schema

Article schema enables rich results in Google Discover, Google News surfaces, and can display author and date information directly in SERPs. Use Article for general content and BlogPosting for blog posts specifically.

{
  "@context": "https://schema.org",
  "@type": "BlogPosting",
  "@id": "https://yourdomain.com/blog/post-slug#article",
  "headline": "Your Article Headline — Under 110 Characters",
  "description": "Your article excerpt — 150-160 characters matching the meta description.",
  "image": {
    "@type": "ImageObject",
    "url": "https://yourdomain.com/images/post-og.jpg",
    "width": 1200,
    "height": 630
  },
  "author": {
    "@type": "Person",
    "@id": "https://yourdomain.com/about#author",
    "name": "Johnbert Oñez",
    "url": "https://yourdomain.com/about",
    "jobTitle": "Full Stack Developer",
    "sameAs": [
      "https://www.linkedin.com/in/johnbertonez",
      "https://github.com/onezlabs"
    ]
  },
  "publisher": {
    "@type": "Organization",
    "@id": "https://yourdomain.com/#organization",
    "name": "Your Site Name",
    "logo": {
      "@type": "ImageObject",
      "url": "https://yourdomain.com/logo.png"
    }
  },
  "datePublished": "2025-06-01T08:00:00+08:00",
  "dateModified": "2026-07-11T10:00:00+08:00",
  "mainEntityOfPage": {
    "@type": "WebPage",
    "@id": "https://yourdomain.com/blog/post-slug"
  },
  "keywords": ["keyword one", "keyword two", "keyword three"],
  "articleSection": "Technology",
  "wordCount": 2500
}

Note the @id usage — this is how JSON-LD entities reference each other across multiple schema blocks on the same site. The author's @id matches the author entity defined on the /about page. The publisher's @id matches the Organization entity defined on the homepage. This linking creates a knowledge graph about your site that Google can use to understand and represent your content.

FAQPage Schema for SERP Real Estate

FAQPage schema is one of the highest-ROI schema implementations because it can significantly expand your visual footprint in SERPs. FAQ rich results display 2-3 expandable Q&A pairs directly in the search result, sometimes doubling or tripling the vertical space your result occupies.

{
  "@context": "https://schema.org",
  "@type": "FAQPage",
  "mainEntity": [
    {
      "@type": "Question",
      "name": "What is the question as it appears on the page?",
      "acceptedAnswer": {
        "@type": "Answer",
        "text": "The complete answer text. Can include HTML for links and formatting. Keep under 300 words per answer for best SERP display."
      }
    },
    {
      "@type": "Question",
      "name": "Second question from the FAQ section?",
      "acceptedAnswer": {
        "@type": "Answer",
        "text": "The complete answer to the second question."
      }
    },
    {
      "@type": "Question",
      "name": "Third question?",
      "acceptedAnswer": {
        "@type": "Answer",
        "text": "The complete answer to the third question."
      }
    }
  ]
}

Important: The questions and answers in your FAQPage schema must exactly match what is visibly displayed on the page. Google will penalize misleading schema that describes content not present on the page. Do not add FAQ schema to pages without a visible FAQ section.

Product Schema for E-Commerce

Product schema can unlock price, availability, and rating rich results — these make your product pages stand out significantly in shopping-intent SERPs. The minimum viable Product schema:

{
  "@context": "https://schema.org",
  "@type": "Product",
  "name": "Product Name",
  "description": "Detailed product description matching the page content.",
  "image": [
    "https://yourdomain.com/products/product-main.jpg",
    "https://yourdomain.com/products/product-angle.jpg"
  ],
  "brand": {
    "@type": "Brand",
    "name": "Brand Name"
  },
  "sku": "SKU-12345",
  "offers": {
    "@type": "Offer",
    "priceCurrency": "PHP",
    "price": "1299.00",
    "priceValidUntil": "2026-12-31",
    "availability": "https://schema.org/InStock",
    "url": "https://yourdomain.com/products/product-slug",
    "seller": {
      "@type": "Organization",
      "name": "Your Store Name"
    }
  },
  "aggregateRating": {
    "@type": "AggregateRating",
    "ratingValue": "4.7",
    "reviewCount": "123",
    "bestRating": "5",
    "worstRating": "1"
  }
}

BreadcrumbList schema is easy to implement and reliably produces breadcrumb display in SERPs, replacing the raw URL with a clean navigation path. It also helps Google understand your site hierarchy.

{
  "@context": "https://schema.org",
  "@type": "BreadcrumbList",
  "itemListElement": [
    {
      "@type": "ListItem",
      "position": 1,
      "name": "Home",
      "item": "https://yourdomain.com"
    },
    {
      "@type": "ListItem",
      "position": 2,
      "name": "Blog",
      "item": "https://yourdomain.com/blog"
    },
    {
      "@type": "ListItem",
      "position": 3,
      "name": "Article Title",
      "item": "https://yourdomain.com/blog/article-slug"
    }
  ]
}

Testing and Validating Your Schema

Never deploy structured data without validating it first. Two essential tools:

Google Rich Results Test (search.google.com/test/rich-results): Enter a URL or paste code to see exactly which rich result types Google detects and any errors or warnings. This is the authoritative test for whether your schema will produce rich results in Google Search.

Schema.org Validator (validator.schema.org): Tests your JSON-LD against the Schema.org specification. Catches structural errors that the Rich Results Test might miss for non-rich-result schema types.

// Test your schema programmatically before deployment
async function validateSchema(url) {
  const response = await fetch(
    `https://searchconsole.googleapis.com/v1/urlTestingTools/richResults:run?url=${encodeURIComponent(url)}`,
    {
      method: "GET",
      headers: { Authorization: `Bearer ${OAUTH_TOKEN}` },
    }
  );
  const data = await response.json();
  return data.inspectionResult?.richResultsResult;
}

After deploying schema changes, monitor Google Search Console's Rich Results report (Search Appearance → Rich Results) to track rich result appearances and any validation errors that appear in field data. Schema errors that Google discovers in real crawls appear here even if they passed the Rich Results Test.

For help implementing structured data across your site as part of a comprehensive technical SEO strategy, or to see structured data implementations in my project portfolio, feel free to get in touch.

Frequently Asked Questions

Does structured data directly improve Google rankings?

Structured data is not a direct ranking factor, but it enables rich results (FAQ dropdowns, star ratings, breadcrumbs in SERPs) that significantly improve click-through rates. Higher CTR means more organic traffic from the same rankings, and higher CTR can indirectly signal quality to Google. For some schema types (speakable, product), structured data also makes your content accessible to Google surfaces beyond standard search.

How much JSON-LD schema should I put on a single page?

As much as is accurate and relevant. A product page might legitimately have Product schema, BreadcrumbList schema, FAQPage schema for a product FAQ section, and Organization schema. Each schema block should be accurate — never add schema for content that is not actually on the page. Google's documentation explicitly warns against misleading structured data.

What is the fastest way to implement structured data on WordPress?

Yoast SEO Premium and Rank Math Pro both generate most schema types automatically based on your page type and content. For standard page types (articles, products, local business), a premium SEO plugin is the fastest implementation path. For custom schema types or specific customizations, JSON-LD blocks added via a plugin or custom code give you full control.

Share:TwitterLinkedIn

Get the newsletter

Practical articles on AI development, full stack engineering, and WordPress — delivered whenI publish, not on a schedule. No spam, ever.

JO

Johnbert Oñez

AI Solutions Engineer & Full Stack Developer

Johnbert builds AI systems, web applications, and WordPress solutions for clients worldwide. Based in Davao City, Philippines. 6+ years, 50+ projects.

More Like This

Enjoyed the article? Let's build something together.

From AI chatbots to SaaS products — I turn ideas into working software. Based in Davao City, available worldwide.