結果スニペットのカスタマイズ
コレクションでコンテンツを整理
必要に応じて、コンテンツの保存と分類を行います。
このページでは、独自のウェブサイト用に結果スニペットをカスタマイズする方法について説明します。カスタマイズしたスニペットを表示するには、ウェブページに構造化データを追加する必要があります。
- 概要
- プログラム可能な検索要素を使用してリッチ スニペットを作成する
- その他の機能の確認
概要
プログラム可能検索エンジンでは、スニペット(スニペット)を表示して、ユーザーが適切なページを見つけやすくします。スニペットとは、検索ユーザーにウェブページの内容を把握するための小さなコンテンツ サンプルです。スニペットについて詳しくは、検索結果の構成に関するウェブマスター セントラルのブログ投稿をご覧ください。プログラム可能検索エンジンのアルゴリズムによって作成された標準スニペットが気に入らない場合は、独自のスニペットを作成することもできます。画像のサムネイル、概要、日付、著者情報、評価、価格などの重要な情報をスニペットに直接表示できます。最も関連性の高い情報が検索結果に表示されれば、サイト内のウェブページがユーザーにとってより魅力的になります。
次の図は、検索結果のスニペットをカスタマイズするさまざまな方法を示しています。
図 1: 評価、価格帯、クチコミを含む検索結果のスニペット。

図 2: 形式、リンク、画像、比較情報を含む検索結果のスニペット

図 3: ドキュメント タイプ、作成者、ページビュー、コメントを含む検索結果のスニペット

図 4: マルチメディア アクセスとボタンを提供するリッチ形式の検索結果のスニペット([カートに追加])。

トップへ戻る
プログラム可能な検索要素を使用してリッチ スニペットを作成する
基本的に、リッチ スニペットの作成手順は次のとおりです。
- ウェブページで構造化データを使用します。
プログラム可能検索エンジンでウェブページのインデックス登録を行う際、メタデータを認識して保持します。
- プログラム可能検索エンジンの検索結果からその構造化データを取得します。
プログラム可能検索エンジンのサーバーは、JSON 形式の構造化データとともに検索結果を返すことができます。
- プレゼンテーション レイヤを作成して、構造化データをフォーマットされた HTML に変換します。
プレゼンテーション レイヤは、元データをユーザーに表示される形式に変換するコードセット(JavaScript、PHP、JSP、ASP など)です。プログラム可能検索エンジンの場合、次のことが可能です。
-
プログラム可能な検索要素を使用して、ユーザーに表示するために JSON 出力を変換します。
- 検索要素のコールバックを使用して JSON データを HTML に変換し、エンドユーザーに表示する独自のカスタム プレゼンテーション レイヤを作成します。
構造化データの抽出については、構造化データに関するページで詳しく説明しています。プログラム可能な検索要素を使用したプレゼンテーション レイヤの作成については、
プログラム可能検索要素に関するページをご覧ください。
トップへ戻る
その他の機能
カスタム スニペットは、プログラム可能検索エンジンの次のような機能と併用できます。
特に記載のない限り、このページのコンテンツはクリエイティブ・コモンズの表示 4.0 ライセンスにより使用許諾されます。コードサンプルは Apache 2.0 ライセンスにより使用許諾されます。詳しくは、Google Developers サイトのポリシーをご覧ください。Java は Oracle および関連会社の登録商標です。
最終更新日 2025-07-25 UTC。
[null,null,["最終更新日 2025-07-25 UTC。"],[[["\u003cp\u003eProgrammable Search Engine allows you to customize result snippets to showcase key information like images, summaries, and ratings, making your site's search results more compelling.\u003c/p\u003e\n"],["\u003cp\u003eTo create custom snippets, you need to add structured data to your webpages, which Programmable Search Engine uses to generate rich snippets.\u003c/p\u003e\n"],["\u003cp\u003eThe Programmable Search Element can be utilized to easily transform the structured data into formatted HTML for display in search results.\u003c/p\u003e\n"],["\u003cp\u003eYou can further enhance your search results by exploring features like Drilling Deeper into Search Results and Providing Structured Data.\u003c/p\u003e\n"]]],[],null,["# Customizing Results Snippets\n\nThis page describes how to customize the result snippets for your own website. To render your customized snippets, you must add structured data to your webpages.\n\n1. [Overview](#overview)\n2. [Creating Rich Snippets with the Programmable Search Element](#creating_snippets)\n3. [Exploring Other Features](#next)\n\nOverview\n--------\n\nProgrammable Search Engine helps users find the right page by showing them a snippet---a small sample of content that gives search users an idea of what's in the webpage. To learn more about snippets, see the Webmaster Central [blog post](http://googlewebmastercentral.blogspot.com/2007/11/anatomy-of-search-result.html) on the anatomy of a search result. If you do not like the standard snippets created by the Programmable Search Engine algorithm, you can create your own snippets. You can showcase key information---such as image thumbnails, summaries, dates, authorship, ratings, and prices---directly in your snippets. Having the most relevant information in your search results makes the webpages in your site more compelling to your users.\n\nThe following figures demonstrate various ways you can customize the snippets in your search results.\n\n**Figure 1:** Result snippet with rating, price range, and review.\n\n**Figure 2:** Result snippet with formatting, links, image, and comparative information.\n\n**Figure 3:** Result snippet that includes document types, authors, page views, and comments.\n\n**Figure 4:** Richly formatted result snippet that provides multimedia access and buttons (\"ADD TO CART\").\n\n[Back to top](#top)\n\nCreating Rich Snippets with the Programmable Search Element\n-----------------------------------------------------------\n\nEssentially, creating rich snippets involves the following steps:\n\n1. Provide [structured data](/custom-search/docs/structured_data) in your webpages.\n\n When Programmable Search Engine is indexing your webpages, it recognizes and preserves\n the metadata.\n2. Fetch that structured data in the search results for your Programmable Search Engine. The Programmable Search Engine server can return the search results, along with the\n structured data in JSON format.\n\n3. Create a presentation layer to transform the structured data into formatted HTML. A presentation layer is a set of code (such as JavaScript, PHP,\n JSP and ASP) that transforms the raw data into a format that is displayed\n to the user. In the case of Programmable Search Engine, you can:\n\n - Use the [Programmable Search Element](/custom-search/docs/element) to transform JSON output for presentation to the user.\n - Write your own custom presentation layer that transforms JSON data to HTML that is presented to the end user using Search Element [Callbacks](/custom-search/docs/element#search-time-callbacks)\n\n\nStructured data extraction is documented in more detail in the\n[Structured Data](/custom-search/docs/structured_data) page, and creating a presentation\nlayer with the Programmable Search Element is documented in more detail at the\n[Programmable Search Element](https://developers.google.com/custom-search/docs/element) page.\n\n[Back to top](#top)\n\nExploring Other Features\n------------------------\n\n\nCustom Snippets works well with several other Programmable Search Engine features:\n\n- If you want to learn more about changing the order of your results, see [Drilling Deeper into Search Results](/custom-search/docs/structured_search).\n- If you want to learn more about what structured data Google supports, see [Providing Structured Data](/custom-search/docs/structured_data).\n- If you want to learn more about the Programmable Search Element, see [Programmable Search Element documentation](https://developers.google.com/custom-search/docs/element)."]]