mcpField
S
structured-data

structured-data

github.com/cognyaiマーケティング・グロース11149 回インストール2 週間前に更新
リポジトリ

structured-data について

開発者やサイト運営者向けのSchema.org構造化データ参照スキルです。一般的な型のJSON-LD例、リッチリザルトの案内、検証方法を提供します。

主な機能

  1. 01一般的なSchema型のJSON-LD例
  2. 02リッチリザルトの適格性ガイド
  3. 03検証ツールとエラーの修正案
  4. 04各種ウェブ環境向けの実装パターン

活用シーン

  1. 01ページに適したSchema型の選定
  2. 02商品や記事のJSON-LD作成
  3. 03構造化データのエラー確認

インストール

コマンドをコピーしてターミナルで実行します。

$npx skills add https://github.com/cognyai/claude-code-marketing-skills --skill structured-data

インストール後、Claude Code で/structured-dataを入力して読み込まれたか確認します。

詳細

Schema.org 構造化データリファレンス

Schema.org の構造化データマークアップに関する完全なリファレンスです。JSON-LD の例、リッチリザルトの対象条件、テストツール、検証、静的サイト、Next.js、React、WordPress 向けの実装パターンを紹介します。

ドキュメント全文:https://cogny.com/docs/structured-data-reference

使用方法

/structured-data                          # Full reference overview
/structured-data Product                  # Show Product schema example
/structured-data FAQPage                  # Show FAQPage example
/structured-data LocalBusiness            # Show LocalBusiness example
/structured-data validate                 # Testing and validation guide
/structured-data best-practices           # Schema best practices
/structured-data rich-results             # Rich results eligibility table

手順

あなたは Schema.org 構造化データのエキスパートです。このリファレンスを活用して、ユーザーが正しい JSON-LD マークアップを作成し、ページに適したスキーマタイプを選択し、構造化データを検証して、さまざまなプラットフォームに実装できるよう支援してください。

ユーザーから質問されたら、以下から関連するセクションを探し、そのまま使える JSON-LD の例を添えて、正確で実行可能な回答を提供してください。

ユーザーが特定のスキーマタイプやトピックを指定した場合は、その内容に焦点を当ててください。指定がない場合は、概要を説明し、必要なスキーマタイプを判断できるよう支援してください。

Search Console MCP ツールが利用できる場合は、次の用途に使用してください。

  • tool_get_search_analytics(検索での見え方でフィルタリング)を使って、どのページにリッチリザルトが表示されるか確認する
  • tool_inspect_urlを使って、特定の URL の構造化データに関する問題を調査する
  • tool_list_propertiesを使って、監査対象のサイトを特定するためにプロパティを一覧表示する

構造化データの役割

構造化データは、ページのコンテンツの意味を検索エンジン、音声アシスタント、AI システムに正確に伝える、機械可読なマークアップです。Schema.org の語彙を使って、内容を明示的に宣言します。

メリット:

  • リッチリザルト — Google 検索で星評価、価格、FAQ のアコーディオン、ハウツーの手順、イベント情報を表示できます
  • ナレッジパネル — 組織、人物、製品のブランドパネルを表示できます
  • 音声検索 — Google Assistant などの音声インターフェースで直接回答できます
  • AI による引用 — LLM や AI 検索エンジン(Google AI Overviews、Bing Copilot、Perplexity)が構造化データを使って情報を提示し、出典を示します

フォーマット

フォーマットは 3 種類あります。Google は JSON-LD を明示的に推奨しています。

JSON-LD(推奨)
<script type="application/ld+json">
{
  "@context": "https://schema.org",
  "@type": "Organization",
  "name": "Example Corp"
}
</script>

JSON-LD を推奨する理由: HTML から独立しており、JS フレームワークで挿入でき、検証しやすく、レイアウトに影響しません。

Microdata

HTML のインライン属性(itemscope、itemtype、itemprop)を使います。<script> タグを追加できないレガシーシステムでのみ使用してください。

RDFa

インライン属性(vocab、typeof、property)を使います。ウェブ上ではあまり使われず、XML/SVG のコンテキストでより一般的です。

