ホテルリスト XML リファレンス

ホテルリストは、料金情報を提供する対象であるすべてのホテルをリストした 1 つ以上の XML ファイルです。ホテルリスト ファイル自体に料金情報は含まれません。

ホテルリストのルート要素は <listings> 要素です。この要素には、宿泊施設を説明する <listing> 要素が含まれます。

初期実装の一環としてホテルリストを作成してから、定期的なメンテナンスの一環としてホテルリストでホテルの追加や削除を行います。

ファイルが構文ガイドラインに準拠していることを確認します。たとえば、UTF-8 エンコードを使用して、XML タグに encoding 属性を含めることで、このエンコード スキーマを指定します。

ホテルリストを作成したら、Hotel Center を使用して手動で Google にアップロードするか、自社のサーバーでホストします。

データの問題を検出して修正する

ホテルリスト内のデータの問題を検出して修正するには、次の記事を参照してください。

リスティングの要件

ホテルリスト内の宿泊施設が Google ホテル広告に表示されるには、宿泊施設が次の条件を満たしている必要があります。

  • 宿泊客が滞在できる有料の客室がある
  • 一般開放されており、物理的な設備と固定の住所がある
  • 壁と水道設備が頑丈に固定されている
  • 最短滞在期間が 7 日以下である

対象外となる宿泊施設の一般的な例としては、クルージング、アパートなどがあります(通常は Listing requirements の条件を満たさないため)。

壁、水道設備、空調設備(薪ストーブやプロパンガスの暖房を含む)が頑丈に固定されているキャンピング キャビンなどのキャンプ場が対象となります。以下の屋外宿泊施設は対象外です。

  • 宿泊客がテントに滞在するキャンプ場
  • 宿泊客が自分の RV 車を利用する RV パーク

<listings>

<listings> はホテルリストのルート要素であり、<language> 要素と少なくとも 1 つの <listing> が含まれます。

<listings> 要素は、ホテルリストの XML 階層内の次の場所にあります。

+ <listings>
    + <language>
    + <datum>
    + <listing>

構文

<listings> 要素の構文は次のとおりです。

<?xml version="1.0" encoding="UTF-8"?>
<listings xmlns:xsi="xsi"
    xsi:noNamespaceSchemaLocation="schema_xsd">
  <language> language_code</language>
  <datum> datum_code </datum>
  <listing> listing</listing>
  ...
</listings>

属性

<listings> 要素には次の属性があります。

属性 必須 説明
xmlns:xsi 必須 http://www.w3.org/2001/XMLSchema-instance に設定します。
xsi:noNamespaceSchemaLocation 必須 http://www.gstatic.com/localfeed/local_feed.xsd に設定します。

子要素

<listings> 要素には次の子要素があります。

子要素 必須 説明
<language> Required string フィードが記述されている言語。この要素の値は、 2 文字の言語コードに設定します。たとえば、英語の場合は en です。
<datum> Optional enum この要素には、フィードで指定された緯度と経度の座標の測地基準または参照モデルを指定します。データム値が指定されていない場合、この要素のデフォルト値は WGS84 です。これは、ほとんどの最新の GPS デバイスで使用されます。東京測地系は、日本の住所にのみ適用されます。

この要素の有効な値は次のとおりです。

  • WGS84
  • wgs84
  • TOKYO
  • tokyo
注: デフォルト値 WGS84 を使用するには、ホテルリストに <datum> 要素を含めないでください。
<listing> Required <listing> フィード内の各ホテルを説明する 1 つ以上のエントリ。リスト内の各ホテルには、サイトに固有の ID が必要です。また、この ID は絶対に再利用しないでください。

構造化された住所

次の例に、構造化された住所が含まれるホテルリストの一部を示します。

<?xml version="1.0" encoding="UTF-8"?>
<listings xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:noNamespaceSchemaLocation="http://www.gstatic.com/localfeed/local_feed.xsd">
  <language>en</language>
  <listing>
    <!-- The value of <id> must be unique to your site for all time. Do NOT reuse IDs. -->
    <id>123abc</id>
    <name>Belgrave House</name>
    <address format="simple">
      <component name="addr1">6 Acacia Ave</component>
      <component name="addr2">Floor 5</component>
      <component name="city">London</component>
      <component name="province">Greater London</component>
      <component name="postal_code">SW1W 9TQ</component>
    </address>
    <country>GB</country>
    <latitude>35.070374</latitude>
    <longitude>-106.213648</longitude>
    <phone type="main">123-456-7890</phone>
    <category>hotel</category> <!-- You can use whatever property type categories you wish -->
  </listing>
  ...
