本頁面說明屬性和子元素的說明、值和規定。這些值僅適用於度假民宿房源。
一般 XML 結構的格式與飯店房源資訊動態饋給類似。請參閱「飯店清單 XML 參考資料」。
如未附上下列必要項目,系統會自動停用房源資訊:
- 必要 XML 子元素:
id
、name
、latitude
、longitude
、address
。 - 必要屬性:
capacity
和website
。請參閱商家資訊動態饋給中的度假民宿直接連結。讓使用者有機會造訪房源網站。
如要瞭解必要的 XML 子項元素,請參閱 XML 子項元素。
如要進一步瞭解度假民宿,請參閱度假民宿專屬屬性。
最後,如果 Google 從其他來源判斷屬性值與度假民宿動態饋給中指定的值不同,Google 會顯示該房源的值。舉例來說,如果 Google 根據房源資訊的照片判斷房源有廚房,但 kitchen
屬性不存在或設為 No
,Google 會將房源視為有廚房。這些屬性稱為「推斷屬性」,只有在推斷準確度相當有把握的情況下才會顯示。
<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 | 評論類型。設為下列任一值:
|
子元素
<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 | (僅限使用者評論) 評論日期,您可使用這個元素的下列屬性指定:
舉例來說,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>,可能不會顯示。不必輸入日期。 |
範例
以下範例顯示部分飯店清單,其中包含編輯和使用者評論:
<?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>
attribute_name 預留位置的值
下表列出 <client_attr name="attribute_name">
元素中 attribute_name
的有效值,但建議您盡可能提供額外的 attribute_name
。
attribute_name 的值 |
是否必要? | 說明 | 有效內容值 |
---|---|---|---|
capacity | Required | 房源可容納的房客人數上限。這個值應大於或等於「number_of_bedrooms」。 | Non-negative integer value |
website | Required | 資源的網站網址。 | Free text |
partner_hygiene_link | Strongly recommended | 連結至外部合作夥伴網站,提供有關商家資訊衛生詳細資料的更多資訊。 | Free text (the site's URL) |
number_of_bathrooms | Strongly recommended | 浴室數量。 | Non-negative float value, for example, 1, 1.5, 2 |
number_of_bedrooms | Strongly recommended | 臥室數量。 | Non-negative integer value |
number_of_beds | Strongly recommended | 所有房間的床位數。 | Non-negative integer value |
self_checkin_checkout | Recommended | 資源是否提供自助入住和退房服務。 | Yes/No/Unknown |
rating | Strongly recommended | 代表房源整體評分的浮點數。這個數字通常介於 0 到 5、0 到 10 或 0 到 100 之間,但您可以使用任何代表評分系統的範圍。 | Non-negative float value |
rating_num | Strongly recommended | 房源獲得的評分次數。 | Non-negative integer value |
rating_scale | Strongly recommended | 資源的最高可能評分。舉例來說,如果 rating_scale 為 5,則房源評等應為 3 或 4。 注意:如未指定,預設的 rating_scale 為 0 到 10。 |
Non-negative integer value |
instant_bookable | Strongly recommended | 資源是否可透過結帳程序立即預訂。 替代方法是等待核准。 | Yes/No/Unknown |
description | Strongly recommended | 任意形式的文字,說明房源的獨特特質 | Free text |
category | Strongly recommended | 房源類型,例如別墅、平房、小屋或公寓 | Free text |
ac | Recommended | 資源是否有空調。 | Yes/No/Unknown |
beach_access | Recommended | 資源是否可通往附近的公共海灘。 | Yes/No/Unknown |
check_in_time | Recommended | 入住房源的確切時間。接受 HHMM、HH:MM 或 HH:MM:SS 格式,例如使用 14:00,而非下午 2 點或 2:00pm。系統不會剖析或顯示其他格式。 | Time |
check_out_time | Recommended | 退房的確切時間,接受 HHMM、HH:MM 或 HH:MM:SS 格式,例如使用 11:00,而非 11am 或 11:00am。系統不會剖析或顯示其他格式。 | Time |
child_friendly | Recommended | 資源是否適合兒童。 | Yes/No/Unknown |
crib | Recommended | 資源是否提供嬰兒床。 | Yes/No/Unknown |
elevator | Recommended | 資源是否有電梯。 | Yes/No/Unknown |
gym_fitness_equipment | Recommended | 資源是否有健身房或任何健身器材。 | Yes/No/Unknown |
heating | Recommended | 資源是否有暖氣。 | Yes/No/Unknown |
hot_tub | Recommended | 資源是否有熱水浴缸。 | Yes/No/Unknown |
ironing_board | Recommended | 資源是否提供熨衣板。 | Yes/No/Unknown |
kitchen | Recommended | 資源是否有廚房。 | Yes/No/Unknown |
microwave | Recommended | 資源是否有微波爐。 | Yes/No/Unknown |
min_days_advance_purchase | Recommended | 可預訂住宿的最早提前天數。 | Non-negative integer value |
min_night_stay | Recommended | 房客可預訂房源的最少天數。 | Positive integer (more than zero) |
max_night_stay | Recommended | 房客可預訂房源的最長天數。 | Positive integer (more than zero) |
outdoor_grill | Recommended | 資源是否有燒烤架。 | Yes/No/Unknown |
oven_stove | Recommended | 資源是否有火爐。 | Yes/No/Unknown |
parking_type | Recommended | 資源提供的停車類型。 | Free/Paid/None |
patio | Recommended | 資源是否有露台。 | Yes/No/Unknown |
pets_allowed | Recommended | 部分或所有客房允許房客攜帶寵物 (狗或貓,不包括服務型動物) 入住。 | Yes/No/Unknown |
pool_type | Recommended | 資源提供的泳池類型 (泳池使用權)。 | Indoors, Outdoors, Indoors/Outdoors, None |
room_type | Recommended | 房型。目前唯一支援的值是 ENTIRE_PLACE 。 |
ENTIRE_PLACE
|
smoking_free_property | Recommended | 房源是否全面禁菸或禁止吸菸。 | Yes/No/Unknown |
special_service_level | Recommended | 房源的服務等級是否為特殊等級。
例如:verified 、luxury 、premium |
Yes/No/Unknown |
square_footage | Recommended | 房源面積,單位為平方英尺。 | Non-negative float value |
square_meters | Recommended | 房源面積,單位為平方公尺。 | Non-negative float |
tv | Recommended | 資源是否有電視。 | Yes/No/Unknown |
washer_dryer | Recommended | 資源是否提供洗衣機。 | Yes/No/Unknown |
wheelchair_accessible | Recommended | 資源是否提供無障礙設施。 | Yes/No/Unknown |
internet_type | Recommended | 資源提供的 Wi-Fi 網路存取類型。 | Free/Paid/None |
airport_shuttle | Optional | 房主是否提供往返機場或其他航廈的交通服務。 | Yes/No/Unknown |
balcony | Optional | 資源是否有陽台。 | Yes/No/Unknown |
fire_place | Optional | 資源是否有壁爐。 | Yes/No/Unknown |
free_breakfast | Optional | 資源是否包含免費早餐。 | Yes/No/Unknown |
host_description | Optional | 度假民宿房東的說明。 | Free text |
host_language | Optional | 屋主可以使用語言。 | 以半形逗號分隔的語言代碼清單,例如:de 、en |
host_name | Optional | 度假民宿房東姓名。 | Free text |
host_response_rate | Optional | 房東的平均回覆率。 | Non-negative float value, for example, 1, 0.75, 0.5 |
host_response_time | Optional | 主辦人的平均回覆時間。 | Free text |
license_num | Optional | 在全球某些地區需要顯示的資源執照號碼 (遊客或商家)。如果有多份執照,則可以重複添加,建議新增執照發證機構做為背景資訊,例如「巴黎:123456ABC」。 | Free text |
number_of_half_bathrooms | Optional | 半套浴室數量。 | Non-negative integer value |
number_of_living_rooms | Optional | 起居室數量。 | Non-negative integer value |
private_beach_access | Optional | 資源是否擁有專屬的非公共海灘。 | Yes/No/Unknown |
refund_policy | Optional | 房源的退款政策。 | Free text |
XML 子元素
必要 XML 子元素如下:
子項元素 | 是否必要? | 類型 | 說明 |
---|---|---|---|
<country> | Strongly recommended | string | 這項房源所在的國家/地區。這個值必須是 ISO 3116 雙字母國家/地區代碼,例如美國是 US ,加拿大是 CA :<country>US</country> |
<id> | Required | string | 房源的專屬 ID。請注意,每個度假屋都必須有網站專屬的 ID,且不得重複使用。 |
<latitude> | Required | float | 與商家資訊中列出的所在位置對應的緯度,例如:<latitude>37.423738</latitude> 這個值可使用 Google 地圖 API 等地理編碼工具產生。 |
<longitude> | Required | float | 與商家資訊中列出的所在位置對應的經度,例如:<longitude>-122.090101</longitude> 這個值可使用 Google 地圖 API 等地理編碼工具產生。 |
<name> | Required | string | 房源名稱。最多 300 個半形字元。 |
<address> | Required | string or Object | 以字串表示的房源完整實際地點。地址必須包含街道名稱和門牌號碼。如果沒有地址,請提供加號代碼。如有公寓或住宅單元號碼,也請一併提供。 或者,您也可以提供「複合」地址。使用
請注意,郵政信箱或其他僅供郵寄的地址都不算是完整的實際地址。 以下是完整地址的範例: <address>6 Acacia Ave Apt. 2, Nottingham NG8 6FT, UK/address> <address> <component name="addr1">6 Acacia Ave</component> <component name="addr2">Apt. 2</component> <component name="city">Nottingham </component> <component name="postal_code">NG8 6FT</component> <component name="country">UK</component> </address> 以下是使用 plus code 的完整地址範例: <address>XQHM+7VF Nottingham NG8 6FT, UK/address> <address> <component name="addr1">XQHM+7VF</component> <component name="city">Nottingham </component> <component name="postal_code">NG8 6FT</component> <component name="country">UK</component> </address> 不建議的做法:
|
度假民宿商家資訊範例
<?xml version="1.0" encoding="UTF-8"?> <listings> <language>en</language> <listing> <id>123456</id> <name>Apartment Name</name> <address format="simple"> <component name="addr1">18733 Clark Way</component> <component name="addr2">#C10</component> <component name="city">Mountain View</component> <component name="postal_code">94043</component> <component name="province">California</component> </address> <country>US</country> <latitude>37.4182515</latitude> <longitude>-122.0742354</longitude> <phone type="main">12345678</phone> <category>vacation_villa</category> <date day="21" month="12" year="2017"/> <content> <text type="description"> <link>https://list_url</link> <title>Description Title</title> <body>Description Body</body> </text> <review type="editorial"> <link>https://example.com/reviews/42</link> <title>A little piece of heaven</title> <author>EXAMPLE</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="2017"/> <servicedate day="16" month="6" year="2017"/> </review> <attributes> <website>https://hotel.example.com/123456</website> <client_attr name="capacity">7</client_attr> <client_attr name="cleaning_disinfection">Yes</client_attr> <client_attr name="min_days_between_stays">3</client_attr> <client_attr name="enhanced_cleaning_practices">Yes</client_attr> <client_attr name="partner_hygiene_link">http://www.example.com/hygiene/</client_attr> <client_attr name="number_of_bathrooms">2</client_attr> <client_attr name="number_of_bedrooms">3</client_attr> <client_attr name="number_of_beds">4</client_attr> <client_attr name="self_checkin_checkout">Yes</client_attr> <client_attr name="rating">4.8</client_attr> <client_attr name="rating_num">5373</client_attr> <client_attr name="rating_scale">5</client_attr> <client_attr name="ac">Yes</client_attr> <client_attr name="airport_shuttle">Yes</client_attr> <client_attr name="balcony">No</client_attr> <client_attr name="beach_access">Yes</client_attr> <client_attr name="check_in_time">15:00</client_attr> <client_attr name="check_out_time">11:00</client_attr> <client_attr name="child_friendly">Yes</client_attr> <client_attr name="crib">Unknown</client_attr> <client_attr name="elevator">Yes</client_attr> <client_attr name="fire_place">Unknown</client_attr> <client_attr name="free_breakfast">Yes</client_attr> <client_attr name="gym_fitness_equipment">Yes</client_attr> <client_attr name="heating">Yes</client_attr> <client_attr name="host_description">A short description about the host and their interests</client_attr> <client_attr name="host_name">The name of the host</client_attr> <client_attr name="host_language">en, da, el</client_attr> <client_attr name="host_response_rate">0.75</client_attr> <client_attr name="host_response_time">1 hour</client_attr> <client_attr name="hot_tub">Yes</client_attr> <client_attr name="instant_bookable">Yes</client_attr> <client_attr name="internet_type">Free</client_attr> <client_attr name="ironing_board">No</client_attr> <client_attr name="kitchen">Yes</client_attr> <client_attr name="license_num">Free text. If multiple licenses exist, we suggest adding authority of the licence as context</client_attr> <client_attr name="license_num">Paris: 123456ABC</client_attr> <client_attr name="microwave">Yes</client_attr> <client_attr name="max_night_stay">7</client_attr> <client_attr name="min_days_advance_purchase">2</client_attr> <client_attr name="min_night_stay">3</client_attr> <client_attr name="number_of_living_rooms">1</client_attr> <client_attr name="outdoor_grill">No</client_attr> <client_attr name="oven_stove">Yes</client_attr> <client_attr name="parking_type">Free</client_attr> <client_attr name="patio">Unknown</client_attr> <client_attr name="pets_allowed">Yes</client_attr> <client_attr name="pool_type">Indoors</client_attr> <client_attr name="private_beach_access">Unknown</client_attr> <client_attr name="room_type">ENTIRE_PLACE</client_attr> <client_attr name="refund_policy">The refund policy for the property</client_attr> <client_attr name="smoking_free_property">Yes</client_attr> <client_attr name="special_service_level">No</client_attr> <client_attr name="square_footage">1200</client_attr> <client_attr name="tv">Yes</client_attr> <client_attr name="washer_dryer">Yes</client_attr> <client_attr name="wheelchair_accessible">Yes</client_attr> </attributes> </content> </listing> </listings>