結論: 新しい実装にはすべて JSON-LD を使用してください。

JSON-LD の例を含むスキーマタイプ

Organization
{
  "@context": "https://schema.org",
  "@type": "Organization",
  "name": "Cogny AI",
  "url": "https://cogny.com",
  "logo": "https://cogny.com/images/logo.png",
  "sameAs": [
    "https://twitter.com/cognyai",
    "https://linkedin.com/company/cogny",
    "https://github.com/cognyai"
  ],
  "contactPoint": {
    "@type": "ContactPoint",
    "telephone": "+46-8-123-4567",
    "contactType": "customer service",
    "availableLanguage": ["English", "Swedish"]
  },
  "foundingDate": "2023",
  "numberOfEmployees": {
    "@type": "QuantitativeValue",
    "value": 15
  }
}

必須: name | 推奨: url、logo、sameAs、contactPoint リッチリザルト: ナレッジパネル

LocalBusiness
{
  "@context": "https://schema.org",
  "@type": "LocalBusiness",
  "name": "Nordic Coffee Roasters",
  "image": "https://example.com/photos/storefront.jpg",
  "url": "https://nordiccoffee.se",
  "telephone": "+46-8-765-4321",
  "priceRange": "$$",
  "address": {
    "@type": "PostalAddress",
    "streetAddress": "Drottninggatan 45",
    "addressLocality": "Stockholm",
    "addressRegion": "Stockholm",
    "postalCode": "111 21",
    "addressCountry": "SE"
  },
  "geo": {
    "@type": "GeoCoordinates",
    "latitude": 59.3293,
    "longitude": 18.0686
  },
  "openingHoursSpecification": [
    {
      "@type": "OpeningHoursSpecification",
      "dayOfWeek": ["Monday", "Tuesday", "Wednesday", "Thursday", "Friday"],
      "opens": "07:00",
      "closes": "18:00"
    },
    {
      "@type": "OpeningHoursSpecification",
      "dayOfWeek": ["Saturday", "Sunday"],
      "opens": "09:00",
      "closes": "16:00"
    }
  ]
}

必須: name、address | 推奨: geo、openingHoursSpecification、telephone、priceRange、image リッチリザルト: ローカルパック、地図/営業時間/電話番号付きのナレッジパネル

Product
{
  "@context": "https://schema.org",
  "@type": "Product",
  "name": "Wireless Noise-Cancelling Headphones",
  "image": [
    "https://example.com/photos/headphones-front.jpg",
    "https://example.com/photos/headphones-side.jpg"
  ],
  "description": "Premium wireless headphones with active noise cancellation, 30-hour battery life, and multipoint Bluetooth connectivity.",
  "sku": "WH-1000XM5",
  "brand": {
    "@type": "Brand",
    "name": "AudioTech"
  },
  "offers": {
    "@type": "Offer",
    "url": "https://example.com/headphones-wh1000xm5",
    "priceCurrency": "USD",
    "price": "349.99",
    "priceValidUntil": "2025-12-31",
    "availability": "https://schema.org/InStock",
    "itemCondition": "https://schema.org/NewCondition",
    "seller": {
      "@type": "Organization",
      "name": "AudioTech Store"
    }
  },
  "aggregateRating": {
    "@type": "AggregateRating",
    "ratingValue": "4.7",
    "bestRating": "5",
    "reviewCount": "2847"
  }
}

リッチリザルトに必須: name、image、offers(price、priceCurrency、availabilityを含む) 推奨: sku、brand、aggregateRating、description リッチリザルト: 価格、在庫状況、星評価を含む商品スニペット

FAQPage
{
  "@context": "https://schema.org",
  "@type": "FAQPage",
  "mainEntity": [
    {
      "@type": "Question",
      "name": "What is structured data?",
      "acceptedAnswer": {
        "@type": "Answer",
        "text": "Structured data is machine-readable markup added to HTML pages that helps search engines understand your content. It uses the Schema.org vocabulary and is typically implemented in JSON-LD format."
      }
    },
    {
      "@type": "Question",
      "name": "Does structured data improve SEO rankings?",
      "acceptedAnswer": {
        "@type": "Answer",
        "text": "Structured data does not directly affect rankings. However, it enables rich results that significantly improve click-through rates, which can indirectly improve performance through higher engagement signals."
      }
    }
  ]
}

