JSON-LD Structured Data in Nuxt · Nuxt SEO

[NuxtSEO](https://nuxtseo.com/ "Home")

- [Modules](https://nuxtseo.com/docs/nuxt-seo/getting-started/introduction)
- [Tools](https://nuxtseo.com/tools)
- [Pro](https://nuxtseo.com/pro)
- [Learn SEO](https://nuxtseo.com/learn-seo/nuxt) [Releases](https://nuxtseo.com/releases)

[1.4K](https://github.com/harlan-zw/nuxt-seo)

[Nuxt SEO on GitHub](https://github.com/harlan-zw/nuxt-seo)

Learn SEO

Master search optimization

Nuxt

 Vue

[SEO Checklist](https://nuxtseo.com/learn-seo/checklist) [Pre-Launch Warmup](https://nuxtseo.com/learn-seo/pre-launch-warmup) [Backlinks & Authority](https://nuxtseo.com/learn-seo/backlinks)

[Mastering Meta](https://nuxtseo.com/learn-seo/nuxt/mastering-meta)

- [Titles](https://nuxtseo.com/learn-seo/nuxt/mastering-meta/titles)
- [Meta Description](https://nuxtseo.com/learn-seo/nuxt/mastering-meta/descriptions)
- [Image Alt Text](https://nuxtseo.com/learn-seo/nuxt/mastering-meta/alt-text)
- [Social Sharing](https://nuxtseo.com/learn-seo/nuxt/mastering-meta/open-graph)
- [Rich Results](https://nuxtseo.com/learn-seo/nuxt/mastering-meta/rich-results)
- [Schema.org](https://nuxtseo.com/learn-seo/nuxt/mastering-meta/schema-org)
- [Twitter Cards](https://nuxtseo.com/learn-seo/nuxt/mastering-meta/twitter-cards)

[ Controlling Crawlers](https://nuxtseo.com/learn-seo/nuxt/controlling-crawlers)

- [Robots Txt](https://nuxtseo.com/learn-seo/nuxt/controlling-crawlers/robots-txt)
- [Sitemaps](https://nuxtseo.com/learn-seo/nuxt/controlling-crawlers/sitemaps)
- [Robot Meta Tag](https://nuxtseo.com/learn-seo/nuxt/controlling-crawlers/meta-tags)
- [Canonical Link Tag](https://nuxtseo.com/learn-seo/nuxt/controlling-crawlers/canonical-urls)
- [HTTP Redirects](https://nuxtseo.com/learn-seo/nuxt/controlling-crawlers/redirects)
- [Duplicate Content](https://nuxtseo.com/learn-seo/nuxt/controlling-crawlers/duplicate-content)
- [llms.txt](https://nuxtseo.com/learn-seo/nuxt/controlling-crawlers/llms-txt)

[ Routes & Rendering](https://nuxtseo.com/learn-seo/nuxt/routes-and-rendering)

- [URL Structure](https://nuxtseo.com/learn-seo/nuxt/routes-and-rendering/url-structure)
- [Pagination](https://nuxtseo.com/learn-seo/nuxt/routes-and-rendering/pagination)
- [Trailing Slashes](https://nuxtseo.com/learn-seo/nuxt/routes-and-rendering/trailing-slashes)
- [Query Parameters](https://nuxtseo.com/learn-seo/nuxt/routes-and-rendering/query-parameters)
- [Hreflang & i18n](https://nuxtseo.com/learn-seo/nuxt/routes-and-rendering/i18n)
- [404 Pages](https://nuxtseo.com/learn-seo/nuxt/routes-and-rendering/404-pages)
- [Dynamic Routes](https://nuxtseo.com/learn-seo/nuxt/routes-and-rendering/dynamic-routes)
- [Internal Linking](https://nuxtseo.com/learn-seo/nuxt/routes-and-rendering/internal-linking)
- [Programmatic SEO](https://nuxtseo.com/learn-seo/nuxt/routes-and-rendering/programmatic-seo)
- [Rendering Modes](https://nuxtseo.com/learn-seo/nuxt/routes-and-rendering/rendering)
- [Security](https://nuxtseo.com/learn-seo/nuxt/routes-and-rendering/security)

[ Launch & Listen](https://nuxtseo.com/learn-seo/nuxt/launch-and-listen)

- [Getting Indexed](https://nuxtseo.com/learn-seo/nuxt/launch-and-listen/going-live)
- [Google Search Console](https://nuxtseo.com/learn-seo/nuxt/launch-and-listen/search-console)
- [Core Web Vitals](https://nuxtseo.com/learn-seo/nuxt/launch-and-listen/core-web-vitals)
- [Indexing Issues](https://nuxtseo.com/learn-seo/nuxt/launch-and-listen/indexing-issues)
- [SEO Monitoring](https://nuxtseo.com/learn-seo/nuxt/launch-and-listen/seo-monitoring)
- [Site Migration](https://nuxtseo.com/learn-seo/nuxt/launch-and-listen/site-migration)
- [IndexNow](https://nuxtseo.com/learn-seo/nuxt/launch-and-listen/indexnow)
- [Debugging](https://nuxtseo.com/learn-seo/nuxt/launch-and-listen/debugging)
- [AI Search Optimization](https://nuxtseo.com/learn-seo/nuxt/launch-and-listen/ai-optimized-content)

1. [Learn SEO for Nuxt](https://nuxtseo.com/learn-seo)
2.
3. [Mastering Meta](https://nuxtseo.com/learn-seo/nuxt/mastering-meta)
4.
5. [Schema Org](https://nuxtseo.com/learn-seo/nuxt/mastering-meta/schema-org)

# JSON-LD Structured Data in Nuxt

Learn how to implement Schema.org structured data in Nuxt. Get rich results in Google search with type-safe JSON-LD markup using the Nuxt Schema.org module.

[![Harlan Wilton](https://avatars.githubusercontent.com/u/5326365?v=4)Harlan Wilton](https://x.com/harlan-zw)8 mins read Published Nov 5, 2024 Updated Dec 17, 2025

What you'll learn

- `useSchemaOrg()` provides type-safe JSON-LD with automatic graph linking
- Nuxt Schema.org module sets up WebSite and WebPage schemas automatically
- Rich results aren't guaranteed. test with Google's Rich Results Test

Schema.org structured data helps Google display [Rich Results](https://developers.google.com/search/docs/appearance/structured-data/search-gallery). stars, FAQs, recipes, product prices. Rotten Tomatoes saw a [25% higher click-through rate](https://developers.google.com/search/docs/appearance/structured-data/intro-structured-data) on pages with structured data compared to pages without.

```
<!-- JSON-LD structured data in the head -->
<script type="application/ld+json">
{
  "@context": "https://schema.org",
  "@type": "Article",
  "headline": "JSON-LD Structured Data in Nuxt",
  "author": { "@type": "Person", "name": "Your Name" }
}
</script>
```

Google [recommends JSON-LD](https://developers.google.com/search/docs/appearance/structured-data/intro-structured-data) as the easiest format to implement and maintain. Google supports rich results for many schema types including Article, Product, FAQ, and Breadcrumb. See [Rich Results](https://nuxtseo.com/learn-seo/nuxt/mastering-meta/rich-results) for the full list of active types and eligibility details.

Rich results aren't guaranteed. Content must match the markup and follow [Google's structured data guidelines](https://developers.google.com/search/docs/appearance/structured-data/sd-policies).

## [Manual Implementation](#manual-implementation)

Nuxt includes [Unhead](https://unhead.unjs.io/) for head management. Add JSON-LD directly via `useHead()`:

pages/blog/[slug].vue

```
<script lang="ts" setup>
const { data: article } = await useFetch(\`/api/articles/${route.params.slug}\`)

useHead({
  script: [
    {
      type: 'application/ld+json',
      innerHTML: JSON.stringify({
        '@context': 'https://schema.org',
        '@type': 'Article',
        'headline': article.value.title,
        'datePublished': article.value.publishedAt,
        'author': {
          '@type': 'Person',
          'name': article.value.author.name
        }
      })
    }
  ]
})
</script>
```

For type safety and automatic [graph linking](https://schema.org/docs/data-and-datasets.html), use `useSchemaOrg()` from `@unhead/schema-org`:

```
pnpm add -D @unhead/schema-org
```

See [Unhead Schema.org setup](https://unhead.unjs.io/schema-org/getting-started/setup) for configuration.

## [Automated Setup with Nuxt Schema.org](#automated-setup-with-nuxt-schemaorg)

The Nuxt Schema.org module handles structured data automatically with zero config:

[Schema.org v6.0.44M184 The quickest and easiest way to build Schema.org graphs.](https://nuxtseo.com/docs/schema-org/getting-started/introduction)

Or install the full Nuxt SEO module which includes Schema.org plus sitemaps, robots.txt, and OG images:

[Nuxt SEO v5.1.22.7M1.4K The all-in-one module that brings it all together.](https://nuxtseo.com/docs/nuxt-seo/getting-started/introduction)

The module sets up base schema (WebSite, WebPage, Organization/Person) automatically and provides type-safe helpers for all common schema types.

useSchemaOrg (recommended)

useHead (manual)

```
import { defineArticle, useSchemaOrg } from '@unhead/schema-org/vue'

useSchemaOrg([
  defineArticle({
    headline: 'JSON-LD Structured Data in Nuxt',
    author: { name: 'Your Name' },
    datePublished: new Date(2024, 0, 15),
  })
])
```

```
useHead({
  script: [
    {
      type: 'application/ld+json',
      innerHTML: JSON.stringify({
        '@context': 'https://schema.org',
        '@type': 'Article',
        'headline': 'JSON-LD Structured Data in Nuxt',
        'author': { '@type': 'Person', 'name': 'Your Name' }
      })
    }
  ],
})
```

The `defineX()` helpers align with [Google's Structured Data Guidelines](https://developers.google.com/search/docs/guides/sd-policies) and handle boilerplate:

| Helper | Rich Result Type |
| --- | --- |
| [`defineArticle()`](https://unhead.unjs.io/schema-org/schema/article) | Article, NewsArticle, BlogPosting |
| [`defineBreadcrumb()`](https://unhead.unjs.io/schema-org/schema/breadcrumb) | Breadcrumb navigation |
| [`defineQuestion()`](https://unhead.unjs.io/schema-org/schema/question) | FAQ pages |
| [`defineProduct()`](https://unhead.unjs.io/schema-org/schema/product) | Product listings |

## [Reactive Data](#reactive-data)

`useSchemaOrg()` accepts refs and computed getters:

```
const article = ref({
  title: 'My Article',
  description: 'Article description'
})

useSchemaOrg([
  defineArticle({
    headline: () => article.value.title,
    description: () => article.value.description,
  })
])
```

## [Site-Wide Setup](#site-wide-setup)

Set up base schema in your root component or layout. Child components can add specific types that link to this graph automatically.

app.vue

```
<script lang="ts" setup>
import { defineOrganization, defineWebPage, defineWebSite, useSchemaOrg } from '@unhead/schema-org/vue'

const route = useRoute()
useHead({
  templateParams: {
    schemaOrg: {
      host: 'https://mysite.com',
      path: route.path,
      inLanguage: 'en',
    }
  }
})

useSchemaOrg([
  defineWebPage(),
  defineWebSite({
    name: 'My Site',
    description: 'What my site does.',
  }),
  // Use defineOrganization for businesses, definePerson for personal sites
  defineOrganization({
    name: 'My Company',
    logo: '/logo.png',
  })
])
</script>
```

If using the Nuxt Schema.org module, the module handles this configuration automatically in `nuxt.config.ts`:

nuxt.config.ts

```
export default defineNuxtConfig({
  modules: ['nuxt-schema-org'],
  site: {
    url: 'https://mysite.com',
    name: 'My Site',
  },
  schemaOrg: {
    identity: {
      type: 'Organization',
      name: 'My Company',
      logo: '/logo.png',
    }
  }
})
```

## [Blog Article Example](#blog-article-example)

Nuxt's hierarchical head system means you don't need to repeat `WebSite` and `WebPage` if they're in the layout:

pages/blog/[slug].vue

```
<script lang="ts" setup>
import { defineArticle, useSchemaOrg } from '@unhead/schema-org/vue'

const { data: article } = await useFetch(\`/api/articles/${route.params.slug}\`)

useSchemaOrg([
  defineArticle({
    headline: article.value.title,
    image: article.value.image,
    datePublished: article.value.publishedAt,
    dateModified: article.value.updatedAt,
    author: {
      name: article.value.author.name,
      url: article.value.author.url,
    }
  })
])
</script>
```

## [Breadcrumb Schema](#breadcrumb-schema)

Breadcrumb schema tells Google the structure of your site. Instead of showing a raw URL like `example.com/features/color-extraction` in search results, Google displays a nice path: Home > Features > Color Extraction.

One ecommerce case study found that adding full-hierarchy breadcrumbs to product listing pages [increased CTR by 10% and organic traffic by 16%](https://www.searchenginejournal.com/breadcrumbs-seo/255007/).

Note: Google [removed visible breadcrumbs from mobile SERPs](https://www.searchenginejournal.com/google-search-breadcrumb-changes-mobile/) in January 2025, replacing them with domain-only labels. The schema still powers desktop breadcrumb rich results and helps AI engines understand your site hierarchy.

pages/features/[slug].vue

```
<script lang="ts" setup>
import { defineBreadcrumb, useSchemaOrg } from '@unhead/schema-org/vue'

const route = useRoute()

useSchemaOrg([
  defineBreadcrumb({
    itemListElement: [
      { name: 'Home', item: 'https://mysite.com' },
      { name: 'Features', item: 'https://mysite.com/features' },
      { name: route.params.slug, item: \`https://mysite.com${route.path}\` },
    ],
  }),
])
</script>
```

For dynamic breadcrumbs generated from the route path:

composables/useBreadcrumbs.ts

```
export function useDynamicBreadcrumbs() {
  const route = useRoute()
  const segments = route.path.split('/').filter(Boolean)

  const items = segments.map((segment, index) => ({
    name: segment.replace(/-/g, ' ').replace(/\b\w/g, c => c.toUpperCase()),
    item: \`https://mysite.com/${segments.slice(0, index + 1).join('/')}\`,
  }))

  useSchemaOrg([
    defineBreadcrumb({ itemListElement: [{ name: 'Home', item: 'https://mysite.com' }, ...items] }),
  ])
}
```

## [FAQ Schema](#faq-schema)

FAQ schema makes your search listing expandable with dropdown Q&As. Use `defineQuestion()` for each question/answer pair:

pages/pricing.vue

```
<script lang="ts" setup>
import { defineQuestion, useSchemaOrg } from '@unhead/schema-org/vue'

useSchemaOrg([
  defineQuestion({
    name: 'What browsers does PocketUI work with?',
    acceptedAnswer: 'Chrome, Brave, Arc, Edge, and any Chromium-based browser.',
  }),
  defineQuestion({
    name: 'Is there a free plan?',
    acceptedAnswer: 'Yes. The free plan includes color extraction and font detection with up to 10 saves per month.',
  }),
])
</script>
```

For dynamic FAQs from a CMS or API:

pages/faq.vue

```
<script lang="ts" setup>
const { data: faqs } = await useFetch('/api/faqs')

useSchemaOrg(
  (faqs.value || []).map(faq => defineQuestion({
    name: faq.question,
    acceptedAnswer: faq.answer,
  }))
)
</script>
```

Google [removed FAQ rich results](https://developers.google.com/search/blog/2023/08/howto-faq-changes) for most sites in 2023, but the markup [still drives AI citations](https://nuxtseo.com/learn-seo/nuxt/mastering-meta/rich-results). Pages with FAQPage markup are [3.2x more likely to be cited in Google AI Overviews](https://www.onely.com/blog/how-to-rank-in-google-ai-overviews/) than pages with unstructured text alone, and over [92% of AI Overview citations](https://www.seoclarity.net/blog/google-ai-overview-study) come from domains already ranking in the top 10. For a broader strategy on maximizing AI visibility, see [AI-optimized content](https://nuxtseo.com/learn-seo/nuxt/launch-and-listen/ai-optimized-content).

## [Testing Your Markup](#testing-your-markup)

Validate your markup with [Google's Rich Results Test](https://search.google.com/test/rich-results). For a full testing workflow including Search Console monitoring, see [Rich Results](https://nuxtseo.com/learn-seo/nuxt/mastering-meta/rich-results#testing-your-markup).

For local development, inspect the `<head>` to verify the JSON-LD script tag is present and valid JSON.

[The 2026 SEO Checklist for Nuxt & Vue Pre-launch setup, post-launch verification, and ongoing monitoring. Interactive checklist with links to every guide.](https://nuxtseo.com/learn-seo/checklist) [Haven't launched yet? Start with the Pre-Launch Warmup](https://nuxtseo.com/learn-seo/pre-launch-warmup)

---

[Rich Results Get rich results in Google search with Schema.org structured data. Learn which types still work after Google's 2023 FAQ/HowTo removals.](https://nuxtseo.com/learn-seo/nuxt/mastering-meta/rich-results) [Twitter Cards Configure Twitter/X Cards to control how your links appear when shared on Twitter with rich previews, images, and metadata.](https://nuxtseo.com/learn-seo/nuxt/mastering-meta/twitter-cards)

On this page

- [Manual Implementation](#manual-implementation)
- [Automated Setup with Nuxt Schema.org](#automated-setup-with-nuxt-schemaorg)
- [Reactive Data](#reactive-data)
- [Site-Wide Setup](#site-wide-setup)
- [Blog Article Example](#blog-article-example)
- [Breadcrumb Schema](#breadcrumb-schema)
- [FAQ Schema](#faq-schema)
- [Testing Your Markup](#testing-your-markup)

[GitHub](https://github.com/harlan-zw/nuxt-seo) [ Discord](https://discord.com/invite/275MBUBvgP)

### [NuxtSEO](https://nuxtseo.com/ "Home")

- [Getting Started](https://nuxtseo.com/docs/nuxt-seo/getting-started/introduction)
- [MCP](https://nuxtseo.com/docs/nuxt-seo/guides/mcp)

Modules

- [Robots](https://nuxtseo.com/docs/robots/getting-started/introduction)
- [Sitemap](https://nuxtseo.com/docs/sitemap/getting-started/introduction)
- [OG Image](https://nuxtseo.com/docs/og-image/getting-started/introduction)
- [Schema.org](https://nuxtseo.com/docs/schema-org/getting-started/introduction)
- [Link Checker](https://nuxtseo.com/docs/link-checker/getting-started/introduction)
- [SEO Utils](https://nuxtseo.com/docs/seo-utils/getting-started/introduction)
- [Site Config](https://nuxtseo.com/docs/site-config/getting-started/introduction)
- [Skew Protection](https://nuxtseo.com/docs/skew-protection/getting-started/introduction)
- [AI Ready](https://nuxtseo.com/docs/ai-ready/getting-started/introduction)

### [NuxtSEO Pro](https://nuxtseo.com/pro "Home")

- [Getting Started](https://nuxtseo.com/pro)
- [Dashboard](https://nuxtseo.com/pro/dashboard)
- [Pro MCP](https://nuxtseo.com/docs/nuxt-seo-pro/mcp/installation)

### [Learn SEO](https://nuxtseo.com/learn-seo "Learn SEO")

Nuxt

- [Mastering Meta](https://nuxtseo.com/learn-seo/nuxt/mastering-meta)
- [Controlling Crawlers](https://nuxtseo.com/learn-seo/nuxt/controlling-crawlers)
- [Launch & Listen](https://nuxtseo.com/learn-seo/nuxt/launch-and-listen)
- [Routes & Rendering](https://nuxtseo.com/learn-seo/nuxt/routes-and-rendering)
- [Staying Secure](https://nuxtseo.com/learn-seo/nuxt/routes-and-rendering/security)

Vue

- [Vue SEO Guide](https://nuxtseo.com/learn-seo/vue)
- [Mastering Meta](https://nuxtseo.com/learn-seo/vue/mastering-meta)
- [Controlling Crawlers](https://nuxtseo.com/learn-seo/vue/controlling-crawlers)
- [SPA SEO](https://nuxtseo.com/learn-seo/vue/spa)
- [SSR Frameworks](https://nuxtseo.com/learn-seo/vue/ssr-frameworks)
- [SEO Checklist](https://nuxtseo.com/learn-seo/checklist)
- [Pre-Launch Warmup](https://nuxtseo.com/learn-seo/pre-launch-warmup)
- [Backlinks & Authority](https://nuxtseo.com/learn-seo/backlinks)

### [Tools](https://nuxtseo.com/tools "SEO Tools")

- [Social Share Debugger](https://nuxtseo.com/tools/social-share-debugger)
- [Robots.txt Generator](https://nuxtseo.com/tools/robots-txt-generator)
- [Meta Tag Checker](https://nuxtseo.com/tools/meta-tag-checker)
- [HTML to Markdown](https://nuxtseo.com/tools/html-to-markdown)
- [XML Sitemap Validator](https://nuxtseo.com/tools/xml-sitemap-validator)
- [Schema.org Validator](https://nuxtseo.com/tools/schema-validator)
- [Keyword Idea Generator](https://nuxtseo.com/tools/keyword-generator)
- [Keyword Research](https://nuxtseo.com/tools/keyword-research)
- [SERP Analyzer](https://nuxtseo.com/tools/serp-analyzer)
- [Domain Rankings](https://nuxtseo.com/tools/domain-rankings)

Copyright © 2023-2026 Harlan Wilton - [MIT License](https://github.com/harlan-zw/nuxt-seo/blob/main/license) · [mdream](https://mdream.dev)