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

ホテルリストは、旅行プランの対象となるすべてのホテルをリストした XML ファイルです。 料金情報を提供します。ホテルリスト ファイル自体に料金が含まれていない 情報です。

ホテルリストのルート要素は <listings> 要素で、次の要素が含まれます。 プロパティを記述する <listing> 要素。

最初の実装の一環としてホテルリストを作成します。 定期的なメンテナンスの一環として、ホテルを追加または削除できます。

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

ホテルリストを作成したら、ホテルリスト 管理するか、 できます

データの問題を見つけて修正する

ホテルリストのデータの問題を見つけて修正するには、以下の記事を参照してください。

リスティングの要件

ホテルリスト内の宿泊施設が 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 が必要です。 再利用できません。

構造化された住所

次の例は、構造化されたホテルリストを含むホテルリストの一部を示しています。 address:

<?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>

自由形式の住所

次の例は、自由形式のホテルリストの一部を示しています。 address:

<?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 ホテルの一意の識別子。

注: この値は常にサイトに対して一意である必要があります。推奨 再利用しないでください。再利用しようとすると問題が発生することがあります。 宿泊施設の一致の問題を解決するをご覧ください。

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

ホテルの所在地。

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

少なくとも、番地、市区町村、都道府県、地域、 ホテルの郵便番号を指定します<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 文字の国コード。 たとえば、米国は「US」です。カナダは「CA」です次に例を示します。
<country>US</country>
<latitude> Required* float ホテル所在地の緯度。次に例を示します。
<latitude>37.423738</latitude>

この値は、 Google Maps API

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

この値は、 Google Maps API

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

ホテルの連絡先電話番号(複数可)。リスティングがビジネスの場合 支店の場合は、それぞれの支店の電話番号を入力してください (本社の電話番号ではありません)。

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> リスティングに使用されるオプションの詳細。説明、評価、 宿泊施設の特徴です

* 電話番号または緯度/経度のいずれかが必要です。水 両方を定義することをおすすめします

構造化された住所

次の例は、構造化されたホテルリストを含むホテルリストの一部を示しています。 address:

<?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>

自由形式の住所

次の例は、自由形式のホテルリストの一部を示しています。 address:

<?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

次の <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>

ユーザー レビューまたはエディター レビューが含まれます。すべての URL を含める必要はありません。 <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 レビューのタイプ。次のいずれかの値に設定します。 <ph type="x-smartling-placeholder">
    </ph>
  • 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 (ユーザー レビューのみ)レビューの日付。 次の属性を指定します。 <ph type="x-smartling-placeholder">
    </ph>
  • 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] プレースホルダの値

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

attribute_name の値 説明 有効なコンテンツの値
alternate_hotel_id 宿泊施設の代替 ID。別々の ID を使用すると フィード情報用に 1 つのプロパティ ID が必要な場合は、 予約エンジンの別の宿泊施設識別子です 任意の文字列値
custom_[0-4] 任意の文字列型のカスタム属性。これらはユーザーには表示されません。 任意の文字列値
hotel_brand このホテルが所属するブランド。例: 「マリオット」または 「Hilton」。これはユーザーには表示されませんが、グループ化に使用できます。 利用できます 任意の文字列値
lodging 利用可能なすべてのフィールドをエンコードして Lodging proto です。 Base64 でエンコードされた エンコード済み Lodging プロトコル
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 エンコードを使用します。encoding を追加して、このエンコード スキーマを指定します。 属性を XML タグ内に指定する必要があります。

  • CDATA セクションでフィード内のデータ値を指定できます。以下をご使用の場合: CDATA セクション。特殊文字はエスケープしないでください。

  • 次のような CDATA セクションにないデータ値にはエスケープ コードを使用する できます。エンティティ コードまたは文字コードのいずれかを使用して 使用しないでください。 次の表に、使用できる一般的なエンティティ コードと文字コードを示します。

    文字 エンティティ 文字コード
    アンパサンド(&) &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 -->
    
  • ユーザーの <date> 要素を必ず閉じてください <review>。例:

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