Back to docs

JSON-LD & Structured Data

How structured data improves SEO and makes your OG images richer.

What is JSON-LD?

JSON-LD (JavaScript Object Notation for Linked Data) is a lightweight format for embedding structured data in your web pages. Search engines like Google use it to better understand your content, which can lead to rich results — enhanced search listings with star ratings, FAQs, product info, and more.

Unlike microdata or RDFa, JSON-LD lives in a <script> tag in your page's <head>, completely decoupled from your HTML markup. This makes it easier to add, maintain, and debug.

Article schema

The most common use case for blogs and news sites. Here is a minimal example:

<script type="application/ld+json">
{
  "@context": "https://schema.org",
  "@type": "Article",
  "headline": "Why OG Images Matter",
  "author": {
    "@type": "Person",
    "name": "Jane Doe"
  },
  "datePublished": "2026-02-20",
  "image": "https://yoursite.com/og/why-og-images.png"
}
</script>

Product schema

E-commerce sites benefit hugely from Product structured data, enabling rich snippets with pricing, availability, and reviews:

<script type="application/ld+json">
{
  "@context": "https://schema.org",
  "@type": "Product",
  "name": "Wireless Headphones",
  "image": "https://yoursite.com/products/headphones.jpg",
  "offers": {
    "@type": "Offer",
    "price": "79.99",
    "priceCurrency": "USD"
  }
}
</script>

FAQ schema

FAQ pages can get expandable results directly in Google search:

<script type="application/ld+json">
{
  "@context": "https://schema.org",
  "@type": "FAQPage",
  "mainEntity": [
    {
      "@type": "Question",
      "name": "What is an OG image?",
      "acceptedAnswer": {
        "@type": "Answer",
        "text": "An OG image is the preview image shown when a link is shared on social media."
      }
    }
  ]
}
</script>

How Instant OG uses JSON-LD

When you call the Instant OG API, our extractor scans your page for JSON-LD structured data in addition to standard meta tags. If we find structured data, we use it to generate richer, more accurate OG images:

  • Article pages — We pull the headline, author name, and publish date for a complete preview.
  • Product pages — We display the product name, price, and availability directly on the image.
  • FAQ pages — We highlight the top questions to give context at a glance.

This means better meta tags, less manual configuration, and OG images that accurately represent your content.

Further reading

Let Instant OG handle the rest

Add JSON-LD to your pages and Instant OG will automatically generate beautiful, data-rich OG images. Start free with 1,000 credits.

Get started free →