</listings>

自由形式の住所

次の例に、自由形式の住所が含まれるホテルリストの一部を示します。

<?xml version="1.0" encoding="UTF-8"?>
<listings xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:noNamespaceSchemaLocation="http://www.gstatic.com/localfeed/local_feed.xsd">
  <language>en</language>
  <listing>
    <!-- The value of <id> must be unique to your site for all time. Do NOT reuse IDs. -->
    <id>123abc</id>
    <name>Belgrave House</name>
    <address>6 Elm Ave Unit 3, Boston, MA, 02472</address>
    <country>US</country>
    <latitude>35.070374</latitude>
    <longitude>-106.213648</longitude>
    <phone type="main">123-456-7890</phone>
    <category>hotel</category> <!-- You can use whatever property type categories you wish -->
  </listing>
  ...
</listings>

オプションのコンテンツ

次の例に、<content>(省略可)を含むリスティングが含まれるホテルリストの一部を示します。

<?xml version="1.0" encoding="UTF-8"?>
<listings xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:noNamespaceSchemaLocation="http://www.gstatic.com/localfeed/local_feed.xsd">
  <language>en</language>
  <listing>
    <id>123456</id>
    <name>My Apartment</name>
    <address format="simple">
      <component name="addr1">1 Sandstone Building</component>
      <component name="city">Los Angeles</component>
      <component name="postal_code">90210</component>
      <component name="province">CA</component>
    </address>
    <country>US</country>
    <latitude>40.730610</latitude>
    <longitude>-73.935242</longitude>
    <phone type="main">12345678</phone>
    <category>hotel</category> <!-- You can use whatever property type categories you wish -->
    <content>
      <text type="description">
        <link>https://examplelisting.com/listings/12345</link>
        <title>3 bedrooms with ocean views</title>
        <body>Stay in this newly renovated 3BR house with ocean views.</body>
        <date month="7" day="23" year="2023"/>
      </text>
      <review type="editorial">
        <link>https://example.com/reviews/42</link>
        <title>A little piece of heaven</title>
        <author>EXAMPLE.COM</author>
        <rating>8</rating>
        <body>This place is really good.</body>
      </review>
      <review type="user">
        <link>https://exampleperson.org/reviews/82</link>
        <author>Susan von Trapp</author>
        <rating>6</rating>
        <body>Not a bad place, but I prefer to be closer to the beach.</body>
        <date day="6" month="7" year="2023"/>
        <servicedate day="16" month="6" year="2023"/>
      </review>
      <attributes>
        <website>https://hotel.example.com</website>
        <client_attr name="rating">8.2</client_attr>
        <client_attr name="num_reviews">14</client_attr>
      </attributes>
      <image type="photo" url="https://image_url">
        <link>https://image_url</link>
        <title>Main hotel picture</title>
      </image>
    </content>
  </listing>
  ...
</listings>

<listing>

ホテルリスト <listings> 要素内のホテル定義。

<listing> 要素は、ホテルリスト フィードの XML 階層の次の場所にあります。

+ <listings>
    + <language>
    + <listing>

構文

<listing> 要素の構文は次のとおりです。

<?xml version="1.0" encoding="UTF-8"?>
<listings ... >
  <listing>
    <!-- Specify <listing>'s child elements in the order shown below. -->
    <id>hotel_ID</id>
    <name>hotel_name</name>
    <address>
      <component name="addr1">street_address_1</component>
      <component name="addr2">street_address_2</component>
      <component name="city">city_name</component>
      <component name="province">province_name</component>
      <component name="postal_code">postal_code</component>
    </address>
    <!-- You can also define an address freeform, although this is not recommended: -->
    <!-- <address>freeform_address</address> -->

    <country>country_code</country>
    <latitude>hotel_latitude</latitude>
    <longitude>hotel_longitude</longitude>
    <phone type="[fax|main|mobile|tdd|tollfree]">phone_number</phone>
    <category>hotel</category> <!-- You can use whatever property type categories you wish -->
    <content>content</content>
  </listing>
