# Structured Data & JSON-LD **Meta-Description:** Strukturierte Daten mit JSON-LD für SEO. Schema.org Typen, Rich Snippets und Google Rich Results für bessere Sichtbarkeit. **Keywords:** JSON-LD, Structured Data, Schema.org, Rich Snippets, SEO, Google Rich Results, Semantic Web --- ## Einführung **JSON-LD** (JavaScript Object Notation for Linked Data) ist Googles bevorzugtes Format für **strukturierte Daten**. Es ermöglicht **Rich Snippets** in Suchergebnissen – von Sternebewertungen bis FAQs. Dieser Guide zeigt die wichtigsten Schema-Typen für moderne Websites. --- ## JSON-LD Overview ``` ┌─────────────────────────────────────────────────────────────┐ │ STRUCTURED DATA ECOSYSTEM │ ├─────────────────────────────────────────────────────────────┤ │ │ │ Schema.org Hierarchy: │ │ ┌─────────────────────────────────────────────────────┐ │ │ │ Thing (Base Type) │ │ │ │ ├── CreativeWork │ │ │ │ │ ├── Article │ │ │ │ │ ├── BlogPosting │ │ │ │ │ ├── WebPage │ │ │ │ │ └── SoftwareApplication │ │ │ │ ├── Organization │ │ │ │ │ ├── LocalBusiness │ │ │ │ │ └── Corporation │ │ │ │ ├── Person │ │ │ │ ├── Product │ │ │ │ ├── Event │ │ │ │ └── Place │ │ │ └─────────────────────────────────────────────────────┘ │ │ │ │ Rich Results Types: │ │ ┌─────────────────────────────────────────────────────┐ │ │ │ ⭐ Review Snippets (Sternebewertungen) │ │ │ │ ❓ FAQ Snippets (Accordion Q&A) │ │ │ │ 📝 How-To Snippets (Schritt-für-Schritt) │ │ │ │ 🛒 Product Snippets (Preis, Verfügbarkeit) │ │ │ │ 📅 Event Snippets (Datum, Ort) │ │ │ │ 👤 Person Knowledge Panel │ │ │ │ 🏢 Organization Knowledge Panel │ │ │ │ 🍳 Recipe Cards (Kochzeit, Kalorien) │ │ │ │ 💼 Job Postings (Gehalt, Standort) │ │ │ │ 🔍 Sitelinks Searchbox │ │ │ └─────────────────────────────────────────────────────┘ │ │ │ │ Implementation: │ │ ┌─────────────────────────────────────────────────────┐ │ │ │ │ │ │ └─────────────────────────────────────────────────────┘ │ │ │ └─────────────────────────────────────────────────────────────┘ ``` --- ## TypeScript JSON-LD Library ```typescript // lib/jsonld/types.ts - Type Definitions export interface Thing { '@context': 'https://schema.org'; '@type': string; name?: string; description?: string; url?: string; image?: string | ImageObject; } export interface ImageObject { '@type': 'ImageObject'; url: string; width?: number; height?: number; caption?: string; } export interface Person { '@type': 'Person'; name: string; url?: string; image?: string; jobTitle?: string; worksFor?: Organization; sameAs?: string[]; } export interface Organization { '@type': 'Organization' | 'LocalBusiness' | 'Corporation'; name: string; url?: string; logo?: string | ImageObject; sameAs?: string[]; contactPoint?: ContactPoint[]; address?: PostalAddress; } export interface ContactPoint { '@type': 'ContactPoint'; telephone: string; contactType: string; availableLanguage?: string[]; } export interface PostalAddress { '@type': 'PostalAddress'; streetAddress?: string; addressLocality?: string; addressRegion?: string; postalCode?: string; addressCountry?: string; } export interface Article { '@context': 'https://schema.org'; '@type': 'Article' | 'BlogPosting' | 'NewsArticle' | 'TechArticle'; headline: string; description?: string; image?: string | string[]; datePublished: string; dateModified?: string; author: Person | Person[]; publisher: Organization; mainEntityOfPage?: WebPage; articleBody?: string; wordCount?: number; keywords?: string[]; } export interface WebPage { '@type': 'WebPage'; '@id': string; } export interface Product { '@context': 'https://schema.org'; '@type': 'Product'; name: string; description?: string; image?: string | string[]; brand?: Brand; offers?: Offer | Offer[]; aggregateRating?: AggregateRating; review?: Review[]; sku?: string; gtin13?: string; } export interface Brand { '@type': 'Brand'; name: string; } export interface Offer { '@type': 'Offer'; price: number; priceCurrency: string; availability: 'https://schema.org/InStock' | 'https://schema.org/OutOfStock' | 'https://schema.org/PreOrder'; url?: string; priceValidUntil?: string; seller?: Organization; } export interface AggregateRating { '@type': 'AggregateRating'; ratingValue: number; reviewCount: number; bestRating?: number; worstRating?: number; } export interface Review { '@type': 'Review'; author: Person; datePublished: string; reviewBody?: string; reviewRating: Rating; } export interface Rating { '@type': 'Rating'; ratingValue: number; bestRating?: number; worstRating?: number; } export interface FAQPage { '@context': 'https://schema.org'; '@type': 'FAQPage'; mainEntity: Question[]; } export interface Question { '@type': 'Question'; name: string; acceptedAnswer: Answer; } export interface Answer { '@type': 'Answer'; text: string; } export interface BreadcrumbList { '@context': 'https://schema.org'; '@type': 'BreadcrumbList'; itemListElement: ListItem[]; } export interface ListItem { '@type': 'ListItem'; position: number; name: string; item?: string; } export interface HowTo { '@context': 'https://schema.org'; '@type': 'HowTo'; name: string; description?: string; image?: string; totalTime?: string; // ISO 8601 duration estimatedCost?: MonetaryAmount; supply?: HowToSupply[]; tool?: HowToTool[]; step: HowToStep[]; } export interface HowToStep { '@type': 'HowToStep'; name: string; text: string; image?: string; url?: string; } export interface HowToSupply { '@type': 'HowToSupply'; name: string; } export interface HowToTool { '@type': 'HowToTool'; name: string; } export interface MonetaryAmount { '@type': 'MonetaryAmount'; currency: string; value: number; } export interface Event { '@context': 'https://schema.org'; '@type': 'Event' | 'BusinessEvent' | 'MusicEvent' | 'SportsEvent'; name: string; description?: string; startDate: string; endDate?: string; location: Place | VirtualLocation; organizer?: Organization | Person; performer?: Person | Organization; offers?: Offer[]; eventStatus?: 'https://schema.org/EventScheduled' | 'https://schema.org/EventCancelled' | 'https://schema.org/EventPostponed'; eventAttendanceMode?: 'https://schema.org/OnlineEventAttendanceMode' | 'https://schema.org/OfflineEventAttendanceMode' | 'https://schema.org/MixedEventAttendanceMode'; } export interface Place { '@type': 'Place'; name: string; address: PostalAddress; } export interface VirtualLocation { '@type': 'VirtualLocation'; url: string; } ``` --- ## JSON-LD Components ```tsx // components/jsonld/JsonLd.tsx - Base Component import Script from 'next/script'; interface JsonLdProps { data: T; id?: string; } export function JsonLd({ data, id }: JsonLdProps) { return (