必須: acceptedAnswerを含むQuestion項目を格納したmainEntity配列 リッチリザルト: 展開可能な FAQ アコーディオン(最大 10 問)

HowTo
{
  "@context": "https://schema.org",
  "@type": "HowTo",
  "name": "How to Implement JSON-LD Structured Data",
  "description": "A step-by-step guide to adding Schema.org JSON-LD structured data to your website.",
  "totalTime": "PT15M",
  "estimatedCost": {
    "@type": "MonetaryAmount",
    "currency": "USD",
    "value": "0"
  },
  "tool": [
    { "@type": "HowToTool", "name": "Text editor or CMS" },
    { "@type": "HowToTool", "name": "Google Rich Results Test" }
  ],
  "step": [
    {
      "@type": "HowToStep",
      "name": "Choose your schema type",
      "text": "Identify the primary content type of your page and look up the required properties at schema.org.",
      "url": "https://example.com/guide#step1",
      "image": "https://example.com/images/step1.png"
    },
    {
      "@type": "HowToStep",
      "name": "Write the JSON-LD block",
      "text": "Create a JSON-LD script block with @context, @type, and all required properties.",
      "url": "https://example.com/guide#step2",
      "image": "https://example.com/images/step2.png"
    },
    {
      "@type": "HowToStep",
      "name": "Insert into your page",
      "text": "Place the script tag in the head or body of your HTML document.",
      "url": "https://example.com/guide#step3",
      "image": "https://example.com/images/step3.png"
    },
    {
      "@type": "HowToStep",
      "name": "Validate with testing tools",
      "text": "Run your page through the Google Rich Results Test and Schema Markup Validator.",
      "url": "https://example.com/guide#step4",
      "image": "https://example.com/images/step4.png"
    }
  ]
}

必須: name、各項目にtextを含むstep | 推奨: 各手順のimage、totalTime、tool リッチリザルト: 画像付きの番号順の手順説明

Article / BlogPosting
{
  "@context": "https://schema.org",
  "@type": "BlogPosting",
  "headline": "Complete Guide to Schema.org Structured Data",
  "description": "Learn how to implement structured data markup to earn rich results in Google Search.",
  "image": [
    "https://example.com/images/guide-16x9.jpg",
    "https://example.com/images/guide-4x3.jpg",
    "https://example.com/images/guide-1x1.jpg"
  ],
  "author": {
    "@type": "Person",
    "name": "Anna Lindqvist",
    "url": "https://example.com/authors/anna-lindqvist"
  },
  "publisher": {
    "@type": "Organization",
    "name": "Example Publishing",
    "logo": { "@type": "ImageObject", "url": "https://example.com/logo.png" }
  },
  "datePublished": "2025-01-15",
  "dateModified": "2025-02-10",
  "mainEntityOfPage": {
    "@type": "WebPage",
    "@id": "https://example.com/guides/structured-data"
  }
}

ニュースにはArticle、ブログにはBlogPosting、Google ニュースのパブリッシャーにはNewsArticleを使用します。

必須: headline、image、datePublished、author リッチリザルト: 記事カルーセル、トップニュース(NewsArticle)、検索結果に表示される著者/日付

BreadcrumbList
{
  "@context": "https://schema.org",
  "@type": "BreadcrumbList",
  "itemListElement": [
    { "@type": "ListItem", "position": 1, "name": "Home", "item": "https://example.com/" },
    { "@type": "ListItem", "position": 2, "name": "Docs", "item": "https://example.com/docs" },
    { "@type": "ListItem", "position": 3, "name": "Structured Data", "item": "https://example.com/docs/structured-data" }
  ]
}

必須: position、name、itemを含むitemListElement リッチリザルト: 検索結果で URL の代わりにパンくずリストを表示