</listings>

属性

<listing> 要素には属性はありません。

子要素

<listing> 要素には次の子要素があります。

子要素 必須 説明
<id> Required string ホテルの一意の ID。

注: この値は、サイトで常に一意である必要があります。宿泊施設の一致の問題を解決する際に問題が発生する可能性があるため、ID を再利用しないでください

<name> Required string ホテルの名前。次に例を示します。
<name>Belgrave House</name>
<address> Required Object or string

ホテルの正式な物理的所在地。

この要素は、simple に設定する必要がある単一の属性 format を使用します。

少なくとも、ホテルの番地、市区町村、都道府県 / 州、郵便番号を指定する必要があります。<component> 子要素を使用して、住所の次の各部分を記述します。

  • addr1: ホテル所在地のメインの番地。
  • addr2: 2 番目の番地(必要な場合)。
  • addr3: 3 番目の番地(必要な場合)。
  • city: ホテル所在地の市区町村の名前。
  • province: ホテル所在地の州、地域、都道府県の名前。
  • postal_code: ホテル所在地の郵便番号。

次に例を示します。

<address format="simple">
  <component name="addr1">6 Acacia Ave</component>
  <component name="addr2">Floor 5</component>
  <component name="city">London</component>
  <component name="province">Greater London</component>
  <component name="postal_code">SW1W 9TQ</component>
</address>

または、「自由形式」の住所を指定することもできますが、おすすめしません。次に例を示します。

<address>6 Elm Ave Unit 3, Boston, MA, 02472</address>

私書箱や郵便物受け取り専用住所は、正式な物理的住所とは見なされません。

<country> Required string このリスティングが存在する国。値は 2 文字の国コードにする必要があります。例: 日本であれば「JP」、米国であれば「US」次に例を示します。
<country>US</country>
<latitude> Required* float ホテル所在地の緯度。次に例を示します。
<latitude>37.423738</latitude>

この値は、Google Maps API などの GeoCoding ツールを使用して生成できます。

<longitude> Required* float ホテル所在地の経度。次に例を示します。
<longitude>-122.090101</longitude>

この値は、Google Maps API などの GeoCoding ツールを使用して生成できます。

<location_precision> Optional integer 宿泊施設の緯度と経度が難読化されている場合に、送信される宿泊施設の位置情報の精度(メートル単位)。ゼロ(0)は難読化が行われておらず、正確な位置情報であることを意味します。注: この要素は民泊にのみ適用されます。
<phone> Required* string

ホテルの 1 つ以上の連絡先電話番号。リスティングが企業の支店の場合は、(本社の電話番号ではない)支店の所在地に固有の電話番号を指定してください。

type 属性は、次のいずれかで指定します。

  • fax: Fax 電話番号。
  • main: メインの代表電話番号。
  • mobile: 携帯電話番号。
  • tdd: 聴覚障がい者用通信機器(TDD)の電話番号。
  • tollfree: フリーダイヤルの電話番号。

次に例を示します。

<!-- Singapore (country code +65) -->
<phone type="main">+65 6722-2323</phone>
<!-- U.S. (country code +1) -->
<phone type="fax">+1 408-555-1111</phone>

少なくとも、main タイプを指定する必要があります。

<category> Optional string ホテルなどの宿泊施設のタイプ。パートナーは、「ビジネス ホテル」、「リゾート」、「モーテル」など、宿泊施設を説明するための任意の内部カテゴリを使用できます。
<content> Optional <content> 宿泊施設の説明、評価、特長など、リスティングに使用されるオプションの詳細情報。

* 電話番号または経緯度のいずれかを必ず指定してください。両方を定義することをおすすめします。

構造化された住所

次の例に、構造化された住所が含まれるホテルリストの一部を示します。

