ホテルリスト 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, 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 は再利用しないでくださいプロパティの一致の問題を解決しようとしたときに、問題が発生する可能性があります。

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

ホテルの物理的なビジネス拠点。

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

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

  • addr1: ホテルの主要な番地。
  • addr2: 予備の住所(必要な場合)。
  • 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, Boston, MA, 02472</address>

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

<country> Required string このリスティングが存在する国。値には 2 文字の国コードを指定する必要があります。(例: 米国は「US」、カナダは「CA」)。次に例を示します。
<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, 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

プロパティに関する詳細を提供する <client_attr> 子要素を 0 個以上含めます。子要素の構文は次のとおりです。

<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 レビューの投稿者です(例: 「スーザン フォン トラップ」)。レビューが掲載されていない場合は、レビューが表示されているウェブサイトや出版物の名前を指定することもできます。
<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> は、レビューの typeeditorial の場合にのみ <review> の有効な子要素になり、<date>typeuser の場合にのみ有効です。

次の例は、ホテルリストの一部であり、リスティングに編集者とユーザーのクチコミが 1 つずつ含まれています。

<?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。フィード情報用に 1 つの宿泊施設識別子が必要で、予約エンジン用にもう 1 つの宿泊施設識別子が必要になる場合は、個別の ID があると便利です。 任意の文字列値
custom_[0-4] 任意の文字列型のカスタム属性。これらはユーザーには表示されません。 任意の文字列値
hotel_brand このホテルが所属するブランド。例: 「マリオット」、「ヒルトン」これはユーザーには表示されませんが、ホテルのグループ化に使用できます。 任意の文字列値
lodging Lodging proto で利用可能なすべてのフィールドのエンコード表現。 エンコードされた Lodging proto の Base64 でエンコードされた文字列
num_reviews リスティングのレビュー数。 任意の正の整数。
rating 宿泊施設の集計評価を表す浮動小数点数。 通常、この数値は 0 ~ 5、0 ~ 10、または 0 ~ 100 ですが、レーティング システムを表す任意の範囲を使用できます。

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

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

<image>

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

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

  • 画像の推奨アスペクト比は 4:3 です。
  • 画像の URL には、画像用 Googlebot クローラがアクセスできる必要があります。
  • サイトのルートレベルに 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"/>