Review / AggregateRating
{
  "@context": "https://schema.org",
  "@type": "Product",
  "name": "Cloud Analytics Platform",
  "review": [
    {
      "@type": "Review",
      "reviewRating": { "@type": "Rating", "ratingValue": "5", "bestRating": "5" },
      "author": { "@type": "Person", "name": "Erik Johansson" },
      "reviewBody": "Transformed our data pipeline. The BigQuery integration is seamless.",
      "datePublished": "2025-01-20"
    }
  ],
  "aggregateRating": {
    "@type": "AggregateRating",
    "ratingValue": "4.8",
    "bestRating": "5",
    "ratingCount": "312",
    "reviewCount": "189"
  }
}

レビューは、レビュー対象のアイテムの中にネストする必要があります。コンテキストのない単独の Review マークアップでは、リッチリザルトは生成されません。

必須: ratingValue、bestRating、author(Review);ratingValue、ratingCount(AggregateRating) リッチリザルト: 星評価スニペット

Event
{
  "@context": "https://schema.org",
  "@type": "Event",
  "name": "Nordic Growth Marketing Summit 2025",
  "description": "Two-day conference on performance marketing and AI-driven analytics.",
  "startDate": "2025-09-15T09:00:00+02:00",
  "endDate": "2025-09-16T17:00:00+02:00",
  "eventStatus": "https://schema.org/EventScheduled",
  "eventAttendanceMode": "https://schema.org/OfflineEventAttendanceMode",
  "location": {
    "@type": "Place",
    "name": "Stockholm Waterfront Congress Centre",
    "address": {
      "@type": "PostalAddress",
      "streetAddress": "Nils Ericsons Plan 4",
      "addressLocality": "Stockholm",
      "postalCode": "111 64",
      "addressCountry": "SE"
    }
  },
  "performer": { "@type": "Organization", "name": "Cogny AI" },
  "offers": {
    "@type": "Offer",
    "url": "https://example.com/tickets",
    "price": "4999",
    "priceCurrency": "SEK",
    "availability": "https://schema.org/InStock",
    "validFrom": "2025-03-01T00:00:00+01:00"
  },
  "organizer": { "@type": "Organization", "name": "Growth Hackers Stockholm", "url": "https://growthhackers.se" },
  "image": "https://example.com/images/summit-2025.jpg"
}

必須: name、startDate、location | 推奨: endDate、offers、performer、eventStatus、image リッチリザルト: 日付、場所、チケット情報を含むイベント掲載;SERP のイベントパック

VideoObject
{
  "@context": "https://schema.org",
  "@type": "VideoObject",
  "name": "How to Set Up GA4 BigQuery Export",
  "description": "Step-by-step tutorial for connecting GA4 to BigQuery.",
  "thumbnailUrl": "https://example.com/thumbnails/ga4-setup.jpg",
  "uploadDate": "2025-01-10",
  "duration": "PT12M30S",
  "contentUrl": "https://example.com/videos/ga4-setup.mp4",
  "embedUrl": "https://youtube.com/embed/abc123",
  "interactionStatistic": {
    "@type": "InteractionCounter",
    "interactionType": { "@type": "WatchAction" },
    "userInteractionCount": 15420
  }
}

必須: name、thumbnailUrl、uploadDate | 推奨: description、duration、contentUrl または embedUrl リッチリザルト: 動画カルーセル、検索結果の動画サムネイル

SoftwareApplication
{
  "@context": "https://schema.org",
  "@type": "SoftwareApplication",
  "name": "Cogny Analytics Platform",
  "operatingSystem": "Web",
  "applicationCategory": "BusinessApplication",
  "description": "AI-powered analytics platform for automated growth insights.",
  "offers": { "@type": "Offer", "price": "99", "priceCurrency": "USD" },
  "aggregateRating": { "@type": "AggregateRating", "ratingValue": "4.8", "ratingCount": "156" },
  "screenshot": "https://example.com/images/dashboard.png"
}

必須: name、offers(price、priceCurrency を含む) | 推奨: operatingSystem、applicationCategory、aggregateRating リッチリザルト: 評価と価格を含むソフトウェアスニペット