<?xml version="1.0" encoding="UTF-8"?>
<listings xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:noNamespaceSchemaLocation="http://www.gstatic.com/localfeed/local_feed.xsd">
  <language>en</language>
  <listing>
    <!-- The value of <id> must be unique to your site for all time. Do NOT reuse IDs. -->
    <id>123abc</id>
    <name>Belgrave House</name>
    <address format="simple">
      <component name="addr1">6 Acacia Ave</component>
      <component name="addr2">Floor 5</component>
      <component name="city">London</component>
      <component name="province">Greater London</component>
      <component name="postal_code">SW1W 9TQ</component>
    </address>
    <country>GB</country>
    <latitude>35.070374</latitude>
    <longitude>-106.213648</longitude>
    <phone type="main">123-456-7890</phone>
    <category>hotel</category> <!-- You can use whatever property type categories you wish -->
  </listing>
  ...
</listings>

自由形式の住所

次の例に、自由形式の住所が含まれるホテルリストの一部を示します。

<?xml version="1.0" encoding="UTF-8"?>
<listings xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:noNamespaceSchemaLocation="http://www.gstatic.com/localfeed/local_feed.xsd">
  <language>en</language>
  <listing>
    <!-- The value of <id> must be unique to your site for all time. Do NOT reuse IDs. -->
    <id>123abc</id>
    <name>Belgrave House</name>
    <address>6 Elm Ave Unit 3, Boston, MA, 02472</address>
    <country>US</country>
    <latitude>35.070374</latitude>
    <longitude>-106.213648</longitude>
    <phone type="main">123-456-7890</phone>
    <category>hotel</category> <!-- You can use whatever property type categories you wish -->
  </listing>
  ...
</listings>

オプションのコンテンツ

次の例に、<content>(省略可)を含むリスティングが含まれるホテルリストの一部を示します。

<?xml version="1.0" encoding="UTF-8"?>
<listings xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:noNamespaceSchemaLocation="http://www.gstatic.com/localfeed/local_feed.xsd">
  <language>en</language>
  <listing>
    <id>123456</id>
    <name>My Apartment</name>
    <address format="simple">
      <component name="addr1">1 Sandstone Building</component>
      <component name="city">Los Angeles</component>
      <component name="postal_code">90210</component>
      <component name="province">CA</component>
    </address>
    <country>US</country>
    <latitude>40.730610</latitude>
    <longitude>-73.935242</longitude>
    <phone type="main">12345678</phone>
    <category>hotel</category> <!-- You can use whatever property type categories you wish -->
    <content>
      <text type="description">
        <link>https://examplelisting.com/listings/12345</link>
        <title>3 bedrooms with ocean views</title>
        <body>Stay in this newly renovated 3BR house with ocean views.</body>
        <date month="7" day="23" year="2023"/>
      </text>
      <review type="editorial">
        <link>https://example.com/reviews/42</link>
        <title>A little piece of heaven</title>
        <author>EXAMPLE.COM</author>
        <rating>8</rating>
        <body>This place is really good.</body>
      </review>
      <review type="user">
        <link>https://exampleperson.org/reviews/82</link>
        <author>Susan von Trapp</author>
        <rating>6</rating>
        <body>Not a bad place, but I prefer to be closer to the beach.</body>
        <date day="6" month="7" year="2023"/>
        <servicedate day="16" month="6" year="2023"/>
      </review>
      <attributes>
        <website>https://hotel.example.com</website>
        <client_attr name="rating">8.2</client_attr>
        <client_attr name="num_reviews">14</client_attr>
      </attributes>
      <image type="photo" url="https://image_url">
        <link>https://image_url</link>
        <title>Main hotel picture</title>
      </image>
    </content>
  </listing>
  ...
</listings>

<content>

リスティングに関する情報(評価、レビュー、設備などの詳細情報)を追加します。<content> 要素は省略可能です。<content> 内では、すべての子要素は省略可です。

<content> 要素は、ホテルリスト フィードの XML 階層の次の場所にあります。

+ <listings>
    + <language>
    + <listing>
        + <content>

構文

<content> 要素の構文は次のとおりです。

