コンテンツの ID、URL、名前を収集する
コレクションでコンテンツを整理
必要に応じて、コンテンツの保存と分類を行います。
カタログ内のすべてのエンティティには、以下のプロパティが必要です。
@id
: コンテンツのグローバル 識別子。
url
: コンテンツの正規 URL。
name
: コンテンツの名前。
@id
、url
、name
の例:
"@id": "http://www.example.com/episode/video/432432432",
"url": "http://www.example.com/episode/video/432432432",
"name": "My example episode",
識別子
ID(@id
)は次の要件を満たす必要があります。
- カタログ全体でグローバルに一意
- たとえば、
TVSeries
と TVSeason
に同じ @id
を使用しないでください。
- 静的
- Unified Resource Identifier(URI)の形式
- コンテンツのローカル識別子(ID)が URI 形式でない場合は、ID の先頭にドメインを追加してこの要件を満たします。たとえば、コンテンツの ID が 1234abc でドメインが https://example.com の場合、
@id
は https://example.com/1234abc となります。
@id
が有効な URL である必要はなく、単に URI 形式にする必要があります。
@id
で使用するドメイン(たとえば https://example.com)は、自分の組織が所有するドメインでなければなりません。
エンティティの url
は識別子としてのすべての要件(グローバルに一意、静的、URI 形式)を満たしているため、エンティティの url
を @id
として使用することをおすすめします。
正規 URL
正規 URL(url
)は、Google がカタログ内のコンテンツを Google のデータベース内のコンテンツと正確に一致させるのに役立ちます。
「正規 URL とは、サイトにある一連の重複したページの中で、Google が最も代表的と考えるページの URL です。たとえば、同じページに複数の URL がある場合(例: example.com?dress=1234 と example.com/dresses/1234)、Google はそのうちの 1 つを正規 URL として選択します。」(出典: 重複する URL を統合する)
正規 URL の要件は次のとおりです。
url
はグローバルに一意である必要があります。
url
には Google がクロールすることが可能な機能する正規 URL を含める必要があります。
- (リッスン アクションのみ)
url
は、ペイウォールによってブロックされないコンテンツの説明ページを指す必要があります。
ID、URL、および名前の収集
次の手順に従います。
- カタログ内のコンテンツの名前を収集します。
- コンテンツの正規 URL を特定します(コンテンツの
url
を @id
として使用することをおすすめします)。
特に記載のない限り、このページのコンテンツはクリエイティブ・コモンズの表示 4.0 ライセンスにより使用許諾されます。コードサンプルは Apache 2.0 ライセンスにより使用許諾されます。詳しくは、Google Developers サイトのポリシーをご覧ください。Java は Oracle および関連会社の登録商標です。
[null,null,[],[[["\u003cp\u003eAll catalog entities must have an \u003ccode\u003e@id\u003c/code\u003e, \u003ccode\u003eurl\u003c/code\u003e, and \u003ccode\u003ename\u003c/code\u003e property for identification and discoverability.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003e@id\u003c/code\u003e should be a globally unique, static URI, preferably the same as the \u003ccode\u003eurl\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eurl\u003c/code\u003e must be a working canonical URL for Google to crawl and reconcile content effectively, pointing to a public content description page for Listen Actions.\u003c/p\u003e\n"],["\u003cp\u003eYou need to collect and provide the \u003ccode\u003ename\u003c/code\u003e, \u003ccode\u003eurl\u003c/code\u003e (recommended for \u003ccode\u003e@id\u003c/code\u003e), and canonical \u003ccode\u003eurl\u003c/code\u003e for each entity in your catalog.\u003c/p\u003e\n"]]],["Entities require `@id`, `url`, and `name` properties. `@id` must be a globally unique, static URI, which can be a prepended domain to a local ID. `url` must be a globally unique, working canonical URL, crawlable by Google. It's recommended to use the `url` as the `@id` because it satisfies the identifier requirements. The process involves collecting content names and identifying their canonical URLs.\n"],null,["# Collect the ID, URL, and name of your content\n\nAll the entities in your catalog require the following properties:\n\n- `@id`: A global [identifier](#identifier) for the content.\n- `url`: A [canonical URL](#canonical_url) for the content.\n- `name`: The name of the content.\n\nExample of `@id`, `url`, and `name`: \n\n \"@id\": \"http://www.example.com/episode/video/432432432\",\n \"url\": \"http://www.example.com/episode/video/432432432\",\n \"name\": \"My example episode\",\n\nIdentifier\n----------\n\nAn identifier (`@id`) must meet the following requirements:\n\n- Globally unique across your catalog\n - For instance, don't use the same `@id` for a `TVSeries` and a `TVSeason`.\n- Static\n - You cannot change `@id` later.\n- In the form of Unified Resource Identifier (URI)\n - If your content's local identifier (ID) is not in a URI format, prepend your domain to the ID to satisfy this requirement; for example, if your content's ID is *1234abc* and your domain is *https://example.com* , `@id` can be *https://example.com/1234abc.*\n - `@id` does not have to be a working URL; it only needs to be in a URI format.\n - The domain used in `@id` (for example, *https://example.com*) must be owned by your organization.\n\nBecause an entity's `url` meets all the requirements as an identifier (that is, globally unique, static, and in the form of a URI), we recommend you use an entity's `url` as `@id`.\n\nCanonical URL\n-------------\n\nA canonical URL (`url`) helps Google accurately reconcile the content in your catalog with the content in Google's databases.\n\n\"A canonical URL is the URL of the page that Google thinks is most representative from a set of duplicate pages on your site. For example, if you have URLs for the same page (for example: *example.com?dress=1234* and *example.com/dresses/1234* ), Google chooses one as canonical.\" (Source: [Consolidate duplicate URLs](https://support.google.com/webmasters/answer/139066))\n\nThe following are the requirements for the canonical URL:\n\n- `url` must be globally unique.\n- `url` must contain a working canonical URL that Google can crawl.\n- (Listen Actions only) `url` needs to point to a content description page that is not blocked by a paywall.\n\nCollect the ID, URL, and name\n-----------------------------\n\nDo the following:\n\n1. Gather the names of the content in your catalog.\n2. Identify the canonical URLs of the content. (We recommend you use the content's `url` as its `@id`.)"]]