Course
{
  "@context": "https://schema.org",
  "@type": "Course",
  "name": "Advanced BigQuery for Marketing Analytics",
  "description": "Learn to write efficient BigQuery SQL for GA4 data, build attribution models, and create automated reporting.",
  "provider": { "@type": "Organization", "name": "Cogny Academy", "sameAs": "https://cogny.com/academy" },
  "courseCode": "BQ-301",
  "hasCourseInstance": {
    "@type": "CourseInstance",
    "courseMode": "online",
    "courseSchedule": {
      "@type": "Schedule",
      "repeatFrequency": "P1W",
      "startDate": "2025-03-01",
      "endDate": "2025-04-15"
    }
  },
  "offers": { "@type": "Offer", "price": "499", "priceCurrency": "USD", "category": "Paid" }
}

必須: name、description、provider | 推奨: offers、hasCourseInstance リッチリザルト: 提供者と登録情報を含むコース掲載

JobPosting
{
  "@context": "https://schema.org",
  "@type": "JobPosting",
  "title": "Senior Growth Engineer",
  "description": "Build and optimize marketing analytics infrastructure including BigQuery pipelines, A/B testing, and automated reporting.",
  "datePosted": "2025-02-01",
  "validThrough": "2025-04-01T23:59:59+01:00",
  "employmentType": "FULL_TIME",
  "hiringOrganization": {
    "@type": "Organization",
    "name": "Cogny AI",
    "sameAs": "https://cogny.com",
    "logo": "https://cogny.com/images/logo.png"
  },
  "jobLocation": {
    "@type": "Place",
    "address": {
      "@type": "PostalAddress",
      "addressLocality": "Stockholm",
      "addressRegion": "Stockholm",
      "addressCountry": "SE"
    }
  },
  "jobLocationType": "TELECOMMUTE",
  "baseSalary": {
    "@type": "MonetaryAmount",
    "currency": "SEK",
    "value": { "@type": "QuantitativeValue", "minValue": 55000, "maxValue": 75000, "unitText": "MONTH" }
  },
  "applicantLocationRequirements": { "@type": "Country", "name": "Sweden" }
}

必須: title、description、datePosted、hiringOrganization、jobLocation 推奨: validThrough、employmentType、baseSalary、jobLocationType リッチリザルト: 給与、勤務地、応募ボタンを含む Google 求人掲載

テストと検証

Google リッチリザルト テスト

URL: https://search.google.com/test/rich-results

個別のページまたはコードスニペットをテストし、リッチリザルトの対象となるか確認できます。検出されたタイプ、検証エラー、警告が表示されます。

Schema Markup Validator

URL: https://validator.schema.org

Schema.org の完全な仕様に照らして検証し、リッチリザルト テストでは見逃される可能性がある構造上のエラーを検出します。

Google Search Console のリッチリザルト レポート

場所: Search Console > 拡張 > [specific rich result type]

サイト全体のデータ(有効なページ、エラー数、具体的なエラーの種類)を集計します。毎日更新されます。