<?xml version="1.0" encoding="UTF-8"?>
<listings ... >
  <listing>
    <content>
      <!-- Specify <text>'s child elements in the order shown below. -->
      <text type="description">
        <link>listing_link</link>
        <title>listing_title</title>
        <author>listing_author</author>
        <body>listing_description</body>
        <date month="MM" day="DD" year="YYYY"/>
      </text>
      <!-- 0 or more reviews: -->
      <review type="[editorial|user]">
        ...
      </review>
      <!-- 0 or more attributes: -->
      <attributes>
        <website>https://hotel.example.com</website>
        <client_attr name="alternate_hotel_id">alternate_hotel_id</client_attr>
        <client_attr name="custom_0">custom_attribute_0</client_attr>
        <client_attr name="custom_1">custom_attribute_1</client_attr>
        <client_attr name="custom_2">custom_attribute_2</client_attr>
        <client_attr name="custom_3">custom_attribute_3</client_attr>
        <client_attr name="custom_4">custom_attribute_4</client_attr>
        <client_attr name="hotel_brand">hotel_brand</client_attr>
        <client_attr name="num_reviews">number_of_reviews</client_attr>
        <client_attr name="rating">aggregate_rating</client_attr>
      </attributes>
      <!-- a picture of the hotel or property-->
      <image type="photo" url="https://image_url">
        <link>https://image_url</link>
        <title>Main Hotel Picture</title>
      </image>
    </content>
  </listing>
  ...
</listings>

属性

<content> 要素には属性はありません。

子要素

<content> 要素には次の子要素があります。

子要素 必須 説明
<text type="description"> Optional Object

プロバイダのリスティングに関連付けられているウェブページ。 次の子要素があります:

  • <link>: 説明へのリンク。この要素には「http://」
    または「https://」を含めます(省略可)。
  • <title>: 説明のタイトル(省略可)。
  • <author>: 説明の作成者(省略可)。
  • <body>: 説明の本文(必須)。
  • <date>: 説明の日付(省略可)。
  • : これらの要素は上記の順序にする必要があります。

<review type="[editorial|user]"> Optional <review>

リスティングのユーザー レビューまたはエディタ レビューが含まれます。リスティングには、どちらのレビューでも、任意の数だけ含めることができます。

<listing> 要素に宿泊施設のすべてのレビューを含める必要はありません。この要素は、このリスティングの特長や品質を示す特定のレビューを含めるためのものです。

<attributes> Optional Object

宿泊施設に関する詳細情報を提供する 0 個以上の <client_attr> 子要素が含まれます。子要素は次の構文を使用します。

<client_attr name="attribute_name">attribute_value<client_attr>

子要素のリストと説明については、<attributes> をご覧ください。

すべての <client_attr> 要素は省略可能です。

<website> 子要素がある場合は、<client_attr> 要素よりも前に配置する必要があります。

<image> Optional Object 繰り返しタグ。詳細な画像情報が含まれます。

次の例に、<content> 要素が含まれるホテルリストの一部を示します。

<?xml version="1.0" encoding="UTF-8"?>
<listings xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:noNamespaceSchemaLocation="http://www.gstatic.com/localfeed/local_feed.xsd">
  <language>en</language>
  <listing>
    <id>123456</id>
    <name>My Apartment</name>
    <address format="simple">
      <component name="addr1">1 Sandstone Building</component>
      <component name="city">Los Angeles</component>
      <component name="postal_code">90210</component>
      <component name="province">CA</component>
    </address>
    <country>US</country>
    <latitude>40.730610</latitude>
    <longitude>-73.935242</longitude>
    <phone type="main">12345678</phone>
    <category>hotel</category> <!-- You can use whatever property type categories you wish -->
    <content>
      <text type="description">
        <link>https://examplelisting.com/listings/12345</link>
        <title>3 bedrooms with ocean views</title>
        <body>Stay in this newly renovated 3BR house with ocean views.</body>
        <date month="7" day="23" year="2023"/>
      </text>
      <review type="editorial">
        <link>https://example.com/reviews/42</link>
        <title>A little piece of heaven</title>
        <author>EXAMPLE.COM</author>
        <rating>8</rating>
        <body>This place is really good.</body>
      </review>
      <review type="user">
        <link>https://exampleperson.org/reviews/82</link>
        <author>Susan von Trapp</author>
        <rating>6</rating>
        <body>Not a bad place, but I prefer to be closer to the beach.</body>
        <date day="6" month="7" year="2023"/>
        <servicedate day="16" month="6" year="2023"/>
      </review>
      <attributes>
        <website>https://hotel.example.com</website>
        <client_attr name="rating">8.2</client_attr>
        <client_attr name="num_reviews">14</client_attr>
      </attributes>
      <image type="photo" url="https://image_url">
        <link>https://image_url</link>
        <title>Main hotel picture</title>
      </image>
    </content>
  </listing>
  ...
</listings>

<review>

ユーザー レビューまたはエディタ レビューが含まれます。<listing> 要素にリスティングのすべてのレビューを含める必要はありません。この要素は、このリスティングの特長や品質を示す特定のレビューを含めるためのものです。

<review> 要素は、ホテルリスト フィードの XML 階層の次の場所にあります。

+ <listings>
    + <language>
    + <listing>
        + <content>
            + <review>

構文

<review> 要素の構文は次のとおりです。

<?xml version="1.0" encoding="UTF-8"?>
<listings ... >
  <listing>
    <content>
      ...
      <!-- Specify <review>'s child elements in the order shown below. -->
      <review type="editorial">
        <link>review_link</link>
        <title>review_title</title> <!-- Title is for reviews of type "editorial" only -->
        <author>review_author</author>
        <rating>review_rating</rating>
        <body>review_text</body>
        <date>review_date</date>
        <servicedate>review_servicedate</servicedate>
      </review>
      <review type="user">
        <link>review_link</link>
        <author>review_author</author>
        <date month="MM" day="DD" year="YYYY"/>  <!-- Date is for reviews of type "user" only -->
        <servicedate month="MM" day="DD" year="YYYY"/>  <!-- Service Date is for reviews of type "user" only -->
        <rating>review_rating</rating>
        <body>review_text</body>
      </review>
    </content>
  </listing>
</listings>

属性

<review> 要素には次の属性があります。

属性 必須 説明
type Required レビューのタイプ。次のいずれかの値に設定します。
  • editorial: ウェブサイトまたは他のレビュー機関によるレビュー。
  • user: エンドユーザーによるレビュー。

子要素

<review> 要素には次の子要素があります。

子要素 必須 説明
<link> Optional string レビューへのリンク。この要素には「http://」または「https://」を含めます。
<title> Optional string (エディタ レビューのみ)レビューのタイトル。
<author> Optional string レビューの投稿者(例: 「Susan von Trapp」)。レビューにクレジット表記がない場合は、レビューが表示されているウェブサイトやパブリケーションの名前にすることもできます。
<rating> Optional string レビューのスコアを表す 0 ~ 10 の浮動小数点数。例: 「8.9」。
<body> Optional string レビューのテキスト。この要素には HTML を含めないでください。
<date month="MM" day="DD" year="YYYY"/> Optional Object (ユーザー レビューのみ)レビューの日付。この要素の次の属性を使用して指定します。
  • day: 月の日。例: 「7」。
  • month: 月。1 = 1 月 ... 12 = 12 月。
  • year: 4 桁の年。例:「2023」。

たとえば、2023 年 6 月 7 日は次のように記述します。

<date month="6" day="7" year="2023"/>
<servicedate month="MM" day="DD" year="YYYY"/> Optional Object (ユーザー レビューのみ)レビュー投稿者がレビュー対象のリスティングを訪問した日付。形式は上記の <date> と同じです。

たとえば、2023 年 6 月 7 日は次のように記述します。

<servicedate month="6" day="7" year="2023"/>

最低限必要である <servicedate> の年と月が指定されていないレビューは、表示されないことがあります。日は必須ではありません。

なお、<title><review> の有効な子要素であるのはレビューの typeeditorial である場合に限られ、<date> が有効であるのは typeuser である場合に限られます。

次の例に、エディタとユーザーのレビューを含むリスティングが含まれるホテルリストの一部を示します。