よくある検証エラー
エラー原因修正方法
Missing field "image"Product/Article に画像がありません有効でクロール可能な URL を指定して image を追加します
Invalid URL in field "url"相対 URL です完全修飾 URL(https://...)を使用します
Missing field "author"Article/Review に著者がありませんname を含む Person または Organization として author を追加します
Invalid value in field "price"価格に通貨記号が含まれています数値のみを使用します("$349.99" ではなく "349.99")
Invalid enum for "availability"URL ではなくプレーンテキストが指定されています"In Stock" ではなく、https://schema.org/InStock を使用します
Array expected, single value配列ではなく単一の画像が指定されています配列で囲みます:"image": ["https://..."]
datePublished is in the future公開日が未来に設定されています実際の公開日に設定します

ベストプラクティス

1 ページにつき主要なスキーマタイプは 1 つ

ページの目的に合わせて主要なスキーマタイプを選びます。商品ページには Product、ブログ記事には BlogPosting、FAQ ページには FAQPage を使用します。補完的なタイプとして BreadcrumbList を組み合わせます。

ネストと @graph

親子関係がある場合(Product > Offer)はネストします。同じページに独立したエンティティがある場合は @graph を使用します。

{
  "@context": "https://schema.org",
  "@graph": [
    { "@type": "BreadcrumbList", "itemListElement": [...] },
    { "@type": "Product", "name": "Widget", "offers": {...} }
  ]
}
必須プロパティと推奨プロパティ

リッチリザルトを表示するには、必須プロパティを指定する必要があります。推奨プロパティは品質と見た目を向上させます。常に両方を含めてください。

スパムのようなマークアップを避ける
  • レビューや評価を捏造しないでください
  • スキーマプロパティは、ページに表示されるコンテンツと一致させてください
  • 非表示のコンテンツにスキーマを追加しないでください
  • スキーマタイプとページの目的を一致させてください
  • 信頼できる第三者のデータを伴わない自己宣伝的なレビューは、手動による対策の対象となります

構造化データのスパムに対する Google の手動による対策が適用されると、ドメイン全体からすべてのリッチリザルトが削除される可能性があります。

スキーマの同期を保つ

ページコンテンツと同じデータソースから構造化データを生成します。CMS の公開ワークフローにスキーマの更新を含めます。四半期ごと、またはサイトに大規模な変更を加えた後に監査します。

リッチリザルトの適格性

スキーマの種類リッチリザルト検索結果での表示
Product商品スニペット価格、在庫状況、星評価
FAQPageFAQ アコーディオン検索結果内で展開できる Q&A
HowTo手順ガイド画像付きの番号付き手順
Article / BlogPosting記事の検索結果著者、日付、サムネイル
NewsArticleトップニュース検索結果上部のカルーセル
BreadcrumbListパンくずリストURL をナビゲーションパスに置き換え
Review / AggregateRatingレビュースニペットリスティングの下に星評価
Eventイベントのリスティング日付、場所、チケット
VideoObject動画の検索結果サムネイル、再生時間
LocalBusinessローカルパック地図、営業時間、電話番号
JobPostingGoogle Jobs給与、勤務地、応募
SoftwareApplicationソフトウェアの検索結果評価、価格
Courseコースのリスティング提供元、登録
Organizationナレッジパネルロゴ、ソーシャルリンク

実装パターン

静的 HTML
<head>
  <script type="application/ld+json">
  { "@context": "https://schema.org", "@type": "Product", ... }
  </script>
</head>
Next.js(App Router)
export default function ProductPage({ product }) {
  const jsonLd = {
    "@context": "https://schema.org",
    "@type": "Product",
    name: product.name,
    image: product.images,
    offers: {
      "@type": "Offer",
      price: product.price,
      priceCurrency: product.currency,
      availability: product.inStock
        ? "https://schema.org/InStock"
        : "https://schema.org/OutOfStock",
    },
  };
  return (
    <>
      <script
        type="application/ld+json"
        dangerouslySetInnerHTML={{ __html: JSON.stringify(jsonLd) }}
      />
      {/* content */}
    </>
  );
}
WordPress

Yoast SEO、Rank Math、または Schema Pro のプラグインを使用します。カスタム実装の場合:

add_action('wp_head', function() {
    if (is_singular('product')) {
        $product = get_post();
        $price = get_post_meta($product->ID, '_price', true);
        $schema = [
            '@context' => 'https://schema.org',
            '@type' => 'Product',
            'name' => $product->post_title,
            'offers' => [
                '@type' => 'Offer',
                'price' => $price,
                'priceCurrency' => 'USD',
                'availability' => 'https://schema.org/InStock',
            ],
        ];
        echo '<script type="application/ld+json">' . json_encode($schema) . '</script>';
    }
});
動的 CMS パターン
function generateProductSchema(cmsData: CMSProduct): object {
  return {
    "@context": "https://schema.org",
    "@type": "Product",
    name: cmsData.title,
    image: cmsData.media.map(m => m.url),
    offers: {
      "@type": "Offer",
      price: cmsData.variants[0].price.toString(),
      priceCurrency: cmsData.currency,
      availability: cmsData.inStock
        ? "https://schema.org/InStock"
        : "https://schema.org/OutOfStock",
    },
  };
}

重要な原則:ページにデータを反映するのと同じデータソースから構造化データを生成し、別途ハードコードしないでください。

リソース

コメント