<?xml version="1.0" encoding="UTF-8"?>
<listings xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:noNamespaceSchemaLocation="http://www.gstatic.com/localfeed/local_feed.xsd">
  <language>en</language>
  <listing>
    <id>123456</id>
    <name>My Apartment</name>
    <address format="simple">
      <component name="addr1">1 Sandstone Building</component>
      <component name="city">Los Angeles</component>
      <component name="postal_code">90210</component>
      <component name="province">CA</component>
    </address>
    <country>US</country>
    <latitude>40.730610</latitude>
    <longitude>-73.935242</longitude>
    <phone type="main">12345678</phone>
    <category>hotel</category> <!-- You can use whatever property type categories you wish -->
    <content>
      <text type="description">
        <link>https://examplelisting.com/listings/12345</link>
        <title>3 bedrooms with ocean views</title>
        <body>Stay in this newly renovated 3BR house with ocean views.</body>
        <date month="7" day="23" year="2023"/>
      </text>
      <review type="editorial">
        <link>https://example.com/reviews/42</link>
        <title>A little piece of heaven</title>
        <author>EXAMPLE.COM</author>
        <rating>8</rating>
        <body>This place is really good.</body>
      </review>
      <review type="user">
        <link>https://exampleperson.org/reviews/82</link>
        <author>Susan von Trapp</author>
        <rating>6</rating>
        <body>Not a bad place, but I prefer to be closer to the beach.</body>
        <date day="6" month="7" year="2023"/>
        <servicedate day="16" month="6" year="2023"/>
      </review>
      <attributes>
        <website>https://hotel.example.com</website>
        <client_attr name="rating">8.2</client_attr>
        <client_attr name="num_reviews">14</client_attr>
      </attributes>
      <image type="photo" url="https://image_url">
        <link>https://image_url</link>
        <title>Main hotel picture</title>
      </image>
    </content>
  </listing>
  ...
</listings>

<attributes>

<attributes> タグを使用すると、宿泊施設の設備を説明し、宿泊施設の評価とレビューを分類することができます。

+ <listings>
    + <language>
    + <listing>
        + <content>
            + <review>
            + <attributes>

子要素

子要素 必須 説明
<website> Optional ホテルのメインのウェブサイト。存在する場合は、最初の <client_attr> 要素の前に配置する必要があります。例:
<website>https://hotel.example.com</website>
<client_attr name="attribute_name"> Optional 宿泊施設の追加の特性または「属性」。サポートされている attribute_name または 民泊の attribute_name を使用して指定できます。

attribute_name プレースホルダの値

次の表に、<client_attr name="attribute_name"> 要素の attribute_name に有効な値の一覧を示します。

attribute_name の値 説明 有効なコンテンツの値
alternate_hotel_id 宿泊施設の代替 ID。フィード情報用と予約エンジン用にそれぞれの宿泊施設 ID が必要な場合は、個別の ID があると便利です。 任意の文字列値
custom_[0-4] 任意の文字列型のカスタム属性。ユーザーには表示されません。 任意の文字列値
hotel_brand このホテルが所属するブランド。「Marriott」や「Hilton」などです。これはユーザーには表示されませんが、ホテルのグループ化に使用できます。 任意の文字列値
lodging Lodging proto で使用可能なすべてのフィールドのエンコード表現。 エンコード済み Lodging proto の Base64 エンコード文字列
num_reviews リスティングのレビューの数。 負ではない任意の整数。
rating 宿泊施設の評価の集計を表す浮動小数点数。 この数値は、通常は 0 ~ 5、0 ~ 10、0 ~ 100 の範囲ですが、評価システムを表す任意の範囲を使用できます。たとえば、rating_scale が 5 の場合、宿泊施設の評価は 3 または 4 にする必要があります。

注: 指定しない場合、デフォルトの rating_scale は 0 ~ 10 です。

民泊の attribute_name プレースホルダの値

民泊固有の属性と XML の例をご覧ください。

<image>

+ <listings>
    + <language>
    + <listing>
        + <content>
            + <review>
            + <attributes>
            + <image>

画像は、リスティング ID で宿泊施設を表示するために使用されます。使用するすべての画像は、次のガイドラインに従う必要があります。

  • 画像の推奨アスペクト比は 4:3 です。
  • Googlebot 画像クローラが画像の URL にアクセスできる必要があります。
  • サイトのルートレベルに robots.txt が含まれている場合は、下記に示す 2 つのオプションのいずれかが含まれることを確認します。

    1. Googlebot クローラがサイトのコンテンツ(画像を含む)をクロールできるようにします。

      • User-agent: Googlebot
      • Allow: /
    2. Googlebot 画像クローラがサイトの画像をクロールできるようにします。

      • User-agent: Googlebot-Image
      • Allow: /
  • 画像またはウェブサイトのスクリーンショットは許可しません。画像は、オリジナルかつ実物の画像や写真にする必要があります。

属性

  • 画像が広告である場合は「"ad"
  • 画像がレストランのメニューである場合は "menu"
  • 画像が店舗の写真である場合は「"photo"
属性名 必須 形式 説明
type Required Text

画像には、以下のいずれかを指定する必要があります。

url Required Text フルサイズの画像の URL。url 属性を使用して、そのページで使用する画像を指定します。
width Required A non-negative integer 画像の幅(ピクセル単位、720 ピクセル以上を推奨)
height Required A non-negative integer 画像の高さ(ピクセル単位、720 ピクセル以上を推奨)

子要素

子要素 必須 説明
<link> リクエスト済み、ただしローカルの写真のリスティングに必須 このタグには、関連する画像が存在するサイト上のページの、有効かつ最新の URL が含まれます。画像自体の URL は含まれません。 例:
<link><http://www.example.com/magic_pizza/></link>
<title> リクエスト済み このタグには画像のタイトルが含まれます。例:
<title>"Luxury Apartment"</title>
<author> 不要 コンテンツの作成者の名前。値は、ユーザー名か、「名 姓」の形式の氏名で指定します。
<date> 必須

このタグは、コンテンツ項目が作成された日付を示します。次の例に示すように、年、月、日を入力する必要があります。

<date month="6" day="7" year="2023"/>

次の例に、画像のタグが含まれるホテルリストの一部を示します。

<?xml version="1.0" encoding="UTF-8"?>
<listings xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:noNamespaceSchemaLocation="http://www.gstatic.com/localfeed/local_feed.xsd">
  <language>en</language>
  <listing>
    <content>
      <review>
      </review>
      <attributes>
      </attributes>
      <image type="photo" url="https://image_url" width="400" height="300">
        <link>https://image_url</link>
        <title>Apartment at Sandstone</title>
        <author>Jessica Landlord</author>
        <date month="6" day="7" year="2023"/>
      </image>
    </content>
  </listing>
  ...
</listings>

構文のガイドライン

XML ベースのホテルリストを作成する場合は、以下のガイドラインを使用します。

  • ホテルリストの XML ファイルを検証するには、Google の XSD スキーマを使用します。

  • UTF-8 エンコードを使用します。このエンコード スキーマを指定するには、次の例に示すように、XML タグに encoding 属性を含めます。

  • CDATA セクションを使用して、フィード内にデータ値を指定できます。CDATA セクションを使用する場合は、特殊文字をエスケープ処理しないでください。

  • CDATA セクションにないデータ値(URL など)には、エスケープ コードを使用します。エンティティ コードまたは文字コードのいずれかを使用して、これらの特殊文字を表すことができます。次の表に、使用できる共通のエンティティ コードと文字コードを示します。

    文字 エンティティ 文字コード
    アンパサンド(&) &amp; &#38;
    単一引用符(') &apos; &#39;
    二重引用符(") &quot; &#34;
    次の値より大きい(>) &gt; &#62;
    次の値より小さい(<) &lt; &#60;
  • データを含まない XML 要素を削除します。たとえば、ホテルに緯度と経度を使用しない場合は、空の <latitude/> 要素と <longitude/> 要素は含めないでください。

  • どのような状況でも(エスケープ処理されている場合であっても)XML 要素で HTML は使用しないでください。

  • アップロードの前にフィードを検証するには、ローカル フィード XSD「http://www.gstatic.com/localfeed/local_feed.xsd」を使用します。

  • フィードでコメントを使用するには、次の例に示すように、<!-- タグや --> タグ内でコメントをラップします。

    <!-- This is a comment -->
    
  • ユーザー <review><date> 要素は、必ず閉じてください。次に例を示します。

    <date day="2" month="12" year="2017"/>